Image whose contents are stored in a stream, typically in a file or flash memory. More...

#include <Object.h>

Inheritance diagram for Graphics::StreamImageObject:
Collaboration diagram for Graphics::StreamImageObject:

Public Member Functions

 StreamImageObject (IDataSourceStream *source, Size size)
 
 StreamImageObject (const FSTR::String &image)
 
void write (MetaWriter &meta) const override
 
- Public Member Functions inherited from Graphics::ImageObject
 ImageObject (Size size)
 
RenderercreateRenderer (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
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 LinkedObjectnext () const
 
bool insertAfter (LinkedObject *object)
 
bool operator== (const LinkedObject &other) const
 
bool operator!= (const LinkedObject &other) const
 

Protected Member Functions

void seek (uint32_t offset) const
 
void read (void *buffer, size_t length) const
 

Protected Attributes

std::unique_ptr< IDataSourceStreamstream
 
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 & >
 

Detailed Description

Image whose contents are stored in a stream, typically in a file or flash memory.

Constructor & Destructor Documentation

◆ StreamImageObject() [1/2]

Graphics::StreamImageObject::StreamImageObject ( IDataSourceStream source,
Size  size 
)
inline

◆ StreamImageObject() [2/2]

Graphics::StreamImageObject::StreamImageObject ( const FSTR::String image)
inline

Member Function Documentation

◆ read()

void Graphics::StreamImageObject::read ( void *  buffer,
size_t  length 
) const
inlineprotected

◆ seek()

void Graphics::StreamImageObject::seek ( uint32_t  offset) const
inlineprotected

◆ write()

void Graphics::StreamImageObject::write ( MetaWriter meta) const
inlineoverridevirtual

Reimplemented from Graphics::ImageObject.

Reimplemented in Graphics::RawImageObject, and Graphics::BitmapObject.

Member Data Documentation

◆ stream

std::unique_ptr<IDataSourceStream> Graphics::StreamImageObject::stream
protected

◆ streamPos

uint32_t Graphics::StreamImageObject::streamPos {}
mutableprotected

The documentation for this class was generated from the following file: