All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

PrintBase Class CATPrintGenerator

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---CATPrintGenerator
 

Usage: you can derive this class.


public class CATPrintGenerator

Base class to write generators and usually printer drivers.

Role: Derive from this class and override low-level methods to generate drawing primitives in the desired language.
Printing is done through calls of high-level methods in user coordinates which are in turn converted in low-level methods calls in device coordinates (note that the unit is always the millimeter).

For instance, when plotting at scale 5, a high-level call :
generator->DrawLine(0, 0, 5, 10); // User coordinates
will be converted in the sequence
generator->DrvMoveTo(0, 0);
generator->DrvLineTo(25, 50); // Device coordinates
and so one, even for more complex operations (such as text discretization).

The following low-level methods must be overridden : DrvBegin, DrvEnd, DrvFormFeed, DrvDefineColor, DrvSelectDrawColor, DrvSetDrawWidth, DrvMoveTo, DrvLineTo, DrvSelectFillColor, DrvFillArea, DrvDrawBitmap.
Whereas the following can be overridden if needed : DrvDrawPolyline, DrvDrawArcCircle, DrvDrawArcEllipse, DrvDrawPolyBezier, DrvSetTextAttribute and DrvDrawText.

See also:
CATPrintDevice, CATPrintImage, CATPrintParameters


Constructor and Destructor Index


o CATPrintGenerator(CATString&)
Constructs a CATPrintGenerator of a given language.
o ~CATPrintGenerator()

Method Index


