Index

PowerDoc Objects

Library Bitmap Image

Overview

This object describes a bitmap image defined in Power Engine's internal library of pre-defined bitmap images.

Designated Rendering Function: pdDrawLibraryImage (30)

None

Properties

pdDw (1029)   PD_LONG_SIGNED

Also appears in: PowerFont Record, PowerFont, Library Polyline, Library Shape, Line, Rectangle, Circle/Ellipse, Pattern, Grid, Gradient, Gradient (As Fast Rectangle), Gradient (As Inverter), 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

pdDh (1030)   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, 3D Model

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

This property may also be used for some other more specific purposes. For example, in PowerFonts this property refers to the font's base height (or vertical units per em-square).

Sample values:

400 = Height of 400 document units
-100 = Height of -100 document units

pdT (1000)   PD_BYTE_UNSIGNED

Also appears in: Bitmap Image

Transparency. The value 0 means minimum intensity, 255 means maximum intensity.

Sample values:

0 = Fully opaque
127 = 50% transparent
255 = Fully transparent

pdQuality (1047)   PD_BYTE_UNSIGNED

Also appears in: Bitmap Image

Quality.

Supported values:

0 = Low Quality But Fast
1 = High Quality But Slower
2 = Very High Quality But Slower
3 = Very High Quality (More Blur) But Slower

pdSmoothing (1137)   PD_BYTE_UNSIGNED

Also appears in: Bitmap Image

Edge smoothing for bitmap images. Respected only when the bitmap image's quality level is set to 1, 2 or 3.

Supported values:

0 = Edge smoothing is off
1 = Edge smoothing is on, inward (does not change the image boundary)
2 = Edge smoothing is on, outward (extends the image boundary by a small amount)

pdRangeRR (1049)   PD_HEX

Also appears in: Bitmap Image

Initial and final intensity of red (2 bytes). Used for grayscale images.

Sample values:

"00 FF" = initial intensity is 0, final intensity is 255
"CC 0A " = initial intensity is 204, final intensity is 10

pdBackground (1138)   PD_HEX

Also appears in: Bitmap Image

Background color bytes when edge smoothing is enabled (4 bytes). This property is respected only when edge smoothing is enabled, as follows:

- In RGBA images all 4 bytes are used; these 4 bytes represent the background color of an image. The color value is interpreted the same way as the color value of each individual pixel in the corresponding pdImageDataRGBAlpha property of the Bitmap Image Data object.

- In RGB images the first three bytes are used; these 3 bytes represent the background color of an image. The color value is interpreted the same way as the color value of each individual pixel in the corresponding pdImageDataRGB property of the Bitmap Image Data object. The fourth byte is unused and should be set to 255.

- In GA images the first two bytes are used; these 2 bytes represent the background color of an image. The color value is interpreted the same way as the color value of each individual pixel in the corresponding pdImageDataGrayAlpha property of the Bitmap Image Data object. The last two bytes are unused and should be set to 255.

- In G images only the first byte is used; this byte represent the background color of an image. The color value is interpreted the same way as the color value of each individual pixel in the corresponding pdImageDataGray property of the Bitmap Image Data object. The last three bytes are unused and should be set to 255.

In all cases, the pdOrderingArr property affects the used bytes the same way as it affects the corresponding bytes in the pdImageDataRGBAlpha, pdImageDataRGB, pdImageDataGrayAlpha and pdImageDataGray properties.

pdRangeGG (1050)   PD_HEX

Also appears in: Bitmap Image

Initial and final intensity of green (2 bytes). Used for grayscale images.

Sample values:

"00 FF" = initial intensity is 0, final intensity is 255
"CC 0A " = initial intensity is 204, final intensity is 10

pdRangeBB (1051)   PD_HEX

Also appears in: Bitmap Image

Initial and final intensity of blue (2 bytes). Used for grayscale images.

Sample values:

"00 FF" = initial intensity is 0, final intensity is 255
"CC 0A " = initial intensity is 204, final intensity is 10

pdID (1017)   PD_LONG_UNSIGNED

Also appears in: Glyph, Char, PowerGlyph, Library Polyline, Library Shape

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[1];

obj[0] = pdObjAdd(pd, 0, "Library Bitmap Image");

/* Properties for object 0 */
pdPropAdd(pd, obj[0], pdDw, "400", PD_LONG_SIGNED);
pdPropAdd(pd, obj[0], pdDh, "400", PD_LONG_SIGNED);
pdPropAdd(pd, obj[0], pdID, "15", PD_WORD_UNSIGNED);
pdPropAdd(pd, obj[0], pdQuality, "2", PD_BYTE_UNSIGNED);


/* Image placement */
pdImgAdd(pd, obj[1], 0, 50, 50, 0, 0, 0, pdDrawLibraryImage, 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("Library Bitmap Image");

/* Object Properties */

obj_0 + i(pdDw, 400);
obj_0 + i(pdDh, 400);
obj_0 + i(pdID, 15);
obj_0 + i(pdQuality, 2);

/* Image Pinning */

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

Index