This abstract class provides the ability to render the binary data of specific type into Draw output. Each type of binary data has assigned id, which is used in the call to Draw::DrawData method, to this id there is corresponding registered (using DataDrawer::Register) class of DataDrawer. Draw::DrawData creates and instance of this class and uses it to render the binary data as one or more ImageBuffer pixel arrays.
Draw package predefines DataDrawer registered with id "image_data". This represents Image binary encoded with any encoding supported by actually included image format plugins like plugin/bmp or plugin/jpg.
virtual void Open(const String& data, int cx, int cy) = 0
Called to open data for processing, the output size being cx, cy.
virtual void Render(ImageBuffer& ib) = 0
Called to render the part (or all) of the result into ib. The width of ib is the same as specified in Open, the height is the required height of band to render.
static One<DataDrawer> Create(const String& id)
Creates a derived DataDrawer with type id.
static template <class T> void Register(const char *id)
This method registers specific DataDrawer derived class as renderer for type id.