DR GET LINE ATTRIBUTES

4D - Documentation   Français   English   German   4D Draw 2004, Command Theme List   4D Draw 2004, Command Alphabetical List   Back   Previous   Next

version 6.0


DR GET LINE ATTRIBUTES (area; scope; pattern; color; width)

ParameterTypeDescription
areaLongint4D Draw area
scopeLongint-2=Default
-1=All
0=Selected
>0=Group ID
patternIntegerPattern index
colorLongintColor value
widthNumberLine width in points

Description

The command DR GET LINE ATTRIBUTES returns into the pattern, color, and width variables the line attributes for the objects in area described by scope.

If Scope equals -2, the command returns the default line attributes.

If Scope equals -1, the command returns the line attributes for all objects in the document.

If Scope equals 0, the command returns the line attributes for the selected objects.

If Scope is greater than 0, it must be equal to a specific object's ID; the command returns that object's attributes. If the object does not exist, DR GET LINE ATTRIBUTES returns -32000 for each attribute, and DR Error returns error number 2.

pattern is the number of the pattern in the palette. Patterns have a value in the range 1 to 36 and are numbered left to right, top to bottom.

color is a long integer that represents the color of the lines. This number can be used in the commands DR SET FILL ATTRIBUTES and DR SET LINE ATTRIBUTES to set other objects to the same color.

width is a real number that describes the width (thickness) of the line in points (1/72 of an inch).

If any of the attributes are not the same for all of the objects described by scope, DR GET LINE ATTRIBUTES returns a -32000 for that attribute.

Example

The following example checks the default pattern, color and width of lines and if the line attributes are not solid, black, and 0.25 points wide, it resets them.

   DR GET LINE ATTRIBUTES (Area;-2;vPattern;vColor;vWidth)
   If (vPattern # 3) | (vColor # 0) | (vWidth # 0.25)
      DR SET LINE ATTRIBUTES (Area;-2;3;0;0.25)
   End if

See Also

DR SET LINE ATTRIBUTES.


4D - Documentation   Français   English   German   4D Draw 2004, Command Theme List   4D Draw 2004, Command Alphabetical List   Back   Previous   Next