MATTE Class Reference

#include <mi32/matte.h>

Inheritance diagram for MATTE:
Inheritance graph
[legend]

List of all members.

Classes

class  FORM
 User interface form for MATTE settins. More...

Public Types

enum  BORDER {
  BORDER_None = 0, BORDER_Solid = 1, BORDER_Double = 2, BORDER_Inset = 3,
  BORDER_Outset = 4, BORDER_Groove = 5, BORDER_Ridge = 6, BORDER_EtchedIn = 7,
  BORDER_EtchedOut = 8, BORDER_Rounded = 9, BORDER_CartoScript = 10
}
enum  DRAWFLAGS { DRAWFLAG_None = 0, DRAWFLAG_DrawInsideExtents = 0x00000001 }
enum  FILLMODE { FILLMODE_None = 0, FILLMODE_Solid = 1, FILLMODE_Gradient, FILLMODE_Radial }
enum  SPREADMODE {
  SPREADMODE_RGB = 0, SPREADMODE_HISCW, SPREADMODE_HISCCW, SPREADMODE_HBSCW,
  SPREADMODE_HBSCCW
}

Public Member Functions

 MATTE (const MATTE &)
 MATTE ()
virtual ~MATTE ()
ERRVALUE Draw (MGD::CONTEXT &gc, const LRECT2D &rect, double MapScale=1.0, DRAWFLAGS flags=DRAWFLAG_None)
ERRVALUE DrawBackground (MGD::CONTEXT &gc, const LRECT2D &rect, double MapScale=1.0, DRAWFLAGS flags=DRAWFLAG_None)
ERRVALUE DrawBorder (MGD::CONTEXT &gc, const LRECT2D &rect, double MapScale=1.0, DRAWFLAGS flags=DRAWFLAG_None)
ERRVALUE DrawDropShadow (MGD::CONTEXT &gc, const LRECT2D &rect, double MapScale=1.0, DRAWFLAGS flags=DRAWFLAG_None)
const COLORGetBackgroundColor () const
const COLORGetBackgroundColor2 () const
FILLMODE GetBackgroundFillMode () const
double GetBackgroundGradientAngle () const
SPREADMODE GetBackgroundGradientSpreadMode () const
const MISTRINGGetBorderCartoScript () const
const COLORGetBorderColor () const
double GetBorderSize () const
BORDER GetBorderStyle () const
SCREENUNIT GetDisplayUnits () const
bool GetDropShadowBlend () const
const COLORGetDropShadowColor () const
double GetDropShadowDirection () const
double GetDropShadowSize () const
void GetExtraExtents (double &x1, double &y1, double &x2, double &y2) const
double GetMarginBottom () const
double GetMarginLeft () const
double GetMarginRight () const
double GetMarginTop () const
bool IsBorderRoundedRect () const
bool NeedsTransparency () const
MATTEoperator= (const MATTE &rhs)
virtual ERRVALUE SerialRead (SERIALIZER &serializer)
virtual ERRVALUE SerialWrite (SERIALIZER &serializer, const char *tagname) const
void SetBackgroundColor (const COLOR &color)
void SetBackgroundColor2 (const COLOR &color)
void SetBackgroundFillMode (FILLMODE mode)
void SetBackgroundGradientAngle (double angle)
void SetBackgroundGradientSpreadMode (SPREADMODE mode)
void SetBorderCartoScript (const MISTRING &script)
void SetBorderColor (const COLOR &color)
void SetBorderIsRoundedRect (bool bRound)
void SetBorderSize (double size)
void SetBorderStyle (BORDER style)
void SetDirtyBackground ()
void SetDisplayUnits (SCREENUNIT units)
void SetDropShadowBlend (bool blend)
void SetDropShadowColor (const COLOR &color)
void SetDropShadowDirection (double dir)
void SetDropShadowSize (double size)
void SetMarginBottom (double dist)
void SetMarginLeft (double dist)
void SetMarginRight (double dist)
void SetMarginsInset (bool inset)
void SetMarginTop (double dist)
void SetSolidBackground (const COLOR &color)
bool WillDraw () const

Member Enumeration Documentation

