Index

PowerDoc Objects

PowerFont Record

Overview

PowerFont Record is a special object that contains a complete description of a PowerGlyph design. PowerGlyphs designs are like regular glyph shapes found in outline fonts, but are constructed using PowerDoc objects. Each PowerFont Record corresponds to exactly one PowerGlyph design.

PowerRecords are the building blocks used to construct the PowerFont object.

Designated Rendering Function: NONE

pdFnDrawObjectPtr (1085)

Also appears in: Group Member, Generic Object

Link to any visual PowerDoc object (i.e. any object with a designated FnDraw rendering function).

The pdFnDraw property describes the visual object pointed by the pdFnDrawObjectPtr link. If pdFnDraw is missing, it is assumed pdFnDrawObjectPtr points to the Group object.

pdPowerFontRecordPtr (1092)

Also appears in: PowerFont

Link to the PowerFontRecord object.

This link in used to establish a link to the next PowerFont record.

Properties

pdFnDraw (1086)   PD_WORD_SIGNED

Also appears in: Group Member, Generic Object

Rendering function that describes the visual object pointed to by the pdFnDrawObjectPtr link.

Supported values:

0 = Nothing
1 = Text Line
2 = Text Arc
3 = Text Area
4 = Line
5 = Circle/Ellipse
6 = Rectangle
7 = True Circle/Ellipse
8 = Slice
9 = Arc
10 = Rich Text Area
11 = Pattern
12 = Grid
13 = Custom Shape or Polygon
14 = Gradient, Gradient (As Fast Rectangle), Gradient (As Inverter)
15 = Bitmap Image
16 = Char
17 = Rich Text Line
18 = Library Shape
19 = Rich Text Arc
20 = Glyph
21 = Generic Object
22 = Group
23 = PowerGlyph
24 = Polyline (also Bezier and B-Spline curves)
25 = Library Polyline
26 = Text Design
27 = Rich Text Design
28 = Text Path
29 = Rich Text Path
30 = Library Bitmap Image
31 = Background Surface
10000 = Button
10001 = Radio Button
10002 = Check Box
10003 = Text Box
10004 = List Box
10005 = Horizontal Slider
10006 = Vertical Slider
10007 = Rich Text Box
10008 = Rich Button

pdDw (1029)   PD_LONG_SIGNED

Also appears in: PowerFont, Library Polyline, Library Shape, Line, Rectangle, Circle/Ellipse, Pattern, Grid, Gradient, Gradient (As Fast Rectangle), Gradient (As Inverter), Bitmap Image, Library Bitmap Image, 3D Model

In general, this property represents the width of a line, shape or some other object in document units. Most objects assume a positive width. However, some objects (e.g. lines) can have either a positive or a negative width. In these cases, this property also indicates the direction.

This property may also be used for some other more specific purposes. For example, in PowerFonts it refers to the font's base width (or horizontal units per em-square). Similarly, in PowerFont records this property serves as the advance width of a glyph.

Sample values:

500 = Width of 500 document units
-200 = Width of -200 document units

Example

C/C++

DT_ID_SLONG obj[14];

obj[0] = pdObjAdd(pd, 0, "Surface Style");
obj[1] = pdObjAdd(pd, 0, "Outline Style");
obj[2] = pdObjAdd(pd, 0, "TextLine Body Style");
obj[3] = pdObjAdd(pd, 0, "Line Definition");
obj[4] = pdObjAdd(pd, 0, "LibShape");
obj[5] = pdObjAdd(pd, 0, "LibShape");
obj[6] = pdObjAdd(pd, 0, "TextLine Typography");
obj[7] = pdObjAdd(pd, 0, "Text Layout");
obj[8] = pdObjAdd(pd, 0, "TextLine");
obj[9] = pdObjAdd(pd, 0, "Group Member #0");
obj[10] = pdObjAdd(pd, 0, "Group Member #1");
obj[11] = pdObjAdd(pd, 0, "Group Member #2");
obj[12] = pdObjAdd(pd, 0, "Group");
obj[13] = pdObjAdd(pd, 0, "PowerFont Record");

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

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

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

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

/* Properties for object 4 */
pdLinkAdd(pd, obj[4], pdOutlinePtr, obj[3]);
pdPropAdd(pd, obj[4], pdID, "56", PD_WORD_UNSIGNED);
pdPropAdd(pd, obj[4], pdDw, "300", PD_LONG_SIGNED);
pdPropAdd(pd, obj[4], pdDh, "300", PD_LONG_SIGNED);

/* Properties for object 5 */
pdLinkAdd(pd, obj[5], pdBodyPtr, obj[0]);
pdPropAdd(pd, obj[5], pdID, "56", PD_WORD_UNSIGNED);
pdPropAdd(pd, obj[5], pdDw, "270", PD_LONG_SIGNED);
pdPropAdd(pd, obj[5], pdDh, "270", PD_LONG_SIGNED);

/* Properties for object 6 */
pdLinkAdd(pd, obj[6], pdBodyPtr, obj[2]);
pdPropAdd(pd, obj[6], pdFontIndex, "0", PD_WORD_SIGNED);
pdPropAdd(pd, obj[6], pdFontDw, "95", PD_WORD_SIGNED);
pdPropAdd(pd, obj[6], pdFontDh, "130", PD_WORD_SIGNED);
pdPropAdd(pd, obj[6], pdSkewHor, "0", PD_WORD_SIGNED);
pdPropAdd(pd, obj[6], pdSkewVer, "0", PD_WORD_SIGNED);
pdPropAdd(pd, obj[6], pdRotation, "0", PD_WORD_SIGNED);