o Begin(CATPrintParameters&)
Initializes generation with given parameters.
o Begin(CATPrintParameters&,CATUnicodeString&)
Initializes generation with given parameters.
o BeginClosedFigure(void)
Begins a closed figure.
o BeginDrawScissor(int,float*)
Begins a clipping of the image from the polygon.
o BeginGroup(CATUnicodeString&)
Begins a group of primitives.
o BeginGroup(int)
o DefineColor(int,float,float,float)
Defines a color in the palette in rgb coordinates.
o DrawArcCircle(float,float,float,float,float,int)
Draws a circle arc with current draw color, line style and line width.
o DrawArcEllipse(float,float,float,float,float,float,float,int)
Draws an ellipse arc with current draw color, line style and line width.
o DrawBitmap(float,float,int,CATPixelImage*)
Draws a bitmap at the given position with the given orientation.
o DrawConnectingEdge(void)
Draw the edge closing the closed figure.
o DrawDisjointPolyline(int,float*)
Draws disjoint a polyline with current draw color, line style and line width.
o DrawGeometricText(float,float,CATUnicodeString&)
Draws a text at given coordinates.
o DrawLine(float,float,float,float)
Draws a line between (iX0, iY0) and (iX1, iY1) with current draw color, line style and line width.
o DrawMarker(float,float,CATPrintMarkerAttribute,float)
Draws a marker at given coordinates.
o DrawPolyBezier(int,float*)
Draws a polybezier curve of order 3 with current draw color, line style and line width.
o DrawPolyPolygon(int,int*,float*)
Draws a polypolygon with current fill color and the using the even/odd method, the edge color is the draw color if needed.
o DrawPolyQuadraticBezier(int,float*)
Draws a polybezier curve of order 2 with current draw color, line style and line width.
o DrawPolygon(int,float*)
Draws a simple area with current fill color and the using the even/odd method, the edge color is the draw color if needed.
o DrawPolyline(int,float*)
Draws a polyline with current draw color, line style and line width.
o DrvBegin(CATPrintParameters&)
Initializes generator with print parameters.
o DrvBegin(CATPrintParameters&,CATUnicodeString&)
Initializes generator with print parameters.
o DrvBeginClosedFigure(void)
Begins a closed figure.
o DrvBeginGroup(CATUnicodeString&)
Begins a group of primitives.
o DrvBeginGroup(int)
o DrvDefineColor(int,float,float,float)
Defines a color in the palette in rgb coordinates.
o DrvDrawArcCircle(float,float,float,float,float,int)
Draws a circle arc in device coordinates with current draw color, line style and line width.
o DrvDrawArcEllipse(float,float,float,float,float,float,float,int)
Draws an ellipse arc in device coordinates with current draw color, line style and line width.
o DrvDrawBitmap(float,float,CATPixelImage*)
Draws a bitmap in device coordinates at the given position.
o DrvDrawConnectingEdge(void)
Draw the edge closing the closed figure.
o DrvDrawPolyBezier(int,float*)
Draws a polybezier curve of order 3 in device coordinates with current draw color, line style and line width.
o DrvDrawPolyPolygon(int,int*,float*)
Draws a polypolygon with current fill color and the using the even/odd method, the edge color is the draw color if needed.
o DrvDrawPolyQuadraticBezier(int,float*)
Draws a polybezier curve of order 2 with current draw color, line style and line width.
o DrvDrawPolygon(int,float*)
Draws a simple area with current fill color and the using the even/odd method, the edge color is the draw color if needed.
o DrvDrawPolyline(int,float*,int)
Draws a polyline with current draw color, line style and line width.
o DrvDrawText(float,float,CATUnicodeString&)
Draws text in device coordinates.
o DrvEnd(void)
Terminates generation.
o DrvEndClosedFigure(void)
Ends current closed figure.
o DrvEndGroup(void)
Ends current group of primitives.
o DrvFillArea(int,int*,float*)
Fills a polypolygon in device coordinates with current fill color.
o DrvFormFeed(CATUnicodeString&)
Starts a new page.
o DrvFormFeed(void)
Starts a new page.
o DrvLineTo(float,float)
Draws a line from the current pen position to (iX, iY) in device coordinates with current draw color, line type and draw width.
o DrvMoveTo(float,float)
Moves the pen to (iX, iY) in device coordinates without drawing.
o DrvSelectDrawColor(int)
Selects the current drawing color.
o DrvSelectFillColor(int)
Selects the current filling color.
o DrvSetDrawWidth(float)
Selects the current draw width.
o DrvSetEdgeMode(CATPrintEdgeMode)
Selects the current edge mode.
o DrvSetFillMode(CATPrintFillMode)
Selects the current fill mode.
o DrvSetLineCap(CATPrintLineAttribute)
Selects the current line cap style.
o DrvSetLineJoin(CATPrintLineAttribute)
Selects the current line join style.
o DrvSetLineStyle(CATPrintLineAttribute,float,float*)
Selects the current line style.
o DrvSetTextAttribute(CATPrintTextAttribute,CATFont*)
Defines current text font.
o DrvSetTextAttribute(CATPrintTextAttribute,float)
Defines text attributes.
o DrvStartNewRegion(void)
Begins a new region inside the closed figure.
o End(void)
Terminates generation.
o EndClosedFigure(void)
Ends current closed figure.
o EndDrawScissor(void)
Ends the clipping the image from the polygon.
o EndGroup(void)
Ends current group of primitives.
o FillArea(int,int*,float*)
Fills a polypolygon with current fill color using the even/odd method.
o FillPolygon(int,float*)
Fills a simple area with current fill color using the even/odd method.
o FillRectangle(float,float,float,float)
Fills a rectangle between (iX0, iY0) to (iX1, iY1) with current fill color.
o GetDeviceCoordinates(float&,float&)
Converts from user coordinates to device coordinates.
o GetLanguage(void)
Returns the name of the generated language.
o GetOrigin(float&,float&)
Returns current printing offset from the lower left corner of the sheet.
o GetProperties(void)
Override this method to provide specific properties which can be stored and read by the printer manager.
o GetPropertiesDialog(CATDialog*)
Returns dialog used to fill specific properties.
o GetScale(void)
Returns current printing scale.
o LineTo(float,float)
Draws a line from the current pen position to (iY, iY) with current draw color, line style and line width.
o MoveTo(float,float)
Moves the pen to (iX, iY) coordinates without drawing.
o SelectDrawColor(int)
Selects the current drawing color.
o SelectFillColor(int)
Selects the current filling color.
o SetDrawWidth(float)
Selects the current draw width.
o SetDrawingSize(float,float)
Defines the size of the drawing area.
o SetEdgeMode(CATPrintEdgeMode)
Selects the current edge mode.
o SetFillMode(CATPrintFillMode)
Selects the current fill mode.
o SetLineCap(CATPrintLineAttribute)
Selects the current line cap style.
o SetLineJoin(CATPrintLineAttribute)
Selects the current line join style.
o SetLineStyle(CATPrintLineAttribute,float,float*)
Selects the current line style.
o SetOrigin(float,float)
Defines the printing offset from the lower-left corner of the sheet.
o SetScale(float)
Defines the plotting iScale.
o SetTextAttribute(CATPrintTextAttribute,CATFont*)
Defines current text font.
o SetTextAttribute(CATPrintTextAttribute,float)
Defines current text attributes.
o SetViewport(float,float,float,float)
Defines the plotting viewport (or clipping area) in user coordinates.
o StartNewPage(CATPrintParameters&)
Starts a new page with (eventually) new parameters.
o StartNewPage(CATPrintParameters&,CATUnicodeString&)
Starts a new page with (eventually) new parameters.
o StartNewRegion(void)
Begins a new region inside the closed figure.

