Inhalt

Index

DEFINE FILL

DEFINE FILL defines a fill color, which can be referred to by name further on in other scripts.

Fill color definitions prior to the definition of this fill may be included in any script; however, patterns defined that way can be used solely in those scripts, in which they are defined, and their subsequent second generation-scripts.

Syntax

DEFINE FILL name, 0, color_id [, alpha1]

DEFINE FILL name, 1,
red1, green1, blue1, alpha1
[, shading ,variant, angle]

DEFINE FILL name, 2,
red1, green1, blue1, alpha1,
shading ,variant, angle,
red2, green2, blue2, alpha2

Parameters

name (string): name of the fill

fill type (integer, 0, 1, 2): defines the fill type. The number of possible parameters depends on the fill type.

0: plain fill color
1: single color with shading and angle
2: two colors with shading, gradient and angle

color_id (integer): number of first color

with 0 £ color_id £ 255

red1, green1, blue1, alpha1 (integer): color parameters of first color

with
0 £ red1, green1, blue1 £ 255
0 £ red2, green2, blue2 £ 255
0 £ alpha1 £ 100
0 £ alpha2 £ 100

shading (integer): type of shading

shading=0: Linear transition
shading=1: transition from corner
shading=2: transition from center
shading=3: round transition

variant (integer): type of gradient

variant=0: gradient from color 1 to color 2
variant=0: gradient from color 2 to color 1
variant=0: gradient from color 1 to color 2 and back
variant=0: gradient from color 2 to color 1 and back

angle (integer): tilt angle of shading or gradient

Corresponding commands

[set] FILL name_string

[set] FILL index

All 2D polygons generated after a fill setting will obtain this fill color, until the next fill 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 fill's name is only recommended with the prior use of the INDEX function.

Remarks

If there is no fill set in a script, an empty fill rsp. no fill is used as default:
SET FILL -1

Usable since script version 1.1 (Allplan 2012-1).



Allplan

(C) ALLPLAN GmbH

Privacy policy