Graphics::Resource Namespace Reference

Classes

struct  GlyphResource
 Describes glyph bitmap and position. More...
 
struct  GlyphBlock
 Identifies a run of unicode characters. More...
 
struct  TypefaceResource
 
struct  FontResource
 
struct  ImageResource
 

Functions

void init (IDataSourceStream *stream)
 Application calls this method to set source for graphics resourcess. More...
 
IDataSourceStreamcreateSubStream (uint32_t offset, size_t size)
 Graphics objects call this method to obtain access to resource data. More...
 

Function Documentation

◆ createSubStream()

IDataSourceStream* Graphics::Resource::createSubStream ( uint32_t  offset,
size_t  size 
)

Graphics objects call this method to obtain access to resource data.

Parameters
offsetLocation within resource stream
sizeSize of data BLOB

The resource compiler generates a header file containing resource descriptions. The application passes this to the appropriate object constructor, which in turn calls this function to access the related binary data (e.g. font or image bitmaps).

◆ init()

void Graphics::Resource::init ( IDataSourceStream stream)

Application calls this method to set source for graphics resourcess.

Parameters
streamWhere to obtain resource data from

Graphics resource data such is compiled into a single binary file which the application must mount in some way (typically as a dedicated partition), then create a stream so the graphics library can access it.