Index

PowerDoc Objects

Shadow Definition

Overview

This object represents a set of standard shadow properties. Any higher-level objects that have a shadow link to this object.

Designated Rendering Function: NONE

pdStylePtr (1002)

Also appears in: Line Definition (Full), Outline Definition, 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

pdShadowDx (1004)   PD_WORD_SIGNED

Shadow or glow offset in horizontal direction, in document units. Can be positive or negative.

Sample values:

10 = Offset of 10 document units in horizontal direction
-10 = Offset of -10 document units in horizontal direction

pdShadowDy (1005)   PD_WORD_SIGNED

Shadow or glow offset in vertical direction, in document units. Can be positive or negative.

Sample values:

5 = Offset of 5 document units in vertical direction
-5 = Offset of -5 document units in vertical direction

Example

C/C++

DT_ID_SLONG obj[2];

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

/* Properties for object 0 */
pdPropAdd(pd, obj[0], pdRGBT, "80808078", PD_HEX);
pdPropAdd(pd, obj[0], pdEP, "030A", PD_HEX);

/* Properties for object 1 */
pdLinkAdd(pd, obj[1], pdStylePtr, obj[0]);
pdPropAdd(pd, obj[1], pdShadowDx, "5", PD_WORD_SIGNED);
pdPropAdd(pd, obj[1], pdShadowDy, "5", 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("TextLine Shadow Style");
local obj_1 = o("TextLine Shadow");

/* Object Properties */

obj_0 + s(pdRGBT, "80808078");
obj_0 + s(pdEP, "030A");

obj_1 + l(pdStylePtr, obj_0);
obj_1 + i(pdShadowDx, 5);
obj_1 + i(pdShadowDy, 5);
 

Index