
PowerDoc Objects
Glyph
Overview
This object represents a single glyph. In Power Engine API, the term glyph means a reference to a specific glyph shape which is defined in the font file. This reference is font dependent and is also called glyph index or glyph code.
Designated Rendering Function: pdDrawGlyph (20)
Links
pdTypographyPtr (1018)
Also appears in: Text Fragment, Text Line, Text Arc, Text Area, Text Design, Char, PowerGlyph, Text Path
Link to the Typography object. When standard glyphs or characters are used, this should be a link to the Typography (For Outline Fonts) object. When PowerGlyphs (or PowerChars in the future) are used, this should be a link to the Typography (For PowerFonts) object.
In either case, this link supplies typographic parameters.
Properties
pdID (1017) PD_LONG_UNSIGNED
Also appears in: Char, PowerGlyph, Library Polyline, Library Shape, Library Bitmap Image
A unique identifier that, depending on the context, represent one of the following:
a) code of a character (or PowerChar);
b) index of a glyph (or PowerGlyph);
c) index of a library shape or library polyline (see the Library of Shapes and Polylines section in the manual for details)
d) index of a library bitmap image
Example
C/C++
DT_ID_SLONG obj[7];
obj[0] = pdObjAdd(pd, 0, "Glyph Outline Style");
obj[1] = pdObjAdd(pd, 0, "Glyph Body Style");
obj[2] = pdObjAdd(pd, 0, "Glyph Shadow Style");
obj[3] = pdObjAdd(pd, 0, "Glyph Outline");
obj[4] = pdObjAdd(pd, 0, "Glyph Shadow");
obj[5] = pdObjAdd(pd, 0, "Glyph Typography");
obj[6] = pdObjAdd(pd, 0, "Glyph");
pdPropAdd(pd, obj[0], pdRGBT, "50641400", PD_HEX);
pdPropAdd(pd, obj[1], pdRGBT, "B4961400", PD_HEX);
pdPropAdd(pd, obj[1], pdEP, "030A", PD_HEX);
pdPropAdd(pd, obj[2], pdRGBT, "80808078", PD_HEX);
pdPropAdd(pd, obj[2], pdEP, "030A", PD_HEX);
pdLinkAdd(pd, obj[3], pdStylePtr, obj[0]);
pdPropAdd(pd, obj[3], pdLineThickness, "240", PD_WORD_SIGNED);
pdLinkAdd(pd, obj[4], pdStylePtr, obj[2]);
pdPropAdd(pd, obj[4], pdShadowDx, "5", PD_WORD_SIGNED);
pdPropAdd(pd, obj[4], pdShadowDy, "5", PD_WORD_SIGNED);
pdLinkAdd(pd, obj[5], pdBodyPtr, obj[1]);
pdLinkAdd(pd, obj[5], pdShadowPtr, obj[4]);
pdLinkAdd(pd, obj[5], pdOutlinePtr, obj[3]);
pdPropAdd(pd, obj[5], pdFontIndex, "0", PD_WORD_SIGNED);
pdPropAdd(pd, obj[5], pdFontDw, "190", PD_WORD_SIGNED);
pdPropAdd(pd, obj[5], pdFontDh, "190", PD_WORD_SIGNED);
pdLinkAdd(pd, obj[6], pdTypographyPtr, obj[5]);
pdPropAdd(pd, obj[6], pdID, "85", PD_WORD_UNSIGNED);
pdImgAdd(pd, obj[6], 0, 50, 250, 0, 0, 0, pdDrawGlyph, DV_NULL);
INTEGRAL DSL
local o = @(label = "") CDTObj(::my.doc, label);
local p = @(id, str, len = PD_DEFAULT) CDTProp(id, str, len);
local s = @(id, str) CDTPropStr(id, str);
local i = @(id, num) CDTPropInt(id, num);
local l = @(id, obj) CDTLink(id, obj);
local obj_0 = o("Glyph Outline Style");
local obj_1 = o("Glyph Body Style");
local obj_2 = o("Glyph Shadow Style");
local obj_3 = o("Glyph Outline");
local obj_4 = o("Glyph Shadow");
local obj_5 = o("Glyph Typography");
local obj_6 = o("Glyph");
obj_0 + s(pdRGBT, "50641400");
obj_1 + s(pdRGBT, "B4961400");
obj_1 + s(pdEP, "030A");
obj_2 + s(pdRGBT, "80808078");
obj_2 + s(pdEP, "030A");
obj_3 + l(pdStylePtr, obj_0);
obj_3 + i(pdLineThickness, 240);
obj_4 + l(pdStylePtr, obj_2);
obj_4 + i(pdShadowDx, 5);
obj_4 + i(pdShadowDy, 5);
obj_5 + l(pdBodyPtr, obj_1);
obj_5 + l(pdShadowPtr, obj_4);
obj_5 + l(pdOutlinePtr, obj_3);
obj_5 + i(pdFontIndex, 0);
obj_5 + i(pdFontDw, 190);
obj_5 + i(pdFontDh, 190);
obj_6 + l(pdTypographyPtr, obj_5);
obj_6 + i(pdID, 85);
obj_6.Pin(0, 50, 250, pdDrawGlyph);
