Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_Graphics_Imp Class Reference

Inheritance diagram for CP_Graphics_Imp:

CP_Graphics_Imp_Quartz List of all members.

State

virtual void SaveState ()
virtual void RestoreState ()
virtual void ScaleCTM (float, float)
virtual void TranslateCTM (float, float)
virtual void RotateCTM (float)
virtual void SkewCTM (float, float)

Gradient

virtual void DrawGradient (CP_E_GradientType, CP_Rect &)
virtual void SetGradientAngle (SInt16)
virtual void SetGradientColor (const SInt16, const CP_ARGBColor &)
virtual void SetGradientCount (SInt16)

Images

virtual void DrawImage (SInt16, CP_Rect &)
virtual void DrawImage (const CP_FileSystemSpec &, CP_Rect &)
virtual void DrawImage (const CP_FileSystemSpec &, CP_Rect &, CP_Rect &)
virtual void DrawPicture (CP_OSPicture &, const CP_Rect &)

Paths

virtual void BeginPath ()
virtual void ClosePath ()
virtual void StrokePath ()
virtual void FillPath ()
virtual void FillPath (CP_Pattern &)
virtual void DrawPath (CP_E_PathDrawingMode)
virtual void PathMoveTo (const CP_Point &)
virtual void PathMoveTo (float, float)
virtual void PathAddLineTo (const CP_Point &)
virtual void PathAddLines (const CP_Point[], SInt16)
virtual void PathAddLine (const CP_Point &, const CP_Point &)
virtual void PathAddLine (float, float, float, float)
virtual void PathAddRect (const CP_Rect &)
virtual void PathAddOval (const CP_Rect &)
virtual void PathAddBezier (const CP_Point &, const CP_Point &, const CP_Point &, const CP_Point &)
virtual void PathAddQuadBezier (const CP_Point &, const CP_Point &, const CP_Point &)
virtual void PathAddPoly (CP_Point_Array &)
virtual void PathAddArc (float, float, float, float, float, SInt16)
virtual void ClipPath ()

Rects

virtual void StrokeRect (const CP_Rect &)
virtual void EraseRect (const CP_Rect &)
virtual void FillRect (const CP_Rect &)

Text

virtual void SetTextRenderingFlags (SInt16)
virtual void DrawString (CP_FontSpec &, const CP_String &, const CP_Point &)
virtual void DrawText (CP_FontSpec &, const CP_String &, const CP_Rect &, SInt16, SInt16, bool)
virtual void DrawTrunc (CP_FontSpec &, const CP_String &, const CP_Rect &, SInt16, SInt16)

Public Member Functions

Constructor / Destructor
virtual ~CP_Graphics_Imp ()
 Destructor.
Setters
virtual void SetAlpha (float)
virtual void SetLineWidth (float)
virtual void SetLineJoin (CP_E_GraphicsLineJoin)
virtual void SetLineCap (CP_E_GraphicsLineCap)
virtual void SetStrokeColor (CP_ARGBColor &)
virtual void SetFillColor (CP_ARGBColor &)
Arcs
virtual void StrokeArc (float, float, float, float, float)
virtual void FillArc (float, float, float, float, float)
Bezier Curves
virtual void StrokeBezier (const CP_Point &, const CP_Point &, const CP_Point &, const CP_Point &)
virtual void StrokeQuadBezier (const CP_Point &, const CP_Point &, const CP_Point &)
Icon
virtual void DrawIcon (const CP_Rect &, CP_E_IconStyle, SInt16)
virtual void DrawIcon (CP_OSIcon &, const CP_Rect &)
Lines
virtual void Line (float, float, float, float)
Polygons
virtual void StrokePoly (CP_Point_Array &)
virtual void FillPoly (CP_Point_Array &)
Regions
virtual void StrokeRegion (const CP_Region &)
virtual void FillRegion (const CP_Region &)
Round Rects
virtual void StrokeRoundRect (const CP_Rect &, SInt16, SInt16)
virtual void FillRoundRect (const CP_Rect &, SInt16, SInt16)
Oval / Circle
virtual void StrokeOval (const CP_Rect &)
virtual void FillOval (const CP_Rect &)

