For information about the syntax and use of C or
C++ language, refer to your language documentation. |
The methods provided are listed in the table
below. Click the desired method to access the corresponding
description: |
|
--------------------------------------------------------------------------------------------------------------------
CATPDP_Begin
Provide 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 plug-in the function
returns an error code.
Description
This is the first call used from the V5 Printer Manager to inform
the driver plug-in the 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.
Back to Method
summary
-------------------------------------------------------------------------------------------------------------------- |
CATPDP_End
Provide global deinitialization for the plug-in driver.
Syntax
#include < CATPDPluginAPI.h >
CATPDPError CATPDP_End(void);
Parameters
No parameters
Returns
- If successful, the function returns
CATPDP_NO_ERROR
- If unsuccessful, the plug-in the function
returns an error code.
Description
The V5 Printer manager calls this function once 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 stopped.
Back to Method
summary
-------------------------------------------------------------------------------------------------------------------- |
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)
iRed Blue color in RGB
coordinates (between 0 and 1)
Returns
- If successful, the function returns
CATPDP_NO_ERROR
- If unsuccessful, the plug-in the function
returns an error code.
Description
Defines a color in rgb coordinates. This index is used for
function
CATPDP_SelectDrawColor or
CATPDP_SelectFillColor.
Back to Method
summary
-------------------------------------------------------------------------------------------------------------------- |
CATPDP_SelectDrawColor
Selects the drawing color.Syntax
#include < CATPDPluginAPI.h >
CATPDPError CATPDP_SelectDrawColor(int index);
Parameters
iIndex Index of the current drawing color
(between 0 and 255)
used for next
drawing primitive
Returns
- If successful, the function returns
CATPDP_NO_ERROR
- If unsuccessful, the plug-in the function
returns an error code.
Description
Selects the current drawing color related to the index defined by
the CATPDP_DefineColor.
Back to Method
summary
-------------------------------------------------------------------------------------------------------------------- |
CATPDP_SetDrawWidth
Selects the current draw width.
Syntax
#include < CATPDPluginAPI.h >
CATPDPError CATPDP_ SetDrawWidth (float iWidth);
Parameters
IWith Thickness in mm of the current drawing
with
used for next
drawing primitives
Returns
- If successful, the function returns
CATPDP_NO_ERROR
- If unsuccessful, the plug-in the function
returns an error code.
Description
Selects the current draw width. The width is in mm.
Back to Method
summary
-------------------------------------------------------------------------------------------------------------------- |
CATPDP_MoveTo
Moves the pen without drawing.Syntax
#include < CATPDPluginAPI.h >
CATPDPError CATPDP_MoveTo(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 plug-in the function
returns an error code.
Description
Moves the pen to (x, y) in device coordinates without drawing.
Coordinates are in mm.
Back to Method
summary
-------------------------------------------------------------------------------------------------------------------- |
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 plug-in the function
returns an error code.
Description
Draws a line from the current pen position to (x, y) in device
coordinates with current draw color, line type and draw width.
Back to Method
summary
-------------------------------------------------------------------------------------------------------------------- |
CATPDP_SelectFillColor
Selects the fill color.Syntax
#include < CATPDPluginAPI.h >
CATPDPError CATPDP_SelectFillColor (int iIndex )
Parameters
iIndex Index of the current Fill color
(between 0 and 255)
used
for next Fill primitive
Returns
- If successful, the function returns
CATPDP_NO_ERROR
- If unsuccessful, the plug-in the function
returns an error code.
Description
Selects the current filling color related to the index defined by
the CATPDP_DefineColor.
Back to Method
summary
-------------------------------------------------------------------------------------------------------------------- |
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 plug-in the function
returns an error code.
Description
Fills a polypolygon in device coordinates with current fill
color.
Back to Method
summary
-------------------------------------------------------------------------------------------------------------------- |
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 plug-in the function
returns an error code.
Description
Draws a bitmap in device coordinates at the given (x, y)
position.
Back to Method
summary
-------------------------------------------------------------------------------------------------------------------- |