Enumerator:
BORDER_None 
BORDER_Solid 
BORDER_Double 
BORDER_Inset 
BORDER_Outset 
BORDER_Groove 
BORDER_Ridge 
BORDER_EtchedIn 
BORDER_EtchedOut 
BORDER_Rounded 
BORDER_CartoScript 
Enumerator:
DRAWFLAG_None 
DRAWFLAG_DrawInsideExtents 
Enumerator:
FILLMODE_None 
FILLMODE_Solid 
FILLMODE_Gradient 
FILLMODE_Radial 
Enumerator:
SPREADMODE_RGB 
SPREADMODE_HISCW 
SPREADMODE_HISCCW 
SPREADMODE_HBSCW 
SPREADMODE_HBSCCW 

Constructor & Destructor Documentation

MATTE::MATTE (  ) 

Constructor.

MATTE::MATTE ( const MATTE  ) 

Copy Constructor.

virtual MATTE::~MATTE (  )  [virtual]

Destructor.


Member Function Documentation

ERRVALUE MATTE::Draw ( MGD::CONTEXT gc,
const LRECT2D rect,
double  MapScale = 1.0,
DRAWFLAGS  flags = DRAWFLAG_None 
)

Draw the background, border and dropshadow The rectangle should be in output device coordinates and NOT include the margins, border or drop shadow.

They will all extend out from this rectangle

ERRVALUE MATTE::DrawBackground ( MGD::CONTEXT gc,
const LRECT2D rect,
double  MapScale = 1.0,
DRAWFLAGS  flags = DRAWFLAG_None 
)

Fill in the background based on background settings The rectangle should be in output device coordinates and NOT include the margins, border or drop shadow.

They will all extend out from this rectangle

ERRVALUE MATTE::DrawBorder ( MGD::CONTEXT gc,
const LRECT2D rect,
double  MapScale = 1.0,
DRAWFLAGS  flags = DRAWFLAG_None 
)

Draw in the border The rectangle should be in output device coordinates and NOT include the margins, border or drop shadow.

They will all extend out from this rectangle

ERRVALUE MATTE::DrawDropShadow ( MGD::CONTEXT gc,
const LRECT2D rect,
double  MapScale = 1.0,
DRAWFLAGS  flags = DRAWFLAG_None 
)

Draw the drop shadow The rectangle should be in output device coordinates and NOT include the margins, border or drop shadow.

They will all extend out from this rectangle

const COLOR& MATTE::GetBackgroundColor (  )  const [inline]

Return the primary background fill color.

const COLOR& MATTE::GetBackgroundColor2 (  )  const [inline]

Return the secondary background fill color (used for gradiant fills).

FILLMODE MATTE::GetBackgroundFillMode (  )  const [inline]

Return the background fill mode.

double MATTE::GetBackgroundGradientAngle (  )  const [inline]
SPREADMODE MATTE::GetBackgroundGradientSpreadMode (  )  const [inline]
const MISTRING& MATTE::GetBorderCartoScript (  )  const [inline]
const COLOR& MATTE::GetBorderColor (  )  const [inline]

Get the color of the border.

double MATTE::GetBorderSize (  )  const [inline]

Get the size (in mm at output scale ) of the border.

BORDER MATTE::GetBorderStyle (  )  const [inline]

Get the border style.

SCREENUNIT MATTE::GetDisplayUnits (  )  const [inline]

Return the units the user wants to see sizes in note that sizes are always stored in mm at output scale.

bool MATTE::GetDropShadowBlend (  )  const [inline]

Get whether or not the drop shadow is drawing with a Gaussian blend.

const COLOR& MATTE::GetDropShadowColor (  )  const [inline]

Get the color of the drop shadow.

double MATTE::GetDropShadowDirection (  )  const [inline]

Get the direction (in radians) of the drop shadow.

double MATTE::GetDropShadowSize (  )  const [inline]

Get the size (in mm at output scale) of the drop shadow.

void MATTE::GetExtraExtents ( double &  x1,
double &  y1,
double &  x2,
double &  y2 
) const

Return the extents of the shadow and border (in mm at output scale ).

Computes how far outside any rectangle the drawing will extend.

double MATTE::GetMarginBottom (  )  const [inline]

Return the bottom margin (in mm at output scale).

double MATTE::GetMarginLeft (  )  const [inline]

