libyggdrasil  v1.0.0
bsp::drv::Display< Context, DisplayImpl > Struct Template Reference

Base class for Display abstraction. More...

#include <display.hpp>

Public Types

using Impl = DisplayImpl< Context >
 

Public Member Functions

 Display ()=delete
 
 Display (const Display &)=delete
 
 Display (Display &&)=delete
 

Static Public Member Functions

static auto init (auto ... args)
 
static auto deinit (auto ... args)
 Deinit function. More...
 
static void reset ()
 
static auto getWidth ()
 
static auto getHeight ()
 
static Palette getDefaultPalette ()
 
static void * getFramebufferAddress ()
 
static void setPalette (const Palette &palette)
 
static void turnOn ()
 
static void turnOff ()
 
static void clear (auto colorIndex)
 Clear the display to a color. More...
 
static void drawRectangle (u16 x1, u16 y1, u16 x2, u16 y2, auto colorIndex)
 Draw a rectangle. More...
 
static void fillRectangle (u16 x1, u16 y1, u16 x2, u16 y2, auto colorIndex)
 Draw a filled rectangle. More...
 
static void drawPixel (u16 x, u16 y, auto colorIndex)
 Draw a single pixel. More...
 
static void drawLine (u16 x1, u16 y1, u16 x2, u16 y2, auto colorIndex)
 Draw a line. More...
 
static void drawCircle (i16 centerX, i16 centerY, u16 radius, auto colorIndex)
 Draw a cricle. More...
 
static void fillCircle (i16 centerX, i16 centerY, u16 radius, auto colorIndex)
 Draw a filled cricle. More...
 
static void drawCharacter (u16 x, u16 y, char c, auto colorIndex, Font &font)
 Draw a single character. More...
 
static void drawString (u16 x, u16 y, std::string_view string, auto colorIndex, Font &font)
 Draw a string. More...
 

Detailed Description

template<auto Context, template< auto > typename DisplayImpl>
struct bsp::drv::Display< Context, DisplayImpl >

Base class for Display abstraction.

Template Parameters
ContextDisplay context
DisplayImplDisplay implementation

Member Typedef Documentation

◆ Impl

template<auto Context, template< auto > typename DisplayImpl>
using bsp::drv::Display< Context, DisplayImpl >::Impl = DisplayImpl<Context>

Constructor & Destructor Documentation

◆ Display() [1/3]

template<auto Context, template< auto > typename DisplayImpl>
bsp::drv::Display< Context, DisplayImpl >::Display ( )
delete

◆ Display() [2/3]

template<auto Context, template< auto > typename DisplayImpl>
bsp::drv::Display< Context, DisplayImpl >::Display ( const Display< Context, DisplayImpl > &  )
delete

◆ Display() [3/3]

template<auto Context, template< auto > typename DisplayImpl>
bsp::drv::Display< Context, DisplayImpl >::Display ( Display< Context, DisplayImpl > &&  )
delete

Member Function Documentation

◆ clear()

template<auto Context, template< auto > typename DisplayImpl>
static void bsp::drv::Display< Context, DisplayImpl >::clear ( auto  colorIndex)
inlinestatic

Clear the display to a color.

Parameters
colorIndexIndex for the color

◆ deinit()

template<auto Context, template< auto > typename DisplayImpl>
static auto bsp::drv::Display< Context, DisplayImpl >::deinit ( auto ...  args)
inlinestatic

Deinit function.

Returns
Success

◆ drawCharacter()

template<auto Context, template< auto > typename DisplayImpl>
static void bsp::drv::Display< Context, DisplayImpl >::drawCharacter ( u16  x,
u16  y,
char  c,
auto  colorIndex,
Font &  font 
)
inlinestatic

Draw a single character.

Parameters
xX coordinate
yY coordinate
cCharachter
colorIndexIndex for the color
fontFont

◆ drawCircle()

template<auto Context, template< auto > typename DisplayImpl>
static void bsp::drv::Display< Context, DisplayImpl >::drawCircle ( i16  centerX,
i16  centerY,
u16  radius,
auto  colorIndex 
)
inlinestatic

Draw a cricle.

Parameters
centerXX Position of the center
centerYY Position of the center
radiusRadius
colorIndexIndex for the color

