Virtual base class for an image. More...
#include <Object.h>
Public Member Functions | |
| ImageObject (Size size) | |
| void | write (MetaWriter &meta) const override |
| Renderer * | createRenderer (const Location &location) const override |
| Create a software renderer for this object. More... | |
| Size | getSize () const |
| uint16_t | width () const |
| uint16_t | height () const |
| virtual bool | init ()=0 |
| Initialise the object, e.g. parse header content and obtain dimensions. More... | |
| virtual PixelFormat | getPixelFormat () const =0 |
| Get native pixel format. More... | |
| virtual size_t | readPixels (const Location &loc, PixelFormat format, void *buffer, uint16_t width) const =0 |
| Read pixels in requested format. More... | |
Public Member Functions inherited from Graphics::ObjectTemplate< Object::Kind::Image > | |
| Kind | kind () const override |
Public Member Functions inherited from Graphics::Object | |
| virtual Kind | kind () const =0 |
| bool | operator== (const Object &other) const |
| virtual String | getTypeStr () const |
Public Member Functions inherited from LinkedObjectTemplate< Object > | |
| Object * | getNext () const |
| bool | insertAfter (Object *object) |
| Iterator | begin () const |
| Iterator | end () const |
| Iterator | cbegin () const |
| Iterator | cend () const |
Public Member Functions inherited from LinkedObject | |
| virtual | ~LinkedObject () |
| virtual LinkedObject * | next () const |
| bool | insertAfter (LinkedObject *object) |
| bool | operator== (const LinkedObject &other) const |
| bool | operator!= (const LinkedObject &other) const |
Protected Attributes | |
| Size | imageSize {} |
Additional Inherited Members | |
Public Types inherited from Graphics::Object | |
| enum | Kind { Kind::XX } |
| using | List = LinkedObjectListTemplate< Object > |
| using | OwnedList = OwnedLinkedObjectListTemplate< Object > |
Public Types inherited from LinkedObjectTemplate< Object > | |
| using | Iterator = IteratorTemplate< Object, Object *, Object & > |
| using | ConstIterator = IteratorTemplate< const Object, const Object *, const Object & > |
Detailed Description
Virtual base class for an image.
Constructor & Destructor Documentation
◆ ImageObject()
|
inline |
Member Function Documentation
◆ createRenderer()
Create a software renderer for this object.
- Parameters
-
location
- Return values
-
renderer Returned renderer object
Return nullptr if object cannot/should not be rendered
Implements Graphics::Object.
◆ getPixelFormat()
|
pure virtual |
Get native pixel format.
- Return values
-
PixelFormat Return None if ambivalent about format (e.g. calculated pixel data)
Implemented in Graphics::GlyphObject, Graphics::FileImageObject, Graphics::MemoryImageObject, Graphics::RawImageObject, and Graphics::BitmapObject.
◆ getSize()
|
inline |
◆ height()
|
inline |
◆ init()
|
pure virtual |
Initialise the object, e.g. parse header content and obtain dimensions.
Implemented in Graphics::RawImageObject, Graphics::BitmapObject, and Graphics::LcdGlyph.
◆ readPixels()
|
pure virtual |
Read pixels in requested format.
- Parameters
-
loc Start position format Required pixel format buffer Buffer for pixels width Number of pixels to read
- Return values
-
size_t Number of bytes written
Implemented in Graphics::GlyphObject, Graphics::RawImageObject, and Graphics::BitmapObject.
◆ width()
|
inline |
◆ write()
|
inlineoverridevirtual |
Implements Graphics::Object.
Reimplemented in Graphics::RawImageObject, Graphics::BitmapObject, and Graphics::StreamImageObject.
Member Data Documentation
◆ imageSize
|
protected |
The documentation for this class was generated from the following file:
Public Member Functions inherited from
1.8.17