Index

PowerDoc Objects

System Guide

Overview

This object describes a system guide. A system guide is a special object whose purpose is to help align and position other objects on the page, or to set various extents and bounding boxes that might be important to visually indicate. Guides are visible only when object origins are visible.

Designated Rendering Function: pdDrawSysGuide (-2) or pdDrawSysGuideDashed (-3)

None

Properties

pdRGBT (1001)   PD_HEX

Also appears in: Surface Definition, Background Surface

Color and transparency (4 bytes)

The first three bytes specify the intensity of red (R), green (G) and blue (B) while the last byte specifies the transparency level (T). All values are in the 0-255 range. The value 0 means minimum intensity, 255 means maximum intensity.

The length of this field, when converted to the binary format, is precisely 4 bytes.

Sample values:

"00 00 00 00" (0, 0, 0, 0) = Fully Black, Fully Opaque
"00 00 00 7F" (0, 0, 0, 127) = Fully Black, 50% Transparent
"FF 00 00 00" (255, 0, 0, 0) = Fully Red, Fully Opaque
"00 FF 00 7F" (0, 255, 0, 127) = Fully Green, 50% Transparent
"FF FF FF FF" (255, 255, 255, 255) = Fully White, Fully Transparent
"00 7F 00 00" (0, 127, 0, 0) = 50% Green, Fully Transparent
"7F 7F 7F 7F" (127, 127, 127, 127) = Gray, 50% Transparent

pdAttribs (1094)   PD_BYTE_UNSIGNED

Also appears in: Group Member

Attributes of an object.

1) When used to build the Group Member object, this value should be interpreted as follows:

Bit 0 unset = indicates a visible PowerDoc object.
Bit 0 set = indicates a hidden PowerDoc object. Hidden object are not rendered.

Bit 2 unset = do not use fractional positioning for object origins.
Bit 2 set = use fractional positioning for object origins.

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

2) When used to build the System Guide object, the interpretation is different:

Bit 0 = If set, show right part of the guide
Bit 1 = If set, show bottom part of the guide
Bit 2 = If set, show left part of the guide
Bit 3 = If set, show top part of the guide
Bit 4 = If set, the right part is just a short segment, otherwise it is infinitely long
Bit 5 = If set, the bottom part is just a short segment, otherwise it is infinitely long
Bit 6 = If set, the left part is just a short segment, otherwise it is infinitely long
Bit 7 = If set, the top part is just a short segment, otherwise it is infinitely long

Example

C/C++

DT_ID_SLONG obj[1];

obj[0] = pdObjAdd(pd, 0, "System Guide");

/* Properties for object 0 */
pdPropAdd(pd, obj[0], pdRGBT, "B4961400", PD_HEX);
pdPropAdd(pd, obj[0], pdAttribs, "15", PD_BYTE_UNSIGNED);


/* Image placement */
pdImgAdd(pd, obj[0], 0, 50, 50, 0, 0, 0, pdDrawSysGuide, DV_NULL);

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("System Guide");

/* Object Properties */

obj_0 + s(pdRGBT, "B4961400");
obj_0 + i(pdAttribs, 15);

/* Image Pinning */

obj_0.Pin(0, 50, 50, pdDrawSysGuide);
 

Index