MGD::DEVICE_RASTER_COLORMAPPED Class Reference

#include <mi32/mg2rastc.h>

Inheritance diagram for MGD::DEVICE_RASTER_COLORMAPPED:

Inheritance graph
[legend]
List of all members.

Public Types

enum  COLORPOLICY { COLORPOLICY_UseClosest = 0, COLORPOLICY_AddColor = 1, COLORPOLICY_Transparent = 2, COLORPOLICY_Fallback = 3 }

Public Member Functions

ERRVALUE Create (const RVC::OBJITEM &ObjItem, RVC::RASTER::MAKEPARMS &MakeParms, const SIMPLE_ARRAY< COLOR > &cmap, const char *Source=0)
 DEVICE_RASTER_COLORMAPPED ()
ERRVALUE Open (const RVC::OBJITEM &ObjItem)
void SetColorPolicy (COLORPOLICY policy)
void SetFallbackPixel (PIXEL pixel)
virtual ~DEVICE_RASTER_COLORMAPPED ()

Private Member Functions

virtual CONTEXTv_CreateContext ()
virtual ERRVALUE v_Flush ()
virtual PIXEL v_GetColorPixel (const COLOR &color)
virtual COLORSPACE v_GetColorSpace () const
virtual void v_GetPixelColor (PIXEL pixel, COLOR &color) const

Member Enumeration Documentation

enum MGD::DEVICE_RASTER_COLORMAPPED::COLORPOLICY
 

How to deal with SetColor() if the color isn't in the colormap.

Enumeration values:
COLORPOLICY_UseClosest  Use the closest matching color.
COLORPOLICY_AddColor  Add the color to the colormap (falls back to UseClosest once colormap is full).
COLORPOLICY_Transparent  Treat it as a transparent color.
COLORPOLICY_Fallback  Fallback to value set via SetFallbackPixel() (default = 0).

Definition at line 49 of file mg2rastc.h.


Constructor & Destructor Documentation

MGD::DEVICE_RASTER_COLORMAPPED::DEVICE_RASTER_COLORMAPPED  ) 
 

Construct a colormapped raster device.

After constructing, you should call Create()

virtual MGD::DEVICE_RASTER_COLORMAPPED::~DEVICE_RASTER_COLORMAPPED  )  [virtual]
 

Destructor.


Member Function Documentation

ERRVALUE MGD::DEVICE_RASTER_COLORMAPPED::Create const RVC::OBJITEM ObjItem,
RVC::RASTER::MAKEPARMS MakeParms,
const SIMPLE_ARRAY< COLOR > &  cmap,
const char *  Source = 0
 

Create a raster to draw into To draw into an existing raster, call Open.

Parameters:
cmap  Initial colormap

ERRVALUE MGD::DEVICE_RASTER_COLORMAPPED::Open const RVC::OBJITEM ObjItem  ) 
 

Open a raster to draw into.

To draw into an existing raster, call Open

Reimplemented from MGD::DEVICE_RASTER_GRAY8.

void MGD::DEVICE_RASTER_COLORMAPPED::SetColorPolicy COLORPOLICY  policy  )  [inline]
 

Definition at line 79 of file mg2rastc.h.

void MGD::DEVICE_RASTER_COLORMAPPED::SetFallbackPixel PIXEL  pixel  )  [inline]
 

Set the pixel value to fallback to if using COLORPOLICY_Fallback.

Definition at line 86 of file mg2rastc.h.

virtual CONTEXT* MGD::DEVICE_RASTER_COLORMAPPED::v_CreateContext  )  [private, virtual]
 

Create a GC for drawing.

Derived classes may override this and make it return anything derived from MGD_GC. MGD_GC's constructor is private, so this is the only way for calling code to create a GC.

Reimplemented from MGD::DEVICE_RASTER_GRAY8.

virtual ERRVALUE MGD::DEVICE_RASTER_COLORMAPPED::v_Flush  )  [private, virtual]
 

Called by WritePixArray just before it starts writing Colormapped derived class can use this to update colormap.

Reimplemented from MGD::DEVICE_RASTER_GRAY8.

virtual PIXEL MGD::DEVICE_RASTER_COLORMAPPED::v_GetColorPixel const COLOR color  )  [private, virtual]
 

Given a color, return the pixel value that matches or is as close as possible.

Reimplemented from MGD::DEVICE_MEM8G.

virtual COLORSPACE MGD::DEVICE_RASTER_COLORMAPPED::v_GetColorSpace  )  const [inline, private, virtual]
 

We fake it and look up the color later

Reimplemented from MGD::DEVICE_MEM8G.

Definition at line 119 of file mg2rastc.h.

virtual void MGD::DEVICE_RASTER_COLORMAPPED::v_GetPixelColor PIXEL  pixel,
COLOR color
const [private, virtual]
 

Given a pixel value, return the color it represents.

This should NOT take ICM into account. The context will translate the color back through the inverse ICM transform (if any)

Reimplemented from MGD::DEVICE_MEM8G.


The documentation for this class was generated from the following file:
Generated on Tue Dec 14 13:20:40 2004 for TNTsdk by  doxygen 1.3.8-20040913