Protected Member Functions

Construction / Destruction
 CP_Graphics_Imp (CP_Canvas &inDestCanvas)

Protected Attributes

CP_Canvas fDestCanvas
float fAlpha
float fLineWidth
CP_ARGBColor fStrokeColor
CP_ARGBColor fFillColor

Constructor & Destructor Documentation

CP_Graphics_Imp::~CP_Graphics_Imp  )  [virtual]
 

Destructor.

Exceptions:
none 

CPLAT_Begin_Namespace_CPLAT CP_Graphics_Imp::CP_Graphics_Imp CP_Canvas inDestCanvas  )  [protected]
 

Constructor.

Parameters:
inDestCanvas The CP_Canvas object to draw into.
Exceptions:
none 


Member Function Documentation

virtual float CP_Graphics_Imp::GetLineWidth  )  [virtual]
 

Returns the current width used in drawing lines.

Exceptions:
none 
Returns:
float The width of drawn lines.

virtual float CP_Graphics_Imp::GetAlpha  )  [virtual]
 

Returns the current alpha value used when drawing.

Exceptions:
none 
Returns:
float The alpha value used in drawing.

virtual CP_ARGBColor CP_Graphics_Imp::GetStrokeColor  )  [virtual]
 

Returns the current color used in stroking.

Exceptions:
none 
Returns:
CP_ARGBColor The color used in stroking.

virtual CP_ARGBColor CP_Graphics_Imp::GetFillColor  )  [virtual]
 

Returns the current color used in filling.

Exceptions:
none 
Returns:
CP_ARGBColor The color used in filling.

CP_Canvas CP_Graphics_Imp::GetCanvas  ) 
 

Returns the CP_Canvas object to be drawn into.

Exceptions:
none 
Returns:
CP_Canvas The canvas used to draw into.

virtual void CP_Graphics_Imp::SetAlpha float   )  [virtual]
 

Sets the alpha value used when drawing.

Parameters:
inAlpha The alpha value used in drawing.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::SetLineWidth float   )  [virtual]
 

Sets the line width used in stroking.

Parameters:
inLineWidth The line width used in drawing.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::SetLineJoin CP_E_GraphicsLineJoin   )  [virtual]
 

Sets the line join for determing how lines will be drawn when they join. Note: Some platforms do not support line join, and they will be drawn in the normal style. Current values for inLineJoint can be:

  • CP_E_GraphicsLineJoin_Miter
  • CP_E_GraphicsLineJoin_Round
  • CP_E_GraphicsLineJoin_JoinBevel

Parameters:
inLineJoint The way that the lines will join when drawn.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::SetLineCap CP_E_GraphicsLineCap   )  [virtual]
 

Sets the line cap for determing how lines ending will be drawn. Note: Some platforms do not support line caps, and they will be drawn in the normal style. Current values for inLineCap can be:

  • CP_E_GraphicsLineCap_Butt,
  • CP_E_GraphicsLineCap_Round,
  • CP_E_GraphicsLineCap_Square

Parameters:
inLineCap The way that the line ends are drawn.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::SetStrokeColor CP_ARGBColor  )  [virtual]
 

Sets the color used in stroking objects.

Parameters:
inStrokeColor The color used in stroking objects.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::SetFillColor CP_ARGBColor  )  [virtual]
 

Sets the color used in filling objects.

Parameters:
inStrokeColor The color used in filling objects.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::SaveState  )  [virtual]
 

Saves the current graphics state.

Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::RestoreState  )  [virtual]
 

Restore the current graphics state. Each RestoreState needs to have a matching SaveState called before calling this.

        CP_Graphics             graphics( inDestCanvas );

        graphics.SaveState();

            do some drawing and state changes here, such as setting colors, line styles

        graphics.RestoreState();

Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::ScaleCTM float  ,
float 
[virtual]
 

Sets the scaling amount to be used in the current transformation matrix.

Parameters:
inHorAmt The horizontal amount to scale.
inVerAmt The vertical amount to scale.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::TranslateCTM float  ,
float 
[virtual]
 

