|
CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
|
#include <MonoSurface.h>
Public Member Functions | |
| MonoSurface (uint16_t w, uint16_t h) | |
| Allocates a w x h 1-bpp surface in PSRAM, cleared to white. | |
| ~MonoSurface () override | |
| MonoSurface (const MonoSurface &)=delete | |
| MonoSurface & | operator= (const MonoSurface &)=delete |
| bool | ok () const |
| True when the buffer allocation succeeded. | |
| void | drawPixel (int16_t x, int16_t y, uint16_t color) override |
| void | clear () |
| Clears the surface to white. | |
| const uint8_t * | buffer () const |
| Packed pixel rows, strideBytes() * height() bytes. | |
| uint16_t | strideBytes () const |
| Bytes per packed row, (width + 7) / 8. | |
| size_t | byteSize () const |
| Total packed byte size. | |
Definition at line 20 of file MonoSurface.h.
| cdc::ui::MonoSurface::MonoSurface | ( | uint16_t | w, |
| uint16_t | h ) |
Allocates a w x h 1-bpp surface in PSRAM, cleared to white.
| w | Width in pixels. |
| h | Height in pixels. |
Definition at line 14 of file MonoSurface.cpp.
Referenced by MonoSurface(), and operator=().
|
override |
Definition at line 23 of file MonoSurface.cpp.
|
delete |
References MonoSurface().
|
inlinenodiscard |
Packed pixel rows, strideBytes() * height() bytes.
Definition at line 42 of file MonoSurface.h.
Referenced by cdc::ui::CanvasView::marquee().
|
inlinenodiscard |
Total packed byte size.
Definition at line 48 of file MonoSurface.h.
Referenced by clear(), and cdc::ui::CanvasView::marquee().
| void cdc::ui::MonoSurface::clear | ( | ) |
|
override |
Definition at line 27 of file MonoSurface.cpp.
|
inlinenodiscard |
True when the buffer allocation succeeded.
Definition at line 34 of file MonoSurface.h.
Referenced by cdc::ui::CanvasView::marquee().
|
delete |
References MonoSurface().
|
inlinenodiscard |
Bytes per packed row, (width + 7) / 8.
Definition at line 45 of file MonoSurface.h.