Index

PowerDoc Objects

Outline Definition

Overview

This object represents a definition of an object's outline. Any higher-level objects containing outlines link to this object.

Designated Rendering Function: NONE

pdStylePtr (1002)

Also appears in: Shadow Definition, Line Definition (Full), Line Definition (Standard), Line Definition (Minimal), Gradient

Link to the Surface Definition object.

This link supplies style attributes. Style attributes include color, transparency, pattern fills, special effects (e.g. blur, emboss, pattern fill) etc.

Properties

pdLineThickness (1003)   PD_LONG_SIGNED

Also appears in: Line Definition (Full), Line Definition (Standard), Line Definition (Minimal)

Line, outline or underline thickness in document units, multiplied by 100. Must be positive, except when used for glyph or character outlines. In this case, a negative value indicates that the glyph/character outline should be expanded rather than thickened.

Sample values:

350 = Line (or outline) thickness of 3.5 document units
80 = Line (or outline) thickness of 0.8 document units
-275 = Outline expansion of 2.75 document units

pdLineSegment (1052)   PD_LONG_SIGNED

Also appears in: Line Definition (Full), Line Definition (Standard), Line Definition (Minimal)

This property is used to subdivide lines and outlines into a number of smaller segments so that the line (or outline) appears dashed. The value of this property indicates the desired length of a single segment, in document units. Each segment then consists of a dash and a gap. The dash size can be specified via the pdLineDashSize property. If the dash size is not specified, then the default dash size will be used, which is approximately two thirds of the segment's length.

This property should be set to zero if segments are not desired. In this case the line (or outline) will appear solid and continuous.

Sample values:

30 = a segment that is 30 document units long
0 = no segments (line/outline is solid and continuous)

pdLineDashSize (1156)   PD_WORD_UNSIGNED

Also appears in: Line Definition (Full), Line Definition (Standard), Line Definition (Minimal)

The size of the dash, a quantity in the 0 - 65,535 range. This quantity should be understood as a percentage of the line segment length; therefore 0 means 0% of the line segment length while 65,535 means 100% of the line segment length.

The value 0 is special and means "default dash size". In this case the dash uses approximately two thirds of the segment's length, while the gap uses the remaining one third. Therefore, if the segment is 30 document units long, then each dash will be approximately 20 document units long while each gap will be approximately 10 units long.

Sample values:

0 = default dash size
9830 = dash size is 15% of the line segment length
13107 = dash size is 20% of the line segment length
32768 = dash size is 50% of the line segment length
52428 = dash size is 80% of the line segment length

pdLineTreatment (1108)   PD_BYTE_UNSIGNED

0 (000) = Outline is over text body and does not cast shadow
1 (001) = Outline is under text body and does not cast shadow
2 (010) = Outline is over text body and casts filled shadow
3 (011) = Outline is under text body and casts filled shadow
4 (100) = Outline is over text body and casts outlined shadow
5 (101) = Outline is under text body and casts outlined shadow
6 (110) = Outline is over text body and casts shadow
7 (111) = Outline is under text body and casts shadow

pdLinePerimeterGrow (1178)   PD_LONG_SIGNED

Also appears in: Line Definition (Full), Line Definition (Standard)

Perimeter line grow in document units, multiplied by 100.

Applies ony to the Rectangle, Circle/Ellipse, True Circle/Ellipse, Slice, Arc and Grid object.

pdLineMiscFlags (1201)   PD_BYTE_UNSIGNED

Also appears in: Line Definition (Full), Line Definition (Standard)

Miscellaneous line flags.

Bit 0 unset = indicates that separate line segments in Polylines, Custom Shapes and Polygons are rasterized as separate paths (in multiple rasterization passes).
Bit 0 set = indicates that separate line segments in Polylines, Custom Shapes and Polygons are rasterized as a single path (in a single rasterization pass).

In most cases there is no visual difference between these two rasterization methods. A noticeable visual difference appears only when the individual line segments are semi-transparent and they partially or fully overlap.

All other bits are reserved for future use and must be set to 0.

Example

C/C++

Example 1:

DT_ID_SLONG obj[2];

obj[0] = pdObjAdd(pd, 0, "Arc Outline Style");
obj[1] = pdObjAdd(pd, 0, "Arc Outline");

/* Properties for object 0 */
pdPropAdd(pd, obj[0], pdRGBT, "50641400", PD_HEX);

/* Properties for object 1 */
pdLinkAdd(pd, obj[1], pdStylePtr, obj[0]);
pdPropAdd(pd, obj[1], pdLineThickness, "240", PD_WORD_SIGNED);
pdPropAdd(pd, obj[1], pdLineSegment, "80", PD_WORD_UNSIGNED);



Example 2:

DT_ID_SLONG obj[2];

obj[0] = pdObjAdd(pd, 0, "TextLine Outline Style");
obj[1] = pdObjAdd(pd, 0, "TextLine Outline");

/* Properties for object 0 */
pdPropAdd(pd, obj[0], pdRGBT, "50641400", PD_HEX);

/* Properties for object 1 */
pdLinkAdd(pd, obj[1], pdStylePtr, obj[0]);
pdPropAdd(pd, obj[1], pdLineThickness, "240", PD_WORD_SIGNED);

INTEGRAL DSL

/* Lambda shortcuts */

local o = @(label = "") CDTObj(::my.doc, label); /* to make object */
local p = @(id, str, len = PD_DEFAULT) CDTProp(id, str, len); /* to add property - general */
local s = @(id, str) CDTPropStr(id, str); /* to add property - string */
local i = @(id, num) CDTPropInt(id, num); /* to add property - integer */
local l = @(id, obj) CDTLink(id, obj); /* to add link */

/* Objects */

local obj_0 = o("Arc Outline Style");
local obj_1 = o("Arc Outline");

/* Object Properties */

obj_0 + s(pdRGBT, "50641400");

obj_1 + l(pdStylePtr, obj_0);
obj_1 + i(pdLineThickness, 240);
obj_1 + i(pdLineSegment, 80);
 

Index