ISF15ACP4 Driver 1.0.0
API reference
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
isf15acp4::GraphicsSurface< Derived > Class Template Reference

CRTP interface every graphics backend must implement. More...

#include <isf15acp4_graphics_surface.hpp>

Public Member Functions

void Clear (Color565 color) noexcept
 
void SetPixel (uint8_t x, uint8_t y, Color565 color) noexcept
 
Color565 GetPixel (uint8_t x, uint8_t y) const noexcept
 
void DrawHLine (uint8_t x0, uint8_t x1, uint8_t y, Color565 color) noexcept
 
void DrawVLine (uint8_t x, uint8_t y0, uint8_t y1, Color565 color) noexcept
 
void DrawRect (const Rect &rect, Color565 color) noexcept
 
void FillRect (const Rect &rect, Color565 color) noexcept
 
void DrawChar (uint8_t x, uint8_t y, char ch, Color565 color, Color565 bg=colors::Black) noexcept
 
void DrawString (uint8_t x, uint8_t y, const char *text, Color565 color, Color565 bg=colors::Black) noexcept
 
void BlitRgb565 (uint8_t x, uint8_t y, uint8_t src_width, uint8_t src_height, const Color565 *src) noexcept
 
uint8_t Width () const noexcept
 
uint8_t Height () const noexcept
 
std::size_t ByteSize () const noexcept
 
const Color565 * Data () const noexcept
 
Color565 * Data () noexcept
 
GraphicsBackend Backend () const noexcept
 

Protected Member Functions

 GraphicsSurface ()=default
 
 ~GraphicsSurface ()=default
 

Detailed Description

template<typename Derived>
class isf15acp4::GraphicsSurface< Derived >

CRTP interface every graphics backend must implement.

Backends share a common drawing vocabulary so application code can target SmartDisplay with any engine selected at construction time.

Template Parameters
DerivedConcrete backend (Canvas, HardwareDirectSurface, AnimatorSurface).

Constructor & Destructor Documentation

◆ GraphicsSurface()

template<typename Derived >
isf15acp4::GraphicsSurface< Derived >::GraphicsSurface ( )
protecteddefault

◆ ~GraphicsSurface()

template<typename Derived >
isf15acp4::GraphicsSurface< Derived >::~GraphicsSurface ( )
protecteddefault

Member Function Documentation

◆ Backend()

template<typename Derived >
GraphicsBackend isf15acp4::GraphicsSurface< Derived >::Backend ( ) const
inlinenoexcept

◆ BlitRgb565()

template<typename Derived >
void isf15acp4::GraphicsSurface< Derived >::BlitRgb565 ( uint8_t  x,
uint8_t  y,
uint8_t  src_width,
uint8_t  src_height,
const Color565 *  src 
)
inlinenoexcept

◆ ByteSize()

template<typename Derived >
std::size_t isf15acp4::GraphicsSurface< Derived >::ByteSize ( ) const
inlinenoexcept

◆ Clear()

template<typename Derived >
void isf15acp4::GraphicsSurface< Derived >::Clear ( Color565  color)
inlinenoexcept

◆ Data() [1/2]

template<typename Derived >
const Color565 * isf15acp4::GraphicsSurface< Derived >::Data ( ) const
inlinenoexcept

◆ Data() [2/2]

template<typename Derived >
Color565 * isf15acp4::GraphicsSurface< Derived >::Data ( )
inlinenoexcept

◆ DrawChar()

template<typename Derived >
void isf15acp4::GraphicsSurface< Derived >::DrawChar ( uint8_t  x,
uint8_t  y,
char  ch,
Color565  color,
Color565  bg = colors::Black 
)
inlinenoexcept

◆ DrawHLine()

template<typename Derived >
void isf15acp4::GraphicsSurface< Derived >::DrawHLine ( uint8_t  x0,
uint8_t  x1,
uint8_t  y,
Color565  color 
)
inlinenoexcept

◆ DrawRect()

template<typename Derived >
void isf15acp4::GraphicsSurface< Derived >::DrawRect ( const Rect &  rect,
Color565  color 
)
inlinenoexcept

◆ DrawString()

template<typename Derived >
void isf15acp4::GraphicsSurface< Derived >::DrawString ( uint8_t  x,
uint8_t  y,
const char *  text,
Color565  color,
Color565  bg = colors::Black 
)
inlinenoexcept

◆ DrawVLine()

template<typename Derived >
void isf15acp4::GraphicsSurface< Derived >::DrawVLine ( uint8_t  x,
uint8_t  y0,
uint8_t  y1,
Color565  color 
)
inlinenoexcept

◆ FillRect()

template<typename Derived >
void isf15acp4::GraphicsSurface< Derived >::FillRect ( const Rect &  rect,
Color565  color 
)
inlinenoexcept

◆ GetPixel()

template<typename Derived >
Color565 isf15acp4::GraphicsSurface< Derived >::GetPixel ( uint8_t  x,
uint8_t  y 
) const
inlinenoexcept

◆ Height()

template<typename Derived >
uint8_t isf15acp4::GraphicsSurface< Derived >::Height ( ) const
inlinenoexcept

◆ SetPixel()

template<typename Derived >
void isf15acp4::GraphicsSurface< Derived >::SetPixel ( uint8_t  x,
uint8_t  y,
Color565  color 
)
inlinenoexcept

◆ Width()

template<typename Derived >
uint8_t isf15acp4::GraphicsSurface< Derived >::Width ( ) const
inlinenoexcept

The documentation for this class was generated from the following file: