DynaPDF Manual - Page 255

Previous Page 254   Index   Next Page 256

Function Reference
Page 255 of 821
The function creates an extended graphics state object from the structure GS. An extended graphics
state can be used to adjust certain properties which are not part of the normal graphics state. Such
properties can only be modified with a special PDF object called the Extended Graphics State.
The most important properties of an extended graphics state are the transparency settings (PDF 1.4)
and the overprint control (PDF 1.2 or 1.3, see below).
The structure GS must always be initialized with InitGState(). After the structure was initialized
certain members of the structure can be changed. Pass the variable then to CreateExtGState(). The
function creates an internal graphics state object and returns the handle of it. The extended graphics
state can now be applied with SetExtGState().
Note that there is only way to restore the values of an extended graphics state, you must set a
second extended graphics state that restores the values changed before.
The following values are allowed:
AlphaIsShape
-> 0 or 1 (PDF 1.4, default unknown, does nothing)
AutoStrokeAdjust -> 0 or 1 (PDF 1.4, default 0)
BlendMode
-> see enum TBlendMode (PDF 1.4, default bmNormal)
FlatnessTol
-> 0.0..1.0, default none
FillAlpha
-> 0.0..1.0 (PDF 1.4, default 1.0)
OverPrintFill
-> 0 or 1 (PDF 1.2 if used alone, PDF 1.3
otherwise,
default 0)
OverPrintStroke
-> 0 or 1 (PDF 1.3, default 0)
OverPrintMode
-> 0 or 1 (PDF 1.3, default 0)
RenderingIntent
-> see enum TRenderingIntent (PDF 1.1, default
riRelativeColorimetric)
SmoothnessTol;
-> 0.0..1.0 (PDF 1.3, default none)
StrokeAlpha
-> 0.0..1.0 (PDF 1.4, default 1.0)
TextKnockout
-> 0 or 1 (PDF 1.4, default 1)
SoftMaskNone
-> true or false, default false
A value that should not be modified must not be changed.
The structure contains many reserved fields which are not used at this time. Future extensions will
replace reserved fields.
If an image should be inserted with transparency it is usually best to disable image transparency
which based on color key masking (see SetUseTransparency()). Images use the fill alpha constant as
alpha channel. Blend modes can be applied too. However, the result of blend modes depends
strongly on the used color space. If the image is not defined in an ICC based color space then the
result depends on the color management settings.
Whenever transparency related settings are changed (FillAlpha, StrokeAlpha, or BlendMode) it is
strongly recommended to attach an ICC profile of the output color space for which the file was
created with AddOutputIntent().
 

Previous topic: CreateExtGState

Next topic: CreateGoToAction


Start Chat