HGL::ImageOutput::ICanvas Interface Reference
[Image output plugins]

Interface for rendering images to concrete file formats. More...

#include <icanvas.h>

List of all members.

Classes

struct  _transformationInfo
 This structure holds the calculated transformation info. More...
struct  RGB
 Structure representing a color. More...
struct  RGBA
 Structure representing a color. More...

Public Types

typedef struct
HGL::ImageOutput::ICanvas::_transformationInfo 
TRANSFORMATIONINFO
 This structure holds the calculated transformation info.

Public Member Functions

virtual ~ICanvas ()
 Destructor.
Dimensions



virtual bool doExplicitScale () const =0
 Determines if explicit scale should be enabled.
virtual uint16_t getHeight () const =0
 Gets the height of the canvas.
virtual uint16_t getWidth () const =0
 Gets the width of the canvas.
Data access



virtual HGL::Type::IProject * getProject () const =0
 Gets the complete processed project.
virtual const std::vector< RGBAgetRow (uint16_t row) const =0
 Gets a row of the canvas as vector of colors.

Protected Member Functions

 ICanvas ()
 Constructor.

Color management



typedef std::set< RGBACOLORSPACE
 A colorspace set.
virtual const RGBAgetBackgroundColor () const =0
 Gets the background color of the ICanvas.
virtual const COLORSPACE getColorSpace () const =0
 Gets a sorted set with all unique colors in the current ICanvas.
virtual int getSCQColors () const =0
 Returns the amount of colors for spatial color quantization.
virtual bool isBackground (uint16_t x, uint16_t y) const =0
 Checks if the given position is the unaltered background.

Detailed Description

Interface for rendering images to concrete file formats.

Author:
Heiko Schäfer <heiko@hgl.rangun.de> BSD License
Examples:

exampleoutput.cpp, and exampleoutput.h.


Member Typedef Documentation

A colorspace set.

Since:
0.5.5

Constructor & Destructor Documentation

virtual HGL::ImageOutput::ICanvas::~ICanvas (  )  [virtual]

Destructor.

HGL::ImageOutput::ICanvas::ICanvas (  )  [protected]

Constructor.


Member Function Documentation

virtual bool HGL::ImageOutput::ICanvas::doExplicitScale (  )  const [pure virtual]

Determines if explicit scale should be enabled.

Explicit scale is enabled if either the 'w' or 'h' option or both are given on the command line. If not the default values for width and height are taken and this function returns false.

Returns:
bool true if the output image should get scaled explicitely, false otherwise
Since:
0.5.2
virtual const RGBA& HGL::ImageOutput::ICanvas::getBackgroundColor (  )  const [pure virtual]

Gets the background color of the ICanvas.

Returns:
the background color of the ICanvas
Since:
0.5.14
virtual const COLORSPACE HGL::ImageOutput::ICanvas::getColorSpace (  )  const [pure virtual]

Gets a sorted set with all unique colors in the current ICanvas.

Returns:
a set with unique color indices
See also:
RGBA::getColorIndex() const
COLORSPACEINDEX(colorspace, index)
Since:
0.4.49
virtual uint16_t HGL::ImageOutput::ICanvas::getHeight (  )  const [pure virtual]

Gets the height of the canvas.

Returns:
the height in pixels
virtual HGL::Type::IProject* HGL::ImageOutput::ICanvas::getProject (  )  const [pure virtual]

Gets the complete processed project.

Returns:
the complete processed project
Since:
0.5.21
virtual const std::vector<RGBA> HGL::ImageOutput::ICanvas::getRow ( uint16_t  row  )  const [pure virtual]

Gets a row of the canvas as vector of colors.

Parameters:
row number of the row
Returns:
an vector of colors of getWidth() size
virtual int HGL::ImageOutput::ICanvas::getSCQColors (  )  const [pure virtual]

Returns the amount of colors for spatial color quantization.

Returns:
the amount of colors or 0 if no spatial color quantization is requested
Since:
0.4.50
virtual uint16_t HGL::ImageOutput::ICanvas::getWidth (  )  const [pure virtual]

Gets the width of the canvas.

Returns:
the width in pixels
virtual bool HGL::ImageOutput::ICanvas::isBackground ( uint16_t  x,
uint16_t  y 
) const [pure virtual]

Checks if the given position is the unaltered background.

Parameters:
x the x-coordinate
y the y-coordinate
Returns:
true if the background is unaltered, false otherwise
Since:
0.5.14

Generated on 9 Apr 2014 for hgl 0.5.26~svn by  doxygen 1.6.1