Sets the translation amount to be used in the current transformation matrix.

Parameters:
inHorAmt Horizontal amount to use in translation.
inVerAmt Vertical amount to use in translation.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::RotateCTM float   )  [virtual]
 

Sets the rotation amount to be used in the current transformation matrix.

Parameters:
inAngle The angle to use in rotation.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::SkewCTM float  ,
float 
[virtual]
 

Sets the skewing amount to be used in the current transformation matrix.

Parameters:
inHorAmt The horizontal amount to skew.
inVerAmt The vertical amount to skew.
Exceptions:
none 
Returns:
void

virtual void CP_Graphics_Imp::StrokeArc float  ,
float  ,
float  ,
float  ,
float 
[virtual]
 

Draws an arc using the passed in parameters, and then strokes it, using the current stroke color and stroke line width.

Parameters:
inHorCenter The horizontal center coordinate of the arc.
inVerCenter The vertical center coordinate of the arc.
inRadius The radius of the arc.
inStartAngle The starting angle of the arc.
inEndAngle The ending angle of the arc.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::FillArc float  ,
float  ,
float  ,
float  ,
float 
[virtual]
 

Draws an arc using the passed in parameters, and then fills it, using the current fill color.

Parameters:
inHorCenter The horizontal center coordinate of the arc.
inVerCenter The vertical center coordinate of the arc.
inRadius The radius of the arc.
inStartAngle The starting angle of the arc.
inEndAngle The ending angle of the arc.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::StrokeBezier const CP_Point ,
const CP_Point ,
const CP_Point ,
const CP_Point
[virtual]
 

Draws a Bezier curve using the passed in parameters, and then strokes it, using the current stroke color and stroke line width.

Parameters:
inStartPoint The starting point of the curve.
inControlPointOne The first control point curve.
inControlPointTwo The second control point curve.
inEndPoint The ending point of the curve.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::StrokeQuadBezier const CP_Point ,
const CP_Point ,
const CP_Point
[virtual]
 

Draws a Quad Bezier curve using the passed in parameters, and then strokes it, using the current stroke color and stroke line width.

Parameters:
inStartPoint The starting point of the curve.
inControlPointOne The first control point curve.
inEndPoint The ending point of the curve.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::DrawGradient CP_E_GradientType  ,
CP_Rect
[virtual]
 

Draws a gradient in the specified bounds. The gradient can be of the following types:

  • CP_E_GradientType_TopToBottom,
  • CP_E_GradientType_BottomToTop,
  • CP_E_GradientType_LeftToRight,
  • CP_E_GradientType_RightToLeft,
  • CP_E_GradientType_Radial,
  • CP_E_GradientType_Sunburst,
  • CP_E_GradientType_InsetSunburst,
  • CP_E_GradientType_Shapeburst,
  • CP_E_GradientType_Angled

Parameters:
inGradientType The type of gradient to draw. See above for acceptable types.
inDestBounds The bounds of the drawn gradient.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::SetGradientAngle SInt16   )  [virtual]
 

Sets the angle used to draw the gradient.

Parameters:
inAngle The angle used to draw the gradient.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::SetGradientColor const   SInt16,
const CP_ARGBColor
[virtual]
 

Sets one of the colors used to draw the gradient.

Parameters:
inIndex Index where the color is used in drawing.
inColor The color to be used.
Exceptions:
none 
Returns:
void

virtual void CP_Graphics_Imp::SetGradientCount SInt16   )  [virtual]
 

Sets the count of the number of colors used in drawing a gradient.

Parameters:
inGradientCount The count of the number of colors to use.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::DrawIcon const CP_Rect ,
CP_E_IconStyle  ,
SInt16 
[virtual]
 

Draws a icon resource in the passed in bounds. The image will be scaled to fit the rectangle.

Parameters:
inBounds The rectangle to draw the icon in.
inIconType Type type of icon to use.
inIconID Resource ID of the icon to draw.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::DrawIcon CP_OSIcon ,
const CP_Rect
[virtual]
 

Draws the CP_OSicon in the passed in bounds. The image will be scaled to fit the rectangle.