/* Properties for object 7 */
pdPropAdd(pd, obj[7], pdKerning, "1", PD_BYTE_UNSIGNED);
pdPropAdd(pd, obj[7], pdAlign, "0", PD_BYTE_UNSIGNED);
pdPropAdd(pd, obj[7], pdAlignEnd, "0", PD_BYTE_UNSIGNED);
pdPropAdd(pd, obj[7], pdRelativeDirection, "0", PD_BYTE_UNSIGNED);

/* Properties for object 8 */
pdLinkAdd(pd, obj[8], pdTypographyPtr, obj[6]);
pdLinkAdd(pd, obj[8], pdTextLayoutPtr, obj[7]);
pdPropAdd(pd, obj[8], pdTextString_08, "STOP", PD_ASC);

/* Properties for object 9 */
pdLinkAdd(pd, obj[9], pdGroupMemberPtr, obj[10]);
pdLinkAdd(pd, obj[9], pdFnDrawObjectPtr, obj[4]);
pdPropAdd(pd, obj[9], pdFnDraw, "18", PD_WORD_SIGNED);
pdPropAdd(pd, obj[9], pdDx, "0", PD_LONG_SIGNED);
pdPropAdd(pd, obj[9], pdDy, "-300", PD_LONG_SIGNED);

/* Properties for object 10 */
pdLinkAdd(pd, obj[10], pdGroupMemberPtr, obj[11]);
pdLinkAdd(pd, obj[10], pdFnDrawObjectPtr, obj[5]);
pdPropAdd(pd, obj[10], pdFnDraw, "18", PD_WORD_SIGNED);
pdPropAdd(pd, obj[10], pdDx, "15", PD_LONG_SIGNED);
pdPropAdd(pd, obj[10], pdDy, "-285", PD_LONG_SIGNED);

/* Properties for object 11 */
pdLinkAdd(pd, obj[11], pdFnDrawObjectPtr, obj[8]);
pdPropAdd(pd, obj[11], pdFnDraw, "1", PD_WORD_SIGNED);
pdPropAdd(pd, obj[11], pdDx, "19", PD_LONG_SIGNED);
pdPropAdd(pd, obj[11], pdDy, "-102", PD_LONG_SIGNED);

/* Properties for object 12 */
pdLinkAdd(pd, obj[12], pdGroupMemberPtr, obj[9]);

/* Properties for object 13 */
pdLinkAdd(pd, obj[13], pdFnDrawObjectPtr, obj[12]);
pdPropAdd(pd, obj[13], pdDw, "350", PD_LONG_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("Surface Style");
local obj_1 = o("Outline Style");
local obj_2 = o("TextLine Body Style");
local obj_3 = o("Line Definition");
local obj_4 = o("LibShape");
local obj_5 = o("LibShape");
local obj_6 = o("TextLine Typography");
local obj_7 = o("Text Layout");
local obj_8 = o("TextLine");
local obj_9 = o("Group Member #0");
local obj_10 = o("Group Member #1");
local obj_11 = o("Group Member #2");
local obj_12 = o("Group");
local obj_13 = o("PowerFont Record");

/* Object Properties */

obj_0 + s(pdRGBT, "FF004000");

obj_1 + s(pdRGBT, "00000000");

obj_2 + s(pdRGBT, "FFFFFF00");

obj_3 + l(pdStylePtr, obj_1);
obj_3 + i(pdLineThickness, 400);

obj_4 + l(pdOutlinePtr, obj_3);
obj_4 + i(pdID, 56);
obj_4 + i(pdDw, 300);
obj_4 + i(pdDh, 300);

obj_5 + l(pdBodyPtr, obj_0);
obj_5 + i(pdID, 56);
obj_5 + i(pdDw, 270);
obj_5 + i(pdDh, 270);

obj_6 + l(pdBodyPtr, obj_2);
obj_6 + i(pdFontIndex, 0);
obj_6 + i(pdFontDw, 95);
obj_6 + i(pdFontDh, 130);
obj_6 + i(pdSkewHor, 0);
obj_6 + i(pdSkewVer, 0);
obj_6 + i(pdRotation, 0);

obj_7 + i(pdKerning, 1);
obj_7 + i(pdAlign, 0);
obj_7 + i(pdAlignEnd, 0);
obj_7 + i(pdRelativeDirection, 0);

obj_8 + l(pdTypographyPtr, obj_6);
obj_8 + l(pdTextLayoutPtr, obj_7);
obj_8 + s(pdTextString_08, "STOP");

obj_9 + l(pdGroupMemberPtr, obj_10);
obj_9 + l(pdFnDrawObjectPtr, obj_4);
obj_9 + i(pdFnDraw, 18);
obj_9 + i(pdDx, 0);
obj_9 + i(pdDy, -300);

obj_10 + l(pdGroupMemberPtr, obj_11);
obj_10 + l(pdFnDrawObjectPtr, obj_5);
obj_10 + i(pdFnDraw, 18);
obj_10 + i(pdDx, 15);
obj_10 + i(pdDy, -285);

obj_11 + l(pdFnDrawObjectPtr, obj_8);
obj_11 + i(pdFnDraw, 1);
obj_11 + i(pdDx, 19);
obj_11 + i(pdDy, -102);

obj_12 + l(pdGroupMemberPtr, obj_9);

obj_13 + l(pdFnDrawObjectPtr, obj_12);
obj_13 + i(pdDw, 350);
 

Index