Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 154

Previous Page 153   Index   Next Page 155

Function Reference
Page 154 of 750
if you would work with a normal template whose lower left corner is set to zero. This works with
bottom-up and top-down coordinates.
Another way to avoid coordinate problems is to create the group in the size of the object in which the
soft mask should be used. You can now draw into the group as if you would draw into the page or
template. When finish, adjust the bounding box with SetBBox() to the required size.
Isolated and Non-Isolated Groups
The parameter Isolated specifies whether the initial backdrop of the group should be fully opaque or
initialized to the current backdrop when the group is entered. Depending on how objects are drawn
various effects can be achieved.
Knockout Groups
A knockout group is rendered as a hole, that means the top most group knockouts the groups below.
The effect is as if the nested groups would be opaque, the top most wins. A knockout group is not
meaningful if it does not draw other transparency groups since there is nothing that can be knocked
out if no other groups are drawn. A knockout group can be useful if the entire group is composited
with a soft mask.
Color Spaces
The color space in which a transparency group is rendered can be any device, ICC based, or
calibrated color space, but no Lab, Indexed, DeviceN or Separation color space. If a non-device color
space should be used then pass the handle of that color space to the parameter CSHandle. For device
color spaces this parameter will be ignored.
The blending color space is important if the group should be composited with the background with a
blend function. Since the result of blend functions depend strongly on the used color space, the
blending color space makes sure that the same result can be achieved on different devices.
If no blend functions are used the blending color space should be set to DeviceGray or to a gray
based ICC based color space.
How to use a Transparency Group?
As mentioned earlier a transparency group is just an extended template. A stand alone transparency
group is placed on a page with PlaceTemplate() or PlaceTemplateEx() as usual. The only difference is
that we use mostly a blend mode or a soft mask to composite the group with the backdrop.
All transparency related settings can be changed with an extended graphics state. The function
CreateExtGState() creates such an extended graphics state, and SetExtGState() activates it, typically
right before the group is placed on the page with PlaceTemplate():
grp = pdfBeginTransparencyGroup(pdf, ...);
pdfEndTemplate(pdf, ...);
 

Previous topic: Coordinates and bounding box of a soft mask:

Next topic: Bezier_1_2_3