Parameters:
inIcon A CP_OSIcon that contains the icon to draw.
inBounds The rectangle to draw the picture in.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::DrawImage SInt16  ,
CP_Rect
[virtual]
 

Draws a picture image into the specified area. The image will be scaled to fit into the destination area.

Parameters:
inImageResID Picture resource id.
inDestBounds The area to draw the picture into.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::DrawImage const CP_FileSystemSpec ,
CP_Rect
[virtual]
 

Draws a picture image into the specified area. The image will be scaled to fit into the destination area. The image is located in the passed in file spec.

Parameters:
inImageSpec The location of the file containing the image to be displayed.
inDestBounds The area to draw the image into.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::DrawImage const CP_FileSystemSpec ,
CP_Rect ,
CP_Rect
[virtual]
 

Draw the passed in image object in the destination bounds, scaling the image to fit. This versions copies inSourceBounds portion of the image to the destination.

Parameters:
inImageSpec The location of the file containing the image to be displayed.
inSourceBounds The source area of the image to draw.
inDestBounds The area to draw the image into.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::DrawPicture CP_OSPicture ,
const CP_Rect
[virtual]
 

Draw the passed in OSPicture in the destination bounds, scaling the image as needed to fit.

Parameters:
inPicture The picture to be drawn.
inBounds The destination area to draw the picture.
Exceptions:
none 
Returns:
void

virtual void CP_Graphics_Imp::Line float  ,
float  ,
float  ,
float 
[virtual]
 

Draws a line from the passed in start location to the ending location.

Parameters:
inStartHorLocation The starting horizontal location.
inStartVerLocation The starting vertical location.
inEndHorLocation The ending horizontal location.
inEndVerLocation The ending vertical location.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::BeginPath  )  [virtual]
 

Marks the beginning of a path. This indicates that all subsequent drawing operations until ClosePath is called is collected into the current path. After ClosePath is called, you can then stroke or fill the path. The only drawing calls that are added, are the ones that begin with Path, such as PathMoveTo, PathAddOval, PathAddRect, etc.

        CP_Graphics             graphics( inDestCanvas );

        graphics.BeginPath();

            do some path drawing commands here

        graphics.EndPath();
        graphics.StrokePath();

Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::ClosePath  )  [virtual]
 

Closes the current path. Every call to ClosePath needs to have a corresponding BeginPath call.

Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::StrokePath  )  [virtual]
 

Strokes the current path.

Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::FillPath  )  [virtual]
 

Fills the current path.

Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::FillPath CP_Pattern  )  [virtual]
 

Fills the current path with the passed in pattern.

Exceptions:
none 
Returns:
void

virtual void CP_Graphics_Imp::DrawPath CP_E_PathDrawingMode   )  [virtual]
 

Draws the current path using the passed in path drawing mode, which can be one of the following:

  • CP_E_Graphics_PathFill
  • CP_E_Graphics_PathEOFill
  • CP_E_Graphics_PathStroke
  • CP_E_Graphics_PathFillStroke
  • CP_E_Graphics_PathEOFillStroke

Parameters:
inPathDrawMode The path drawing mode to use.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::PathMoveTo const CP_Point  )  [virtual]
 

Sets the current point in the path to that of the passed in point. This is the location where subsequent drawing operations will begin unless the call specifies a new starting point in its params.

Parameters:
inPoint The location to move to.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::PathMoveTo float  ,
float 
[virtual]
 

Sets the current point in the path to that of the passed in coordinates. This is the location where subsequent drawing operations will begin unless the call specifies a new starting point in its params.

Parameters:
inHorLocation The horizontal location to move to.
inVerLocation The vertical location to move to.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::PathAddLineTo const CP_Point  )  [virtual]
 

Adds a line to our path. The line will be drawn from the current point to the location specified in inPoint.

Parameters:
inPoint The ending location of the line.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::PathAddLines const   CP_Point[],
SInt16 
[virtual]
 

Add inNumberPoints lines to our path. The first point is the starting point, then each additional point has a line drawn from the last point to that point.

