Base class for Display abstraction.
More...
#include <display.hpp>
|
using | Impl = DisplayImpl< Context > |
|
|
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...
|
|
template<auto Context, template< auto > typename DisplayImpl>
struct bsp::drv::Display< Context, DisplayImpl >
Base class for Display abstraction.
- Template Parameters
-
◆ Impl
template<auto Context, template< auto > typename DisplayImpl>
◆ Display() [1/3]
template<auto Context, template< auto > typename DisplayImpl>
◆ Display() [2/3]
template<auto Context, template< auto > typename DisplayImpl>
◆ Display() [3/3]
template<auto Context, template< auto > typename DisplayImpl>
◆ clear()
template<auto Context, template< auto > typename DisplayImpl>
Clear the display to a color.
- Parameters
-
colorIndex | Index for the color |
◆ deinit()
template<auto Context, template< auto > typename DisplayImpl>
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
-
x | X coordinate |
y | Y coordinate |
c | Charachter |
colorIndex | Index for the color |
font | Font |
◆ drawCircle()
template<auto Context, template< auto > typename DisplayImpl>
Draw a cricle.
- Parameters
-
centerX | X Position of the center |
centerY | Y Position of the center |
radius | Radius |
colorIndex | Index for the color |
◆ drawLine()
template<auto Context, template< auto > typename DisplayImpl>
Draw a line.
- Parameters
-
x1 | X Start coordinate |
y1 | Y Start coordinate |
x2 | X End coordinate |
y2 | Y End coordinate |
colorIndex | Index for the color |
◆ drawPixel()
template<auto Context, template< auto > typename DisplayImpl>
Draw a single pixel.
- Parameters
-
x | X coordinate |
y | Y coordinate |
colorIndex | Index for the color |
◆ drawRectangle()
template<auto Context, template< auto > typename DisplayImpl>
Draw a rectangle.
- Parameters
-
x1 | X Start coordinate |
y1 | Y Start coordinate |
x2 | X End coordinate |
y2 | Y End coordinate |
colorIndex | Index 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
-
x | X coordinate |
y | Y coordinate |
string | String view |
colorIndex | Index for the color |
font | Font |
◆ fillCircle()
template<auto Context, template< auto > typename DisplayImpl>
Draw a filled cricle.
- Parameters
-
centerX | X Position of the center |
centerY | Y Position of the center |
radius | Radius |
colorIndex | Index for the color |
◆ fillRectangle()
template<auto Context, template< auto > typename DisplayImpl>
Draw a filled rectangle.
- Parameters
-
x1 | X Start coordinate |
y1 | Y Start coordinate |
x2 | X End coordinate |
y2 | Y End coordinate |
colorIndex | Index for the color |
◆ getDefaultPalette()
template<auto Context, template< auto > typename DisplayImpl>
◆ getFramebufferAddress()
template<auto Context, template< auto > typename DisplayImpl>
◆ getHeight()
template<auto Context, template< auto > typename DisplayImpl>
◆ getWidth()
template<auto Context, template< auto > typename DisplayImpl>
◆ init()
template<auto Context, template< auto > typename DisplayImpl>
◆ reset()
template<auto Context, template< auto > typename DisplayImpl>
◆ setPalette()
template<auto Context, template< auto > typename DisplayImpl>
◆ turnOff()
template<auto Context, template< auto > typename DisplayImpl>
◆ turnOn()
template<auto Context, template< auto > typename DisplayImpl>
The documentation for this struct was generated from the following file: