CATPDP_Begin
CATPDP_Begin provides global initialization for the plug-in driver.
Syntax
#include < CATPDPluginAPI.h >
CATPDPError CATPDP_Begin(const CATPDPParameters& iParam);
Parameters
iParams
|
Global structure data parameters Various user printing options
|
Returns
- If successful, the function returns CATPDP_NO_ERROR
- If unsuccessful, the function returns an error code.
DescriptionThis is the first call used from the Printer Manager to inform the
driver plug-in that the printing is started. The Printer Manager
fills the CATPDPParameters according to the user choices. This
structure is then passed to the plug-in by calling the CATPDP_Begin
function.

CATPDP_End
CATPDP_End provides global deinitialization for the plug-in driver.
Syntax#include < CATPDPluginAPI.h >
CATPDPError CATPDP_End(void);
Returns
- If successful, the function returns CATPDP_NO_ERROR
- If unsuccessful, the function returns an error code.
DescriptionThe Printer Manager calls this function when the printing is done.
Be sure to release allocations, instances or file I/O flushing in
this function. After this call the plug-in driver is unloaded and
the printing is stopped.

CATPDP_DefineColor
CATPDP_DefineColor defines a color in the palette.
Syntax#include < CATPDPluginAPI.h >
CATPDPError CATPDP_DefineColor(int iIndex , float iRed, float
iGreen, float iBlue);
Parameters
iIndex
|
Index in the color table (between 0 and 255)
|
iRed
|
Red color in RGB coordinates (between 0 and 1)
|
iGreen
|
Green color in RGB coordinates (between 0 and 1)
|
iBlue
|
Blue color in RGB coordinates (between 0 and 1)
|
Returns
- If successful, the function returns CATPDP_NO_ERROR
- If unsuccessful, the function returns an error code.

CATPDP_SelectDrawColor
CATPDP_SelectDrawColor selects the drawing color.
Syntax#include < CATPDPluginAPI.h >
CATPDPError CATPDP_SelectDrawColor(int index);
Returns
- If successful, the function returns CATPDP_NO_ERROR
- If unsuccessful, the function returns an error code.
DecsriptionSelects the current drawing color related to the index defined by
the CATPDP_DefineColor.

CATPDP_SetDrawWidth
CATPDP_ SetDrawWidth selects the current draw width.
Syntax#include < CATPDPluginAPI.h >
CATPDPError CATPDP_ SetDrawWidth (float iWidth);
Returns
- If successful, the function returns CATPDP_NO_ERROR
- If unsuccessful, the function returns an error code.
DescriptionSelects the current draw width. The width is in mm.

CATPDP_MoveTo
CATPDP_MoveTo moves the pen without drawing.
Syntax#include < CATPDPluginAPI.h >
CATPDPError (float iX, float iY);
Parameters
iX
|
X coordinate to move
|
iY |
Y coordinate to move
|
Returns
- If successful, the function returns CATPDP_NO_ERROR
- If unsuccessful, the function returns an error code.
DescriptionMoves the pen to (x, y) in device coordinates without drawing.
Coordinates are in mm.

CATPDP_LineTo
CATPDP_LineTo draws a line.
Syntax#include < CATPDPluginAPI.h >
CATPDPError CATPDP_LineTo(float iX, float iY)
Parameters
iX
|
X coordinate to draw
|
iY |
Y coordinate to draw
|
Returns
- If successful, the function returns CATPDP_NO_ERROR
- If unsuccessful, the function returns an error code.
DescriptionDraws a line from the current pen position to (x, y) in device
coordinates with current draw color, line type and draw width.

CATPDP_SelectFillColor
CATPDP_SelectFillColor selects the fill color.
Syntax#include < CATPDPluginAPI.h >
CATPDPError CATPDP_SelectFillColor (int iIndex)
Returns
- If successful, the function returns CATPDP_NO_ERROR
- If unsuccessful, the function returns an error code.
DescriptionSelects the current filling color related to the index defined by
the CATPDP_DefineColor.

CATPDP_FillArea
CATPDP_FillArea fills a polypolygon.
Syntax#include < CATPDPluginAPI.h >
CATPDPError CATPDP_FillArea(int iOutlines, const int* iCorners,
const float* iCoord)
Parameters
IOutlines
|
Number of polygons in the polypolygon |
iCorners
|
Array of outlines integers giving the number of corners in
each
polygon
|
iCoord
|
Array of floats giving the coordinates of alls corners of
each
polygon
|
Returns
- If successful, the function returns CATPDP_NO_ERROR
- If unsuccessful, the function returns an error code.
DescriptionFills a polypolygon in device coordinates with current fill color.
CATPDP_DrawBitmap
CATPDP_DrawBitmap draws a bitmap.
Syntax#include < CATPDPluginAPI.h >
CATPDPError CATPDP_DrawBitmap(float iX, float iY, const int
iTypeOfBitmap, const unsigned char* iPixels, const int iSize);
Parameters
iX
|
X coordinate of the bitmaps to draw
|
iY |
Y coordinate of the bitmaps to draw
|
iTypeOfBitmap
|
Color mode of bitmap: 0 = RGB, 1 = Black and White
bitmap
|
iPixels
|
Array of pixels
|
iSize
|
Size in bytes of the pixel array
|
Returns
- If successful, the function returns CATPDP_NO_ERROR
- If unsuccessful, the function returns an error code.
DescriptionDraws a bitmap in device coordinates at the given (x, y) position.
|