Return the left margin (in mm at output scale).

double MATTE::GetMarginRight (  )  const [inline]

Return the right margin (in mm at output scale).

double MATTE::GetMarginTop (  )  const [inline]

Return the top margin (in mm at output scale).

bool MATTE::IsBorderRoundedRect (  )  const [inline]
bool MATTE::NeedsTransparency (  )  const

Determine if anything in the background or drop shadow will require it to make use of transparency effects in the display.

MATTE& MATTE::operator= ( const MATTE rhs  ) 
virtual ERRVALUE MATTE::SerialRead ( SERIALIZER serializer  )  [virtual]

virtual methods of SERIALIZABLE

Implements SERIALIZABLE.

virtual ERRVALUE MATTE::SerialWrite ( SERIALIZER serializer,
const char *  tagname 
) const [virtual]

Write object to serialization.

This method must write the tag name provided, using SERIALIZER::PutBegin(). If the tagname is 0 (default) then it must determine the proper tag name to write. After writing the object this method must write the ending tag using SERIALIZER::PutEnd(). When inheriting this interface, the default value of 0 for the tag name must NOT be redefined. (See Meyers, Effective C++, item #38) A default implementation is not possible due to multiple inheritance resulting in a different "this" pointer being passed than the actual object, which causes the offset values in the ITEMDEF arrays to be wrong.

Implements SERIALIZABLE.

void MATTE::SetBackgroundColor ( const COLOR color  )  [inline]

Set the primary background fill color.

void MATTE::SetBackgroundColor2 ( const COLOR color  )  [inline]

Set the secondary background fill color (used for gradiant fills).

void MATTE::SetBackgroundFillMode ( FILLMODE  mode  )  [inline]

Set the background fill mode.

void MATTE::SetBackgroundGradientAngle ( double  angle  )  [inline]
void MATTE::SetBackgroundGradientSpreadMode ( SPREADMODE  mode  )  [inline]
void MATTE::SetBorderCartoScript ( const MISTRING script  )  [inline]
void MATTE::SetBorderColor ( const COLOR color  )  [inline]

Get the color of the border.

void MATTE::SetBorderIsRoundedRect ( bool  bRound  )  [inline]

Set the border to be a rounded rectangle.

If this is set, corners of the border will be rounded. The radius of the rounding is equal to the margin distances.

void MATTE::SetBorderSize ( double  size  )  [inline]

Get the size (in mm at output scale) of the border.

void MATTE::SetBorderStyle ( BORDER  style  )  [inline]

Get the border style.

void MATTE::SetDirtyBackground (  )  [inline]

Clears the effects of SetSolidBackground().

void MATTE::SetDisplayUnits ( SCREENUNIT  units  )  [inline]

Set the units the user wants to see sizes in note that sizes are always stored in mm at output scale.

void MATTE::SetDropShadowBlend ( bool  blend  )  [inline]

Set whether or not the drop shadow is drawing with a Gaussian blend.

void MATTE::SetDropShadowColor ( const COLOR color  )  [inline]

Get the color of the drop shadow.

void MATTE::SetDropShadowDirection ( double  dir  )  [inline]

Get the direction (in radians) of the drop shadow.

void MATTE::SetDropShadowSize ( double  size  )  [inline]

Get the size (in mm at output scale) of the drop shadow.

void MATTE::SetMarginBottom ( double  dist  )  [inline]

Set the bottom margin (in mm at output scale).

void MATTE::SetMarginLeft ( double  dist  )  [inline]

Set the left margin (in mm at output scale).

void MATTE::SetMarginRight ( double  dist  )  [inline]

Set the right margin (in mm at output scale).

void MATTE::SetMarginsInset ( bool  inset  )  [inline]
void MATTE::SetMarginTop ( double  dist  )  [inline]

Set the top margin (in mm at output scale).

void MATTE::SetSolidBackground ( const COLOR color  )  [inline]

Tell the matte that the background is a solid color.

This is NOT the background you want the matte to draw. This is to allow an optimization of transparency blending effects if it is known that we're blending over a white (or other solid color) background.

bool MATTE::WillDraw (  )  const

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

Generated on Sun Oct 7 21:33:34 2012 for TNTsdk 2012 by  doxygen 1.6.1