Parameters:
inPoint An array of points.
inNumberPoints The number of points in the above array of points.
Exceptions:
none 
Returns:
void

virtual void CP_Graphics_Imp::PathAddLine const CP_Point ,
const CP_Point
[virtual]
 

Adds a starting and ending point to the current path.

Parameters:
inStartPoint The starting point to add.
inEndPoint The ending point to add.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::PathAddLine float  ,
float  ,
float  ,
float 
[virtual]
 

Adds a line to the current path using the specified coordinates.

Parameters:
inStartH Horizontal starting point.
inStartV Vertical starting point.
inEndH Horizontal ending point.
inEndV Vertical ending point.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::PathAddRect const CP_Rect  )  [virtual]
 

Adds a rect to the current path.

Parameters:
inBounds The bounds of the rectangle to add.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::PathAddOval const CP_Rect  )  [virtual]
 

Adds an oval to the current path.

Parameters:
inBounds The bounds of the oval to add.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::PathAddBezier const CP_Point ,
const CP_Point ,
const CP_Point ,
const CP_Point
[virtual]
 

Adds a bezier curve to the current path.

Parameters:
inStartPoint The starting point of the curve.
inControlPointOne The first control point curve.
inControlPointTwo The second control point curve.
inEndPoint The ending point of the curve.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::PathAddQuadBezier const CP_Point ,
const CP_Point ,
const CP_Point
[virtual]
 

Adds a quadratic bezier curve to the current path.

Parameters:
inStartPoint The starting point of the curve.
inControlPointOne The first control point curve.
inEndPoint The ending point of the curve.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::PathAddPoly CP_Point_Array  )  [virtual]
 

Adds a polygon to the current path as specified in the passed in points array.

Parameters:
inPoints An array of points to draw the polygon.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::PathAddArc float  ,
float  ,
float  ,
float  ,
float  ,
SInt16 
[virtual]
 

Add an arc of a circle to the context's path, possibly preceded by a straight line segment. `(inHorCenter, inVerCenter)' is the center of the arc; `inRadius' is its radius; `inStartAngle' is the angle to the first endpoint of the arc; `inEndAngle' is the angle to the second endpoint of the arc; and `inClockwise' is 1 if the arc is to be drawn clockwise, 0 otherwise. `inStartAngle' and `inEndAngle' are measured in radians.

Parameters:
inHorCenter The horizontal center coordinate of the arc.
inVerCenter The vertical center coordinate of the arc.
inRadius The radius of the arc.
inStartAngle The starting angle of the arc.
inEndAngle The ending angle of the arc.
inClockwise Flag to indicate if the arc is drawn clockwise or counter clockwise.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::ClipPath  )  [virtual]
 

Sets the clipping path of the canvas being drawn into to that of the current path.

Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::StrokePoly CP_Point_Array  )  [virtual]
 

Draws the polygon specified by the passed in points array, then strokes it.

Parameters:
inPoints Points of the polygon to be drawn.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::FillPoly CP_Point_Array  )  [virtual]
 

Draws the polygon specified by the passed in points array, and fills it.

Parameters:
inPoints Points of the polygon to be drawn.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::StrokeRect const CP_Rect  )  [virtual]
 

Draws a rect specified by the passed in bounds, then strokes it.

Parameters:
inBounds Area of the rect to be drawn.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::EraseRect const CP_Rect  )  [virtual]
 

Erases the passed in rect using the canvases current background color.

Parameters:
inBounds The rectangle to erase.
Exceptions:
none 
Returns:
void

virtual void CP_Graphics_Imp::FillRect const CP_Rect  )  [virtual]
 

Draws a rect specified by the passed in bounds, then fills it.

Parameters:
inBounds Area of the rect to be drawn.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::StrokeRegion const CP_Region  )  [virtual]
 

Draws a region specified by the passed in region, then strokes it.

Parameters:
inRegion Region to be drawn.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::FillRegion const CP_Region  )  [virtual]
 

Draws a region specified by the passed in region, then fills it.

Parameters:
inRegion Region to be drawn.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::StrokeRoundRect const CP_Rect ,
SInt16  ,
SInt16 
[virtual]
 

