#include <MipiDisplay.h>
Public Member Functions | |
MipiSurface (MipiDisplay &display, size_t bufferSize) | |
Type | getType () const |
Stat | stat () const override |
void | reset () override |
Reset surface ready for more commands. More... | |
Size | getSize () const override |
PixelFormat | getPixelFormat () const override |
bool | setAddrWindow (const Rect &rect) override |
uint8_t * | getBuffer (uint16_t minBytes, uint16_t &available) override |
void | commit (uint16_t length) override |
bool | blockFill (const void *data, uint16_t length, uint32_t repeat) override |
bool | writeDataBuffer (SharedBuffer &data, size_t offset, uint16_t length) override |
bool | setPixel (PackedColor color, Point pt) override |
int | readDataBuffer (ReadBuffer &buffer, ReadStatus *status, ReadCallback callback, void *param) override |
Read some pixels. More... | |
bool | render (const Object &object, const Rect &location, std::unique_ptr< Renderer > &renderer) override |
Start rendering an object. More... | |
bool | present (PresentCallback callback, void *param) override |
Present surface to display device. More... | |
![]() | |
void | write (MetaWriter &meta) const override |
virtual bool | writePixels (const void *data, uint16_t length) |
bool | writePixel (PackedColor color) |
bool | writePixel (Color color) |
virtual int | readDataBuffer (ReadStatusBuffer &buffer, ReadCallback callback=nullptr, void *param=nullptr) |
bool | render (const Object &object, const Rect &location) |
Render an object in one cycle. More... | |
bool | execute (std::unique_ptr< Renderer > &renderer) |
Execute a renderer. More... | |
uint16_t | width () const |
uint16_t | height () const |
bool | blockFill (PackedColor color, uint32_t repeat) |
bool | clear () |
virtual bool | fillRect (PackedColor color, const Rect &rect) |
bool | fillSmallRect (const Brush &brush, const Rect &location, const Rect &rect) |
Fill a small rectangle using a non-transparent brush. More... | |
bool | drawHLine (PackedColor color, uint16_t x0, uint16_t x1, uint16_t y, uint16_t w) |
Draw a simple horizontal line using a filled rectangle. More... | |
bool | drawVLine (PackedColor color, uint16_t x, uint16_t y0, uint16_t y1, uint16_t w) |
Draw a simple vertical line using a filled rectangle. More... | |
![]() | |
virtual Type | type () const override |
Asset () | |
Asset (ID id) | |
![]() | |
Asset () | |
Asset (ID id) | |
bool | operator== (ID id) const |
ID | id () const |
virtual Type | type () const =0 |
virtual String | getTypeStr () const |
![]() | |
Asset * | getNext () const |
bool | insertAfter (Asset *object) |
Iterator | begin () const |
Iterator | end () const |
Iterator | cbegin () const |
Iterator | cend () const |
![]() | |
virtual | ~LinkedObject () |
virtual LinkedObject * | next () const |
bool | insertAfter (LinkedObject *object) |
bool | operator== (const LinkedObject &other) const |
bool | operator!= (const LinkedObject &other) const |
Protected Attributes | |
MipiDisplay & | display |
SpiDisplayList | displayList |
Additional Inherited Members | |
![]() | |
enum | Type { Type::Memory, Type::File, Type::Device, Type::Drawing, Type::Blend } |
using | List = LinkedObjectListTemplate< Surface > |
using | OwnedList = OwnedLinkedObjectListTemplate< Surface > |
using | PresentCallback = void(*)(void *param) |
using | ReadCallback = void(*)(ReadBuffer &data, size_t length, void *param) |
Callback for readPixel() operations. More... | |
![]() | |
enum | Type { Type::XX } |
using | List = LinkedObjectListTemplate< Asset > |
using | OwnedList = OwnedLinkedObjectListTemplate< Asset > |
using | ID = AssetID |
![]() | |
using | Iterator = IteratorTemplate< Asset, Asset *, Asset & > |
using | ConstIterator = IteratorTemplate< const Asset, const Asset *, const Asset & > |
![]() | |
static constexpr size_t | READ_PIXEL_SIZE {3} |
![]() | |
static constexpr Asset::Type | assetType |
Constructor & Destructor Documentation
◆ MipiSurface()
Graphics::MipiSurface::MipiSurface | ( | MipiDisplay & | display, |
size_t | bufferSize | ||
) |
Member Function Documentation
◆ blockFill()
|
inlineoverridevirtual |
Implements Graphics::Surface.
◆ commit()
|
inlineoverridevirtual |
Implements Graphics::Surface.
◆ getBuffer()
|
inlineoverridevirtual |
Implements Graphics::Surface.
◆ getPixelFormat()
|
inlineoverridevirtual |
Implements Graphics::Surface.
◆ getSize()
|
inlineoverridevirtual |
Implements Graphics::Surface.
◆ getType()
|
inlinevirtual |
Implements Graphics::Surface.
◆ present()
|
overridevirtual |
Present surface to display device.
- Parameters
-
callback Invoked when surface is available for more commands param Passed to callback
- Return values
-
bool true If callback has been queued, false if surface is empty
Hardware devices will queue buffered commands to the display device then return. The surface will be marked as BUSY. Attempting to call present() on a BUSY surface must return true. If surface is EMPTY (no buffered commands), must return false.
Implements Graphics::Surface.
◆ readDataBuffer()
|
overridevirtual |
Read some pixels.
- Parameters
-
buffer Details requested format and buffer to read status Optional. Stores result of read operation. callback Optional. Invoked when read has completed param Parameters passed to callback
- Return values
-
int Number of pixels queued for reading (or read); 0 if no further pixels to read, < 0 to try again later
Call setAddrWindow
to set up region to be read. Returns true when all pixels have been queued for reading.
Implements Graphics::Surface.
◆ render()
|
overridevirtual |
Start rendering an object.
- Parameters
-
object What to render location Placement information renderer If operation cannot be completed in hardware, create a renderer instance to manage the process
- Return values
-
Return true on success, false to retry later
Surfaces may override this method to implement alternative rendering using specific hardware features of the display device.
Software renderers should be run by calling surface::execute
.
Reimplemented from Graphics::Surface.
◆ reset()
|
inlineoverridevirtual |
Reset surface ready for more commands.
Implements Graphics::Surface.
◆ setAddrWindow()
Implements Graphics::Surface.
◆ setPixel()
|
inlineoverridevirtual |
Implements Graphics::Surface.
◆ stat()
|
inlineoverridevirtual |
Implements Graphics::Surface.
◆ writeDataBuffer()
|
inlineoverridevirtual |
Implements Graphics::Surface.
Member Data Documentation
◆ display
|
protected |
◆ displayList
|
protected |
The documentation for this class was generated from the following file: