Graphics::RawImageObject Class Reference
Image stored as raw pixels in a specific format. More...
#include <Object.h>
Inheritance diagram for Graphics::RawImageObject:
Collaboration diagram for Graphics::RawImageObject:
Public Member Functions | |
| RawImageObject (IDataSourceStream *image, PixelFormat format, Size size) | |
| RawImageObject (const FSTR::String &image, PixelFormat format, Size size) | |
| RawImageObject (const Resource::ImageResource &image) | |
| void | write (MetaWriter &meta) const override |
| bool | init () override |
| Initialise the object, e.g. parse header content and obtain dimensions. More... | |
| PixelFormat | getPixelFormat () const override |
| Get native pixel format. More... | |
| size_t | readPixels (const Location &loc, PixelFormat format, void *buffer, uint16_t width) const override |
| Read pixels in requested format. More... | |
Public Member Functions inherited from Graphics::StreamImageObject | |
| StreamImageObject (IDataSourceStream *source, Size size) | |
| StreamImageObject (const FSTR::String &image) | |
Public Member Functions inherited from Graphics::ImageObject | |
| ImageObject (Size size) | |
| 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 |
Public Member Functions inherited from Graphics::ObjectTemplate< Object::Kind::Image > | |
| Kind | kind () const override |
Public Member Functions inherited from Graphics::Object | |
| 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 ()=default |
| virtual LinkedObject * | next () const |
| bool | insertAfter (LinkedObject *object) |
| bool | operator== (const LinkedObject &other) const |
| bool | operator!= (const LinkedObject &other) const |
Protected Attributes | |
| PixelFormat | pixelFormat |
Protected Attributes inherited from Graphics::StreamImageObject | |
| std::unique_ptr< IDataSourceStream > | stream |
| uint32_t | streamPos {} |
Protected Attributes inherited from Graphics::ImageObject | |
| Size | imageSize {} |
Additional Inherited Members | |
Public Types inherited from Graphics::Object | |
| enum class | 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 & > |
Protected Member Functions inherited from Graphics::StreamImageObject | |
| void | seek (uint32_t offset) const |
| void | read (void *buffer, size_t length) const |
Detailed Description
Image stored as raw pixels in a specific format.
Use images stored in native display format for best performance as no conversion is required.
Constructor & Destructor Documentation
◆ RawImageObject() [1/3]
|
inline |
◆ RawImageObject() [2/3]
|
inline |
◆ RawImageObject() [3/3]
|
inline |
Member Function Documentation
◆ getPixelFormat()
|
inlineoverridevirtual |
Get native pixel format.
- Return values
-
PixelFormat Return None if ambivalent about format (e.g. calculated pixel data)
Implements Graphics::ImageObject.
Reimplemented in Graphics::FileImageObject, and Graphics::MemoryImageObject.
◆ init()
|
inlineoverridevirtual |
Initialise the object, e.g. parse header content and obtain dimensions.
Implements Graphics::ImageObject.
◆ readPixels()
|
overridevirtual |
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
Implements Graphics::ImageObject.
◆ write()
|
inlineoverridevirtual |
Reimplemented from Graphics::StreamImageObject.
Member Data Documentation
◆ pixelFormat
|
protected |
The documentation for this class was generated from the following file:
Public Member Functions inherited from
1.9.1