Draws a rounded rect specified by the passed in rect, then strokes it.

Parameters:
inBounds The bounds of the rect to be drawn.
inHorRadius Horizontal radius of the corners.
inVerRadius Vertical radius of the corners.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::FillRoundRect const CP_Rect ,
SInt16  ,
SInt16 
[virtual]
 

Draws a rounded rect specified by the passed in rect, then fills it.

Parameters:
inBounds The bounds of the rect to be drawn.
inHorRadius Horizontal radius of the corners.
inVerRadius Vertical radius of the corners.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::StrokeOval const CP_Rect  )  [virtual]
 

Draws an oval specified by the passed in rect, then strokes it.

Parameters:
inBounds The bounds of the oval to be drawn.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::FillOval const CP_Rect  )  [virtual]
 

Draws an oval specified by the passed in rect, then fills it.

Parameters:
inBounds The bounds of the oval to be drawn.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::SetTextRenderingFlags SInt16   )  [virtual]
 

Sets a flag to indicate how the text will be drawn in the destination canvas, if the platform supports them. Such as transparent or opaque.

Parameters:
inFlags The flags to set.
Exceptions:
none 
Returns:
void

virtual void CP_Graphics_Imp::DrawString CP_FontSpec ,
const CP_String ,
const CP_Point
[virtual]
 

Draws the passed in text at the locatio specified. The text will not be wrapped.

Parameters:
inFontSpec FontSpec object that describes the font and justification of the text.
inText The text to be drawn.
inStartPoint The starting point to draw the text.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::DrawText CP_FontSpec ,
const CP_String ,
const CP_Rect ,
SInt16  ,
SInt16  ,
bool 
[virtual]
 

Draws the passed in text at the location specified. The text will be wrapped to fit in the passed in bounds.

Parameters:
inFontSpec FontSpec object that describes the font and justification of the text.
inText The text to be drawn.
inBounds The bounds to draw the text in.
inHorAlign The horizontal alignment of the text. It should be one of the following:
  • CP_E_TextAlign_HorLeft
  • CP_E_TextAlign_HorCenter
  • CP_E_TextAlign_HorRight
inVerAlign The vertical alignment of the text. It should be one of the following:
  • CP_E_TextAlign_VerTop
  • CP_E_TextAlign_VerMiddle
  • CP_E_TextAlign_VerBottom
inWrapText If true, then the text is wrapped at the right edge of the passed in bounds.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.

virtual void CP_Graphics_Imp::DrawTrunc CP_FontSpec ,
const CP_String ,
const CP_Rect ,
SInt16  ,
SInt16 
[virtual]
 

Draws the passed in text at the locatio specified. The text will be truncated to fit in the passed in bounds.

Parameters:
inFontSpec FontSpec object that describes the font and justification of the text.
inText The text to be drawn.
inBounds The bounds to draw the text in.
inHorAlign The horizontal alignment of the text. It should be one of the following:
  • CP_E_TextAlign_HorLeft
  • CP_E_TextAlign_HorCenter
  • CP_E_TextAlign_HorRight
inVerAlign The vertical alignment of the text. It should be one of the following:
  • CP_E_TextAlign_VerTop
  • CP_E_TextAlign_VerMiddle
  • CP_E_TextAlign_VerBottom
Exceptions:
none 
Returns:
void

Reimplemented in CP_Graphics_Imp_Quartz.


Member Data Documentation

CP_Canvas CP_Graphics_Imp::fDestCanvas [protected]
 

float CP_Graphics_Imp::fAlpha [protected]
 

Destination canvas to draw into.

float CP_Graphics_Imp::fLineWidth [protected]
 

Alpha value for drawing.

CP_ARGBColor CP_Graphics_Imp::fStrokeColor [protected]
 

Line width for the current stroking.

CP_ARGBColor CP_Graphics_Imp::fFillColor [protected]
 

Color used in stroking.


The documentation for this class was generated from the following files:
Generated on Tue Sep 20 20:21:47 2005 for CPLAT_MacOS by  doxygen 1.4.0