DynaPDF Manual - Page 620

Previous Page 619   Index   Next Page 621

Function Reference
Page 620 of 839
Vector Graphics
To extract vector graphics the following callback functions should be set:
TBeginPattern
TEndPattern
// Optional
TBeginTemplate
TBezierTo1
TBezierTo2
TBezierTo3
TClipPath
TClosePath
TEndTemplate
// Optional
TLineTo
TMoveTo
TMulMatrix
TRectangle
TRestoreGraphicState
TSaveGraphicState
TSetExtGState
// Optional
TSetFillColor
TSetLineCapStyle
TSetLineDashPattern
TSetLineJoinStyle
TSetLineWidth
TSetMiterLimit
TSetStrokeColor
The graphics state should contain these variables:
Parameter
Type
Initial Value
Clipping Path
Vector array
Crop box or Media box
DashPattern
double*
NULL (Solid line)
DashPhase
UI32
0
FillColor
double[32]
Black
FillColorSpace
TExtColorSpace, IColorSpace*
esDeviceGray, NULL
FillPattern
IPattern*
NULL
LineCapStyle
TLineCapStyle
csButtCap
LineJoinStyle
TLineJoinStyle
jsMiterJoin
LineWidth
float
0.0f
Matrix
TCTM
{1, 0, 0, 1, 0, 0}
MiterLimit
float
10.0f
StrokeColor
double[32]
Black
StrokeColorSpace
TExtColorSpace, IColorSpace*
esDeviceGray, NULL
StrokePattern
IPattern*
NULL
If vector graphics should be processed in a unique device color space then it is usually best to
convert PDF colors directly to the device color space with ConvColor() and to store the device color
then in the graphics state. The data type of the members FillColor and StrokeColor must then be
changed to unsigned int (UI32). There is no need to store the fill and stroke color space in the
graphics state in this case.
 

Previous topic: Helper functions, 16 bit images

Next topic: PlaceImage, PlaceSigFieldValidateIcon