PrintBase 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 : , , , , , , , , , , .
Whereas the following can be overridden if needed : , , , , and .

See also:
, ,


Constructor and Destructor Index


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

Method Index


o AddRaster(CATRasterizationData&)
Draw the filter with the CATPixelImage in parameter.
o Begin(CATPrintParameters&)
Initializes generation with given parameters.
o Begin(CATPrintParameters&,CATUnicodeString&)
Initializes generation with given parameters.
o BeginClosedFigure()
Begins a closed figure.
o BeginDrawScissor(int,float*)
Begins a clipping of the image from the polygon.
o BeginDrawScissors(float*)
o BeginGroup(CATUnicodeString&)
Begins a group of primitives.
o DefineColor(int,float,float,float)
Defines a color in the palette in rgb coordinates.
o DisplayFilter(CATPixelImage*)
Deprecated R214 In favor of virtual void AddRaster(CATRasterizationData iRasterizationData); Draw the filter with the CATPixelImage in parameter.
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()
Begins a closed figure.
o DrvBeginGroup(CATUnicodeString&)
Begins a group of primitives.
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()
Terminates generation.
o DrvEndClosedFigure()
Ends current closed figure.
o DrvEndGroup()
Ends current group of primitives.
o DrvFillArea(int,int*,float*)
Fills a polypolygon in device coordinates with current fill color.
o DrvFormFeed()
Starts a new page.
o DrvFormFeed(CATUnicodeString&)
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 DrvSetPolygonFillRule(CATPrintFillRule)
Sets the polygon filling rule.
o DrvSetTextAttribute(CATPrintTextAttribute,float)
Defines text attributes.
o DrvSetTextAttribute(CATPrintTextAttribute,CATFont*)
Defines current text font.
o DrvStartNewRegion()
Begins a new region inside the closed figure.
o End()
Terminates generation.
o EndClosedFigure()
Ends current closed figure.
o EndDrawScissor(void)
Ends the clipping the image from the polygon.
o EndGroup()
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 GetCurrentFilterEnable()
Deprecated R214 In favor of virtual eRasterizationMode GetRasterizationMode (void) const; Retrieves the flag _currentFilterEnable
o GetDeviceCoordinates(float&,float&)
Converts from user coordinates to device coordinates.
o GetDeviceMatrix(CATMath3x3Matrix&)
Retrieve Device Matrix
o GetLanguage()
Returns the name of the generated language.
o GetLineCap()
Retrieves the current line cap style.
o GetLineJoin()
Retrieves the current line join style.
o GetOrigin(float&,float&)
Returns current printing offset from the lower left corner of the sheet.
o GetProperties()
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 GetRasterizationMode()
Retrieves the current rasterization mode.
o GetScale(void)
Returns current printing scale.
o IsMultipageSupported()
Returns true if the Generator support multipage generation<
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 Rasterize()
Deprecated R214 In favor of virtual CATRasterizationData Rasterize(int iSize, CATBoolean iRemove = TRUE);
o Rasterize(int,CATBoolean)
Returns the image memory representation TODO: Control the way the image is rasterized(select primitive type, area .
o SelectDrawColor(int)
Selects the current drawing color.
o SelectFillColor(int)
Selects the current filling color.
o SetBlendingMode(CAT2DGBlendingMode)
Sets the blending mode.
o SetCurrentFilterEnable(CATBoolean&)
Deprecated R214 In favor of virtual void SetRasterizationMode (eRasterizationMode iRasterizationMode) Sets the flag _currentFilterEnable
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 SetGradient(CATPrintGradient* const)
Sets the gradient features.
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 SetPolygonFillRule(CATPrintFillRule)
Sets the polygon filling rule.
o SetRasterizationMode(eRasterizationMode)
Sets the rasterization mode.
o SetScale(float)
Defines the plotting iScale.
o SetTextAttribute(CATPrintTextAttribute,float)
Defines current text attributes.
o SetTextAttribute(CATPrintTextAttribute,CATFont*)
Defines current text font.
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()
Begins a new region inside the closed figure.

Data Member Index


o _drawHeight
o _pageNumber
o _y0

Constructor and Destructor


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

Methods


o AddRaster
public virtual AddRaster( const iRasterizationData)
Draw the filter with the CATPixelImage in parameter.
Parameters:
iImage
The image filter to display.
o Begin
public virtual Begin( const iParameters)
Initializes generation with given parameters.
Parameters:
iParameters
The generator parameters.
o Begin
public virtual Begin( const iParameters,
const iPageTitle)
Initializes generation with given parameters.
Parameters:
iParameters
The generator parameters.
iPageTitle
First page title.
o BeginClosedFigure
public virtual BeginClosedFigure()
Begins a closed figure.
o BeginDrawScissor
public virtual BeginDrawScissor( iNpoints,
const 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 BeginDrawScissors
public virtual BeginDrawScissors( const iPolyPolygonDefinition)
o BeginGroup
public virtual BeginGroup( const iId)
Begins a group of primitives.
Parameters:
iId
The id of the group.
o DefineColor
public virtual DefineColor( iIndex,
iRed,
iGreen,
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 DisplayFilter
public virtual DisplayFilter( iImage)
Deprecated R214 In favor of virtual void AddRaster(CATRasterizationData iRasterizationData); Draw the filter with the CATPixelImage in parameter.
Parameters:
iImage
The image filter to display.
o DrawArcCircle
public virtual DrawArcCircle( iX0,
iY0,
iRadius,
iStartAngle= 0.f,
iEndAngle= CAT2PI,
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 DrawArcEllipse( iX0,
iY0,
iHradius,
iVradius,
iStartAngle= 0.f,
iEndAngle= CAT2PI,
iSlope= 0.f,
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 DrawBitmap( iX,
iY,
iOrientation,
const 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 DrawConnectingEdge( )
Draw the edge closing the closed figure.
o DrawDisjointPolyline
public virtual DrawDisjointPolyline( iNpoints,
const 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 DrawGeometricText( iX,
iY,
const 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 DrawLine( iX0,
iY0,
iX1,
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 DrawMarker( iX,
iY,
iMarker,
iSize= 0.f)
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 DrawPolyBezier( iNpoints,
const 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 DrawPolyPolygon( iNoutlines,
const iNcorners,
const 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 DrawPolyQuadraticBezier( iNpoints,
const 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 DrawPolygon( iNcorners,
const 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 DrawPolyline( iNpoints,
const 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 DrvBegin( const iParameters)
Initializes generator with print parameters.
Parameters:
iParameters
The generator parameters.
o DrvBegin
protected virtual DrvBegin( const iParameters,
const iPageTitle)
Initializes generator with print parameters.
Parameters:
iParameters
The generator parameters.
iPageTitle
First page title.
o DrvBeginClosedFigure
protected virtual DrvBeginClosedFigure()
Begins a closed figure.
o DrvBeginGroup
protected virtual DrvBeginGroup( const iId)
Begins a group of primitives.
Parameters:
iId
The id of the group.
o DrvDefineColor
protected virtual DrvDefineColor( iIndex,
iRed,
iGreen,
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 DrvDrawArcCircle
protected virtual DrvDrawArcCircle( iX0,
iY0,
iRadius,
iStartAngle,
iEndAngle,
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 DrvDrawArcEllipse( iX0,
iY0,
iHradius,
iVradius,
iStartAngle,
iEndAngle,
iSlope,
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 DrvDrawBitmap( iX,
iY,
const iPixelImage)
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 DrvDrawConnectingEdge( )
Draw the edge closing the closed figure.
o DrvDrawPolyBezier
protected virtual DrvDrawPolyBezier( iNpoints,
const 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 DrvDrawPolyPolygon( iNoutlines,
const iNcorners,
const 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 DrvDrawPolyQuadraticBezier( iNpoints,
const 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 DrvDrawPolygon( iNcorners,
const 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 DrvDrawPolyline( iNpoints,
const iCoord,
const 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 DrvDrawText( iX,
iY,
const 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 DrvEnd()
Terminates generation.
o DrvEndClosedFigure
protected virtual DrvEndClosedFigure()
Ends current closed figure.
o DrvEndGroup
protected virtual DrvEndGroup()
Ends current group of primitives.
o DrvFillArea
protected virtual DrvFillArea( iNoutlines,
const iNcorners,
const iCoord)
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 DrvFormFeed()
Starts a new page.
o DrvFormFeed
protected virtual DrvFormFeed( const iPageTitle)
Starts a new page.
Parameters:
iPageTitle
First page title.
o DrvLineTo
protected virtual DrvLineTo( iX,
iY)
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 DrvMoveTo( iX,
iY)
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 DrvSelectDrawColor( iIndex)
Selects the current drawing color.
Parameters:
iIndex
The index of the current drawing color.
Legal values: Between 0 and 255.
o DrvSelectFillColor
protected virtual DrvSelectFillColor( iIndex)
Selects the current filling color.
Parameters:
iIndex
The index of the current filling color.
Legal values: Between 0 and 255.
o DrvSetDrawWidth
protected virtual DrvSetDrawWidth( iWidth)
Selects the current draw width.
Parameters:
iWidth
The current draw width.
o DrvSetEdgeMode
protected virtual DrvSetEdgeMode( 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 DrvSetFillMode( 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 DrvSetLineCap( 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 DrvSetLineJoin( 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 DrvSetLineStyle( iType,
iPatternLength= 0.0,
const 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 DrvSetPolygonFillRule
protected virtual DrvSetPolygonFillRule( iFillRule)
Sets the polygon filling rule.
Parameters:
iFillRule
The current polygon filling rule.
Legal values: It can be set to either CATPrintFill_EvenOdd for filling parts of polygon with odd winding number CATPrintFill_NonZero for filling parts of polygon with non-zero winding number
o DrvSetTextAttribute
protected virtual DrvSetTextAttribute( iAttribute,
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 DrvSetTextAttribute
protected virtual DrvSetTextAttribute( iAttribute,
iFont)
Defines current text font.
Parameters:
iAttribute
Legal values: It must be CATPRINTTEXT_TYPEFACE.
iFont
See CATFont for more informations.
o DrvStartNewRegion
protected virtual DrvStartNewRegion()
Begins a new region inside the closed figure.
o End
public virtual End()
Terminates generation.
o EndClosedFigure
public virtual EndClosedFigure()
Ends current closed figure.
o EndDrawScissor
public virtual EndDrawScissor( )
Ends the clipping the image from the polygon.
o EndGroup
public virtual EndGroup()
Ends current group of primitives.
o FillArea
public virtual FillArea( iNoutlines,
const iNcorners,
const 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 FillPolygon( iNcorners,
const 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 FillRectangle( iX0,
iY0,
iX1,
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 GetCurrentFilterEnable
public GetCurrentFilterEnable()
Deprecated R214 In favor of virtual eRasterizationMode GetRasterizationMode (void) const; Retrieves the flag _currentFilterEnable
Returns:
TRUE : there is a filter to be applied FALSE : there is not a filter to be applied
o GetDeviceCoordinates
public virtual GetDeviceCoordinates( ioX,
ioY)
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 GetDeviceMatrix
public virtual GetDeviceMatrix( ioDeviceMatrix)
Retrieve Device Matrix
Parameters:
ioDeviceMatrix
The device transform matrix that combines the printing Scale and Origin
o GetLanguage
public GetLanguage()
Returns the name of the generated language.
o GetLineCap
public GetLineCap()
Retrieves the current line cap style.
Returns:
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 GetLineJoin
public GetLineJoin()
Retrieves the current line join style.
Returns:
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 GetOrigin
public virtual GetOrigin( oX0,
oY0)
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 GetProperties()
Override this method to provide specific properties which can be stored and read by the printer manager.
o GetPropertiesDialog
public virtual GetPropertiesDialog( oParent)
Returns dialog used to fill specific properties.
Parameters:
oParent
The parent dialog.
o GetRasterizationMode
public virtual GetRasterizationMode()
Retrieves the current rasterization mode.
Returns:
The current rasterization mode.
o GetScale
public virtual GetScale( )
Returns current printing scale.
o IsMultipageSupported
public virtual IsMultipageSupported()
Returns true if the Generator support multipage generation<
o LineTo
public virtual LineTo( iX,
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 MoveTo( iX,
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 Rasterize
public virtual Rasterize()
Deprecated R214 In favor of virtual CATRasterizationData Rasterize(int iSize, CATBoolean iRemove = TRUE);
o Rasterize
public virtual Rasterize( iSize,
iRemove= TRUE)
Returns the image memory representation TODO: Control the way the image is rasterized(select primitive type, area .. processed)
Returns:
The rasterized image.
o SelectDrawColor
public virtual SelectDrawColor( 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 SelectFillColor( iIndex)
Selects the current filling color.
Parameters:
iIndex
The index of the current filling color.
Legal values: Between 0 and 255.
o SetBlendingMode
public virtual SetBlendingMode( const iBlendingMode)
Sets the blending mode. Default value is SrcOver that is to say [Sa + (1 - Sa) x Da, Rc = Sc + (1 - Sa) x Dc].
Parameters:
iBlendingMode
o SetCurrentFilterEnable
public SetCurrentFilterEnable( const iFilterEnable)
Deprecated R214 In favor of virtual void SetRasterizationMode (eRasterizationMode iRasterizationMode) Sets the flag _currentFilterEnable
Parameters:
iFilterEnable
TRUE : there is a filter to be applied FALSE : there is not a filter to be applied
o SetDrawWidth
public virtual SetDrawWidth( iWidth)
Selects the current draw width.
Parameters:
iWidth
The current draw width.
o SetDrawingSize
public virtual SetDrawingSize( iWidth,
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 SetEdgeMode( 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. CATPRINTEDGE_PATTERN for solid edge mode, the closed primitive edges are not drawn with a pattern color. CATPRINTEDGE_GRADIENT for solid edge mode, the closed primitive edges are not drawn with a pattern color.
o SetFillMode
public virtual SetFillMode( 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 SetGradient
public virtual SetGradient( ipGradient)
Sets the gradient features.
Parameters:
ipGradient
The structure gathering the gradient attributes.
o SetLineCap
public virtual SetLineCap( const 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 SetLineJoin( const 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 SetLineStyle( iType,
iPatternLength= 0.f,
const 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 SetOrigin( iX0,
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 SetPolygonFillRule
public virtual SetPolygonFillRule( iFillRule)
Sets the polygon filling rule.
Parameters:
iFillRule
The current polygon filling rule.
Legal values: It can be set to either CATPrintFill_EvenOdd for filling parts of polygon with odd winding number CATPrintFill_NonZero for filling parts of polygon with non-zero winding number
o SetRasterizationMode
public virtual SetRasterizationMode( iRasterizationMode)
Sets the rasterization mode.
Parameters:
iRasterizationMode
The chosen type of rasterization.
o SetScale
public virtual SetScale( iScale)
Defines the plotting iScale.
Parameters:
iScale
The plotting scale.
o SetTextAttribute
public virtual SetTextAttribute( iAttribute,
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 SetTextAttribute
public virtual SetTextAttribute( iAttribute,
iFont)
Defines current text font.
Parameters:
iAttribute
Legal values: It must be CATPRINTTEXT_TYPEFACE.
iFont
See CATFont for more informations.
o SetViewport
public virtual SetViewport( iX,
iY,
iWidth,
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 StartNewPage( const iParameters)
Starts a new page with (eventually) new parameters.
Parameters:
iParameters
Current printing parameters.
o StartNewPage
public virtual StartNewPage( const iParameters,
const iPageTitle)
Starts a new page with (eventually) new parameters.
Parameters:
iParameters
Current printing parameters.
iPageTitle
New page title.
o StartNewRegion
public virtual StartNewRegion()
Begins a new region inside the closed figure.

Data Members


o _drawHeight
  protected float _drawWidth, _drawHeight
o _pageNumber
  protected int _pageNumber
o _y0
  protected float _x0, _y0

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

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.