◆ drawLine()

template<auto Context, template< auto > typename DisplayImpl>
static void bsp::drv::Display< Context, DisplayImpl >::drawLine ( u16  x1,
u16  y1,
u16  x2,
u16  y2,
auto  colorIndex 
)
inlinestatic

Draw a line.

Parameters
x1X Start coordinate
y1Y Start coordinate
x2X End coordinate
y2Y End coordinate
colorIndexIndex for the color

◆ drawPixel()

template<auto Context, template< auto > typename DisplayImpl>
static void bsp::drv::Display< Context, DisplayImpl >::drawPixel ( u16  x,
u16  y,
auto  colorIndex 
)
inlinestatic

Draw a single pixel.

Parameters
xX coordinate
yY coordinate
colorIndexIndex for the color

◆ drawRectangle()

template<auto Context, template< auto > typename DisplayImpl>
static void bsp::drv::Display< Context, DisplayImpl >::drawRectangle ( u16  x1,
u16  y1,
u16  x2,
u16  y2,
auto  colorIndex 
)
inlinestatic

Draw a rectangle.

Parameters
x1X Start coordinate
y1Y Start coordinate
x2X End coordinate
y2Y End coordinate
colorIndexIndex for the color

◆ drawString()

template<auto Context, template< auto > typename DisplayImpl>
static void bsp::drv::Display< Context, DisplayImpl >::drawString ( u16  x,
u16  y,
std::string_view  string,
auto  colorIndex,
Font &  font 
)
inlinestatic

Draw a string.

Parameters
xX coordinate
yY coordinate
stringString view
colorIndexIndex for the color
fontFont

◆ fillCircle()

template<auto Context, template< auto > typename DisplayImpl>
static void bsp::drv::Display< Context, DisplayImpl >::fillCircle ( i16  centerX,
i16  centerY,
u16  radius,
auto  colorIndex 
)
inlinestatic

Draw a filled cricle.

Parameters
centerXX Position of the center
centerYY Position of the center
radiusRadius
colorIndexIndex for the color

◆ fillRectangle()

template<auto Context, template< auto > typename DisplayImpl>
static void bsp::drv::Display< Context, DisplayImpl >::fillRectangle ( u16  x1,
u16  y1,
u16  x2,
u16  y2,
auto  colorIndex 
)
inlinestatic

Draw a filled rectangle.

Parameters
x1X Start coordinate
y1Y Start coordinate
x2X End coordinate
y2Y End coordinate
colorIndexIndex for the color

◆ getDefaultPalette()

template<auto Context, template< auto > typename DisplayImpl>
static Palette bsp::drv::Display< Context, DisplayImpl >::getDefaultPalette ( )
inlinestatic

◆ getFramebufferAddress()

template<auto Context, template< auto > typename DisplayImpl>
static void* bsp::drv::Display< Context, DisplayImpl >::getFramebufferAddress ( )
inlinestatic

◆ getHeight()

template<auto Context, template< auto > typename DisplayImpl>
static auto bsp::drv::Display< Context, DisplayImpl >::getHeight ( )
inlinestatic

◆ getWidth()

template<auto Context, template< auto > typename DisplayImpl>
static auto bsp::drv::Display< Context, DisplayImpl >::getWidth ( )
inlinestatic

◆ init()

template<auto Context, template< auto > typename DisplayImpl>
static auto bsp::drv::Display< Context, DisplayImpl >::init ( auto ...  args)
inlinestatic

◆ reset()

template<auto Context, template< auto > typename DisplayImpl>
static void bsp::drv::Display< Context, DisplayImpl >::reset ( )
inlinestatic

◆ setPalette()

template<auto Context, template< auto > typename DisplayImpl>
static void bsp::drv::Display< Context, DisplayImpl >::setPalette ( const Palette palette)
inlinestatic

◆ turnOff()

template<auto Context, template< auto > typename DisplayImpl>
static void bsp::drv::Display< Context, DisplayImpl >::turnOff ( )
inlinestatic

◆ turnOn()

template<auto Context, template< auto > typename DisplayImpl>
static void bsp::drv::Display< Context, DisplayImpl >::turnOn ( )
inlinestatic

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