DEFINE BITMAP
generates a reference to a bitmap, for later use as filling of 2D polylines (bitmap areas).
Bitmap definitions prior to the first reference to that bitmap may be included in any script; however, bitmaps defined that way can be used solely in those scripts, in which they are defined, and their subsequent second generation-scripts.
Syntax
DEFINE BITMAP name, image
[, angle, scale_x, scale_y, ref_x, ref_y, offset_x, offset_y, metric, tile, mask, red, green, blue, toler
]
Parameters
name
(string): name of the bitmap
image
(string): expression containing the base name of the bitmap file without extension, e.g. "name" for "name.png"
angle
(decimal): rotation angle (default: 0.0)
scale_x
, scale_y
(decimal): scaling of the bitmap in X resp. Y direction (default: 1.0)
ref_x
, ref_y
(decimal): X resp. Y coordinate of the reference point (default: (0.0;0.0))
offset_x
, offset_y
(decimal): X resp. Y coordinate of the offset point (default: (0.0;0.0))
metric
(integer): adjustment of bitmap size
with metric
may be 0 or 1
0: fit size
1: one pixel equals 1 cm
tile
(integer): arrangement of the bitmap
with tile
may be 0 or 1
0: fit size
1: tile bitmap
mask
(integer): masking of transparent bitmap areas
with mask
may be 0 or 1
0: no transparent areas
1: mask black pixels with defined color
red
, green
, blue
(integer): color palette for masking/background color (default: white)
with 0 £ red
, green
resp. blue
£ 256
toler
(integer): tolerance of the transparent color
with 0 £ toler
£ 256 (default: 0)
Corresponding commands
[set
] BITMAP name_string
[set
] BITMAP index
Index is a constant referring to a bitmap stack in the internal data structure; this stack is modified during script analysis and can also be modified from within the program. Any use of the index instead of the bitmap's name is only recommended with the prior use of the INDEX function.
Remarks
Usable since script version 1.1 (Allplan 2012-1).
(C) ALLPLAN GmbH |
Privacy policy |