Constructor and Destructor


o CATPrintGenerator
public CATPrintGenerator( const CATString& iLanguage)
Constructs a CATPrintGenerator of a given language.
Parameters:
iLanguage
The generator language.
o ~CATPrintGenerator
public virtual ~CATPrintGenerator()

Methods


o Begin
public virtual void Begin( const CATPrintParameters& iParameters)
Initializes generation with given parameters.
Parameters:
iParameters
The generator parameters.
o Begin
public virtual void Begin( const CATPrintParameters& iParameters,
const CATUnicodeString& iPageTitle)
Initializes generation with given parameters.
Parameters:
iParameters
The generator parameters.
iPageTitle
First page title.
o BeginClosedFigure
public virtual void BeginClosedFigure(void )
Begins a closed figure.
o BeginDrawScissor
public virtual void BeginDrawScissor(int iNpoints,
const float* iCoord)
Begins a clipping of the image from the polygon.
Parameters:
iNpoints
The number of points in the polygon.
iCoord
The array of 2*iNpoints floats giving the coordinates of the points.
o BeginGroup
public virtual void BeginGroup( const CATUnicodeString& iId)
Begins a group of primitives.
Parameters:
iId
The id of the group.
o BeginGroup
public virtual void BeginGroup(int iId)
Deprecated:
V5R16 Begins a group of primitives. The signature of the method has been changed to manage the id as an unicode string
Parameters:
iId
The id of the group.
o DefineColor
public virtual void DefineColor(int iIndex,
float iRed,
float iGreen,
float iBlue)
Defines a color in the palette in rgb coordinates.
Parameters:
iIndex
The index in the color table.
Legal values: Between 0 and 255.
iRed
The red color in RGB coordinates.
Legal values: Between 0 and 1.
iGreen
The green color in RGB coordinates.
Legal values: Between 0 and 1.
iBlue
The blue color in RGB coordinates.
Legal values: Between 0 and 1.
o DrawArcCircle
public virtual void DrawArcCircle(float iX0,
float iY0,
float iRadius,
float iStartAngle= 0.f,
float iEndAngle= CAT2PI,
int iFill= 0)
Draws a circle arc with current draw color, line style and line width.
Parameters:
iX0
The center x coordinate of the arc.
iY0
The center y coordinate of the arc.
iRadius
The radius of the arc.
iStartAngle
The start angle of the arc in radians.
Legal values: The default is 0.
iEndAngle
The end angle of the arc in radians.
Legal values: The default is CAT2PI
iFill
The filling mode of the arc.
Legal values: 1 to fill the arc (chord-style), 0 to draw the outline only. 0 is the default.
o DrawArcEllipse
public virtual void DrawArcEllipse(float iX0,
float iY0,
float iHradius,
float iVradius,
float iStartAngle= 0.f,
float iEndAngle= CAT2PI,
float iSlope= 0.f,
int iFill= 0)
Draws an ellipse arc with current draw color, line style and line width.
Parameters:
iX0,
iY0 The center coordinates of the arc.
iHradius
The horizontal radius.
iVradius
The vertical radius.
iStartAngle,
iEndAngle The start and end angles of the arc (radians).
iSlope
The angle between the largest axis of the ellipse and the horizontal.
Legal values: The default is 0.
iFill
The filling mode of the arc.
Legal values: 1 to fill the arc (chord-style), 0 to draw the outline only. 0 is the default.
o DrawBitmap
public virtual void DrawBitmap(float iX,
float iY,
int iOrientation,
const CATPixelImage* iPixelImage)
Draws a bitmap at the given position with the given orientation.
Parameters:
iX
The x coordinate of the lower left corner of the bitmap.
iY
The y coordinate of the lower left corner of the bitmap.
iOrientation
The bitmap rotation.
Legal values: 0->0 deg, 1->90 deg, 2->180 deg, 3->270 deg.
iPixelImage
The pointer to a CATPixelImage object.
o DrawConnectingEdge
public virtual void DrawConnectingEdge(void )
Draw the edge closing the closed figure.
o DrawDisjointPolyline
public virtual void DrawDisjointPolyline(int iNpoints,
const float* iCoord)
Draws disjoint a polyline with current draw color, line style and line width.
Parameters:
iNpoints
The number of points in the polyline.
iCoord
The array of 2*iNpoints floats giving the coordinates of the points.
o DrawGeometricText
public virtual void DrawGeometricText(float iX,
float iY,
const CATUnicodeString& iText)
Draws a text at given coordinates.
Parameters:
iX
The x coordinate of the anchor point.
iY
The y coordinate of the anchor point.
iText
The text to draw.
o DrawLine
public virtual void DrawLine(float iX0,
float iY0,
float iX1,
float iY1)
Draws a line between (iX0, iY0) and (iX1, iY1) with current draw color, line style and line width.
Parameters:
iX0
The x coordinate of the first point.
iY0
The y coordinate of the first point.
iX1
The x coordinate of the second point.
iY1
The y coordinate of the second point.
o DrawMarker
public virtual void DrawMarker(float iX,
float iY,
CATPrintMarkerAttribute iMarker,
float iSize= 0.0)
Draws a marker at given coordinates.
Parameters:
iX
The x coordinate of the anchor point.
iY
The y coordinate of the anchor point.
iMarker
The type of marker. See CATPrintMarkerAttribute for available marker attribute.
iSize
The size of the marker.
Legal values: Defaut is 0, then uses the standard size.
o DrawPolyBezier
public virtual void DrawPolyBezier(int iNpoints,
const float* iCoord)
Draws a polybezier curve of order 3 with current draw color, line style and line width.
Parameters:
iNpoints
The number of points defining the polybezier.
iCoord
The array of 2*iNpoints floats giving the coordinates of the points.
o DrawPolyPolygon
public virtual void DrawPolyPolygon(int iNoutlines,
const int* iNcorners,
const float* iCoord)
Draws a polypolygon with current fill color and the using the even/odd method, the edge color is the draw color if needed.
Parameters:
iNoutlines
The number of polygons in the polypolygon.
iNcorners
The array of iNOutlines integers giving the number of corners in each polygon.
iCoord
The array of floats giving the coordinates of alls corners of each polygon.
o DrawPolyQuadraticBezier
public virtual void DrawPolyQuadraticBezier(int iNpoints,
const float* iCoord)
Draws a polybezier curve of order 2 with current draw color, line style and line width.
Parameters:
iNpoints
The number of points defining the polybezier.
iCoord
The array of 2*iNpoints floats giving the coordinates of the points.
o DrawPolygon
public virtual void DrawPolygon(int iNcorners,
const float* iCoord)
Draws a simple area with current fill color and the using the even/odd method, the edge color is the draw color if needed.
Parameters:
iNcorners
The number of corners in the polygon.
iCoord
The array of 2*iNcorners floats giving the coordinates of the corners.
o DrawPolyline
public virtual void DrawPolyline(int iNpoints,
const float* iCoord)
Draws a polyline with current draw color, line style and line width.
Parameters:
iNpoints
The number of points in the polyline.
iCoord
The array of 2*iNpoints floats giving the coordinates of the points.
o DrvBegin
protected virtual void DrvBegin( const CATPrintParameters& iParameters) = 0
Initializes generator with print parameters.
Parameters:
iParameters
The generator parameters.
o DrvBegin
protected virtual void DrvBegin( const CATPrintParameters& iParameters,
const CATUnicodeString& iPageTitle)
Initializes generator with print parameters.
Parameters:
iParameters
The generator parameters.
iPageTitle
First page title.
o DrvBeginClosedFigure
protected virtual void DrvBeginClosedFigure(void )
Begins a closed figure.
o DrvBeginGroup
protected virtual void DrvBeginGroup( const CATUnicodeString& iId)
Begins a group of primitives.
Parameters:
iId
The id of the group.
o DrvBeginGroup
protected virtual void DrvBeginGroup(int iId)
Deprecated:
V5R16 Begins a group of primitives. The signature of the method has been changed to manage the id as an unicode string
Parameters:
iId
The id of the group.
o DrvDefineColor
protected virtual void DrvDefineColor(int iIndex,
float iRed,
float iGreen,
float iBlue) = 0
Defines a color in the palette in rgb coordinates.
Parameters:
iIndex
The index in the color table.
Legal values: Between 0 and 255.
iRed
The red color in RGB coordinates.
Legal values: Between 0 and 1.
iGreen
The green color in RGB coordinates.
Legal values: Between 0 and 1.
iBlue
The blue color in RGB coordinates.
Legal values: Between 0 and 1.
o DrvDrawArcCircle
protected virtual void DrvDrawArcCircle(float iX0,
float iY0,
float iRadius,
float iStartAngle,
float iEndAngle,
int iFill)
Draws a circle arc in device coordinates with current draw color, line style and line width.
Parameters:
iX0
The x center coordinates of the arc.
iY0
The y center coordinates of the arc.
iRadius
The radius of the arc.
iStartAngle
The start angle of the arc in radians.
iEndAngle
The end angle of the arc in radians.
iFill
The filling mode of the arc.
o DrvDrawArcEllipse
protected virtual void DrvDrawArcEllipse(float iX0,
float iY0,
float iHradius,
float iVradius,
float iStartAngle,
float iEndAngle,
float iSlope,
int iFill)
Draws an ellipse arc in device coordinates with current draw color, line style and line width.
Parameters:
iX0
The x center coordinates of the arc.
iY0
The y center coordinates of the arc.
iHradius
The horizontal radius.
iVradius
The vertical radius.
iStartAngle
The start angle of the arc in radians.
iEndAngle
The end angle of the arc in radians.
iSlope
The angle between the largest axis of the ellipse and the horizontal.
iFill
The filling mode of the arc.
o DrvDrawBitmap
protected virtual void DrvDrawBitmap(float iX,
float iY,
const CATPixelImage* iPixelImage) = 0
Draws a bitmap in device coordinates at the given position.
Parameters:
iX
The x coordinates of the lower left corner of the bitmap.
iY
The y coordinates of the lower left corner of the bitmap.
iPixelImage
The pointer to a CATPixelImage object.
o DrvDrawConnectingEdge
protected virtual void DrvDrawConnectingEdge(void )
Draw the edge closing the closed figure.
o DrvDrawPolyBezier
protected virtual void DrvDrawPolyBezier(int iNpoints,
const float* iCoord)
Draws a polybezier curve of order 3 in device coordinates with current draw color, line style and line width.
Parameters:
iNpoints
The number of points defining the polybezier.
iCoord
The array of 2*iNpoints floats giving the coordinates of the points.
o DrvDrawPolyPolygon
protected virtual void DrvDrawPolyPolygon(int iNoutlines,
const int* iNcorners,
const float* iCoord)
Draws a polypolygon with current fill color and the using the even/odd method, the edge color is the draw color if needed.
Parameters:
iNoutlines
The number of polygons in the polypolygon.
iNcorners
The array of iNOutlines integers giving the number of corners in each polygon.
iCoord
The array of floats giving the coordinates of alls corners of each polygon.
o DrvDrawPolyQuadraticBezier
protected virtual void DrvDrawPolyQuadraticBezier(int iNpoints,
const float* iCoord)
Draws a polybezier curve of order 2 with current draw color, line style and line width.
Parameters:
iNpoints
The number of points defining the polybezier.
iCoord
The array of 2*iNpoints floats giving the coordinates of the points.
o DrvDrawPolygon
protected virtual void DrvDrawPolygon(int iNcorners,
const float* iCoord)
Draws a simple area with current fill color and the using the even/odd method, the edge color is the draw color if needed.
Parameters:
iNcorners
The number of corners in the polygon.
iCoord
The array of 2*iNcorners floats giving the coordinates of the corners.
o DrvDrawPolyline
protected virtual void DrvDrawPolyline(int iNpoints,
const float* iCoord,
const int iDisjoint)
Draws a polyline with current draw color, line style and line width.
Parameters:
iNpoints
The number of points in the polyline.
iCoord
The array of 2*iNpoints floats giving the coordinates of the points.
iDisjoint
Tells if the polyline is disjoint or not
o DrvDrawText
protected virtual void DrvDrawText(float iX,
float iY,
const CATUnicodeString& iText)
Draws text in device coordinates.
Parameters:
iX
The x coordinate of the anchor point.
iY
The y coordinate of the anchor point.
iText
The text to draw.
o DrvEnd
protected virtual void DrvEnd(void ) = 0
Terminates generation.
o DrvEndClosedFigure
protected virtual void DrvEndClosedFigure(void )
Ends current closed figure.
o DrvEndGroup
protected virtual void DrvEndGroup(void )
Ends current group of primitives.
o DrvFillArea
protected virtual void DrvFillArea(int iNoutlines,
const int* iNcorners,
const float* iCoord) = 0
Fills a polypolygon in device coordinates with current fill color.
Parameters:
iNoutlines
The number of polygons in the polypolygon.
iNcorners
The array of iNOutlines integers giving the number of corners in each polygon.
iCoord
The array of floats giving the coordinates of alls corners of each polygon.
o DrvFormFeed
protected virtual void DrvFormFeed( const CATUnicodeString& iPageTitle)
Starts a new page.
Parameters:
iPageTitle
First page title.
o DrvFormFeed
protected virtual void DrvFormFeed(void ) = 0
Starts a new page.
o DrvLineTo
protected virtual void DrvLineTo(float iX,
float iY) = 0
Draws a line from the current pen position to (iX, iY) in device coordinates with current draw color, line type and draw width.
Parameters:
iX
The x coordinate to draw to.
iY
The y coordinate to draw to.
o DrvMoveTo
protected virtual void DrvMoveTo(float iX,
float iY) = 0
Moves the pen to (iX, iY) in device coordinates without drawing.
Parameters:
iX
The x coordinate to move to.
iY
The y coordinate to move to.
o DrvSelectDrawColor
protected virtual void DrvSelectDrawColor(int iIndex) = 0
Selects the current drawing color.
Parameters:
iIndex
The index of the current drawing color.
Legal values: Between 0 and 255.
o DrvSelectFillColor
protected virtual void DrvSelectFillColor(int iIndex) = 0
Selects the current filling color.
Parameters:
iIndex
The index of the current filling color.
Legal values: Between 0 and 255.
o DrvSetDrawWidth
protected virtual void DrvSetDrawWidth(float iWidth) = 0
Selects the current draw width.
Parameters:
iWidth
The current draw width.
o DrvSetEdgeMode
protected virtual void DrvSetEdgeMode(CATPrintEdgeMode iEdgeMode)
Selects the current edge mode.
Parameters:
iEdgeMode
The current edge mode.
Legal values: It can be set to either CATPRINTEDGE_NONE for none edge, the closed primitive edges are not drawn, CATPRINTEDGE_SOLID for solid edge mode, the closed primitive edges are not drawn with the draw color.
o DrvSetFillMode
protected virtual void DrvSetFillMode(CATPrintFillMode iFillMode)
Selects the current fill mode.
Parameters:
iFillMode
The current fill mode.
Legal values: It can be set to either CATPRINTFILL_EMPTY for empty fill mode, the closed primitive will not be filled, CATPRINTFILL_SOLID for solid fill mode, the closed primitives will be painted with the current fill color, CATPRINTFILL_PATTERN for pattern fill mode, the closed primitives will be painted with the current pattern.
o DrvSetLineCap
protected virtual void DrvSetLineCap(CATPrintLineAttribute iLineCap)
Selects the current line cap style.
Parameters:
iLineCap
The current line cap style.
Legal values: It can be set to either CATPRINTLINE_ENCAP_FLAT for flat cap style, CATPRINTLINE_ENCAP_SQUARE for square cap style, CATPRINTLINE_ENCAP_ROUND for round cap style.
o DrvSetLineJoin
protected virtual void DrvSetLineJoin(CATPrintLineAttribute iLineJoin)
Selects the current line join style.
Parameters:
iLineJoin
The current line join style.
Legal values: It can be set to either CATPRINTLINE_JOIN_MITER for miter join style, CATPRINTLINE_JOIN_ROUND for round join style, CATPRINTLINE_JOIN_BEVEL for bevel join style.
o DrvSetLineStyle
protected virtual void DrvSetLineStyle(CATPrintLineAttribute iType,
float iPatternLength= 0.0,
const float* iDescription= NULL)
Selects the current line style.
Parameters:
iType
The current line style.
Legal values: It can be set to either CATPRINTLINE_SOLID for solid line style, CATPRINTLINE_DOT for dot line style, CATPRINTLINE_DASH for dash line style, CATPRINTLINE_DASHDOT for dashdot line style, CATPRINTLINE_PHANTOM for phantom line style, CATPRINTLINE_USER for user line style.
iPatternLength
The length of the description for user line style.
Legal values: The default is 0.
iDescription
The description for user line style.
o DrvSetTextAttribute
protected virtual void DrvSetTextAttribute(CATPrintTextAttribute iAttribute,
CATFont* iFont)
Defines current text font.
Parameters:
iAttribute
Legal values: It must be CATPRINTTEXT_TYPEFACE.
iFont
See CATFont for more informations.
o DrvSetTextAttribute
protected virtual void DrvSetTextAttribute(CATPrintTextAttribute iAttribute,
float iValue)
Defines text attributes. Texts are drawn with current draw color.
Parameters:
iAttribute
See CATPrintTextAttribute for available text attributes.
iValue
See CATPrintTextAttribute for available text values corresponding to iAttribute.
o DrvStartNewRegion
protected virtual void DrvStartNewRegion(void )
Begins a new region inside the closed figure.
o End
public virtual void End(void )
Terminates generation.
o EndClosedFigure
public virtual void EndClosedFigure(void )
Ends current closed figure.
o EndDrawScissor
public virtual void EndDrawScissor(void )
Ends the clipping the image from the polygon.
o EndGroup
public virtual void EndGroup(void )
Ends current group of primitives.
o FillArea
public virtual void FillArea(int iNoutlines,
const int* iNcorners,
const float* iCoord)
Fills a polypolygon with current fill color using the even/odd method.
Parameters:
iNoutlines
The number of polygons in the polypolygon.
iNcorners
The array of iNOutlines integers giving the number of corners in each polygon.
iCoord
The array of floats giving the coordinates of alls corners of each polygon.
o FillPolygon
public virtual void FillPolygon(int iNcorners,
const float* iCoord)
Fills a simple area with current fill color using the even/odd method.
Parameters:
iNcorners
The number of corners in the polygon.
iCoord
The array of 2*iNcorners floats giving the coordinates of the corners.
o FillRectangle
public virtual void FillRectangle(float iX0,
float iY0,
float iX1,
float iY1)
Fills a rectangle between (iX0, iY0) to (iX1, iY1) with current fill color.
Parameters:
iX0
The x coordinate of the first point.
iY0
The y coordinate of the first point.
iX1
The x coordinate of the second point.
iY1
The y coordinate of the second point.
o GetDeviceCoordinates
public virtual void GetDeviceCoordinates(float& ioX,
float& ioY) const
Converts from user coordinates to device coordinates.
Parameters:
ioX
The x device coordinate from the x user coordinate.
ioY
The y device coordinate from the y user coordinate.
o GetLanguage
public const CATString& GetLanguage(void ) const
Returns the name of the generated language.
o GetOrigin
public virtual void GetOrigin(float& oX0,
float& oY0) const
Returns current printing offset from the lower left corner of the sheet.
Parameters:
oX0
The x offset of the sheet.
oY0
The y offset of the sheet.
o GetProperties
public virtual CATBaseUnknown* GetProperties(void )
Override this method to provide specific properties which can be stored and read by the printer manager.
o GetPropertiesDialog
public virtual CATDlgWindow* GetPropertiesDialog(CATDialog* oParent)
Returns dialog used to fill specific properties.
Parameters:
oParent
The parent dialog.
o GetScale
public virtual float GetScale(void ) const
Returns current printing scale.
o LineTo
public virtual void LineTo(float iX,
float iY)
Draws a line from the current pen position to (iY, iY) with current draw color, line style and line width.
Parameters:
iX
The x coordinate to draw to.
iY
The y coordinate to draw to.
o MoveTo
public virtual void MoveTo(float iX,
float iY)
Moves the pen to (iX, iY) coordinates without drawing.
Parameters:
iX
The x coordinate to move to.
iY
The y coordinate to move to.
o SelectDrawColor
public virtual void SelectDrawColor(int iIndex)
Selects the current drawing color.
Parameters:
iIndex
The index of the current drawing color.
Legal values: Between 0 and 255.
o SelectFillColor
public virtual void SelectFillColor(int iIndex)
Selects the current filling color.
Parameters:
iIndex
The index of the current filling color.
Legal values: Between 0 and 255.
o SetDrawWidth
public virtual void SetDrawWidth(float iWidth)
Selects the current draw width.
Parameters:
iWidth
The current draw width.
o SetDrawingSize
public virtual void SetDrawingSize(float iWidth,
float iHeight)
Defines the size of the drawing area.
Parameters:
iWidth
The width of the drawing area.
iHeight
The height of the drawing area.
o SetEdgeMode
public virtual void SetEdgeMode(CATPrintEdgeMode iEdgeMode)
Selects the current edge mode.
Parameters:
iEdgeMode
The current edge mode.
Legal values: It can be set to either CATPRINTEDGE_NONE for none edge, the closed primitive edges are not drawn, CATPRINTEDGE_SOLID for solid edge mode, the closed primitive edges are not drawn with the draw color.
o SetFillMode
public virtual void SetFillMode(CATPrintFillMode iFillMode)
Selects the current fill mode.
Parameters:
iFillMode
The current fill mode.
Legal values: It can be set to either CATPRINTFILL_EMPTY for empty fill mode, the closed primitive will not be filled, CATPRINTFILL_SOLID for solid fill mode, the closed primitives will be painted with the current fill color, CATPRINTFILL_PATTERN for pattern fill mode, the closed primitives will be painted with the current pattern.
o SetLineCap
public virtual void SetLineCap(CATPrintLineAttribute iLineCap)
Selects the current line cap style.
Parameters:
iLineCap
The current line cap style.
Legal values: It can be set to either CATPRINTLINE_ENCAP_FLAT for flat cap style, CATPRINTLINE_ENCAP_SQUARE for square cap style, CATPRINTLINE_ENCAP_ROUND for round cap style.
o SetLineJoin
public virtual void SetLineJoin(CATPrintLineAttribute iLineJoin)
Selects the current line join style.
Parameters:
iLineJoin
The current line join style.
Legal values: It can be set to either CATPRINTLINE_JOIN_MITER for miter join style, CATPRINTLINE_JOIN_ROUND for round join style, CATPRINTLINE_JOIN_BEVEL for bevel join style.
o SetLineStyle
public virtual void SetLineStyle(CATPrintLineAttribute iType,
float iPatternLength= 0.0,
const float* iDescription= NULL)
Selects the current line style.
Parameters:
iType
The current line style.
Legal values: It can be set to either CATPRINTLINE_SOLID for solid line style, CATPRINTLINE_DOT for dot line style, CATPRINTLINE_DASH for dash line style, CATPRINTLINE_DASHDOT for dashdot line style, CATPRINTLINE_PHANTOM for phantom line style, CATPRINTLINE_USER for user line style.
iPatternLength
The length of the description for user line style.
Legal values: The default is 0.
iDescription
The description for user line style.
o SetOrigin
public virtual void SetOrigin(float iX0,
float iY0)
Defines the printing offset from the lower-left corner of the sheet.
Parameters:
iX0
The x offset of the sheet.
iY0
The y offset of the sheet.
o SetScale
public virtual void SetScale(float iScale)
Defines the plotting iScale.
Parameters:
iScale
The plotting scale.
o SetTextAttribute
public virtual void SetTextAttribute(CATPrintTextAttribute iAttribute,
CATFont* iFont)
Defines current text font.
Parameters:
iAttribute
Legal values: It must be CATPRINTTEXT_TYPEFACE.
iFont
See CATFont for more informations.
o SetTextAttribute
public virtual void SetTextAttribute(CATPrintTextAttribute iAttribute,
float iValue)
Defines current text attributes. Texts are drawn with current draw color.
Parameters:
iAttribute
See CATPrintTextAttribute for available text attributes.
iValue
See CATPrintTextAttribute for available text values corresponding to iAttribute.
o SetViewport
public virtual void SetViewport(float iX,
float iY,
float iWidth,
float iHeight)
Defines the plotting viewport (or clipping area) in user coordinates.
Parameters:
iX
The x origin of the viewport.
iY
The y origin of the viewport.
iWidth
The width of the viewport.
iHeight
The height of the viewport.
o StartNewPage
public virtual void StartNewPage( const CATPrintParameters& iParameters)
Starts a new page with (eventually) new parameters.
Parameters:
iParameters
Current printing parameters.
o StartNewPage
public virtual void StartNewPage( const CATPrintParameters& iParameters,
const CATUnicodeString& iPageTitle)
Starts a new page with (eventually) new parameters.
Parameters:
iParameters
Current printing parameters.
iPageTitle
New page title.
o StartNewRegion
public virtual void StartNewRegion(void )
Begins a new region inside the closed figure.

This object is included in the file: CATPrintGenerator.h
If needed, your Imakefile.mk should include the module: CATPrintBase

Copyright © 2003, Dassault Systèmes. All rights reserved.