DEFINE TEXTURE
defines a texture, which can be referred to by name further on in other scripts.
Texture definitions prior to the definition of this texture may be included in any script; however, textures defined that way can be used solely in those scripts, in which they are defined, and their subsequent second generation-scripts.
Syntax
DEFINE TEXTURE "name" expression, surf_
x, surf_
y, mask, ang
Parameters
name
(string): name of the texture
expression
(string): bitmap used for the texture, e.g. a file name or an index number of a bitmap stored in the SmartPart. A 0 index value refers to the preview picture of the library part.
surf_x
(decimal, > 0): texture width in meter
surf_y
(decimal, > 0): texture height in meter
mask
(integer, 0 £ mask
£ 511): appearance of texture
Alpha channel controls (j1... j6):
j1: alpha channel changes the transparency of texture; can be 0 or 1
ang
(decimal): angle of the texture (in degrees)
Corresponding commands
[set
] TEXTURE name_string
[set
] TEXTURE index
All 2D polygons generated after a texture setting will obtain this texture, until the next texture is set.
Index is a constant referring to a fill 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 texture's name is only recommended with the prior use of the INDEX function.
Remarks
If there is no texture set in a script, an empty texture rsp. no texture is used as default: SET TEXTURE -1
Usable since script version 1.1 (Allplan 2012-1).
(C) ALLPLAN GmbH |
Privacy policy |