Function GraSetAttrLine() Foundation
Determines attributes for lines which are drawn with GraLine().
GraSetAttrLine( [<oPS>], [<aAttributes>] ) --> aOldAttributes
The function GraSetAttrLine() returns a copy of the current line attribute array. If new attributes are specified by <aAttributes>, the function returns an array containing the previous attributes.
The function GraSetAttrLine() determines the attributes for lines. It has an effect when graphic primitives such as GraLine() and GraSpline() are used to draw lines. The graphic primitives belong to this group. Line attributes are used for the borders drawn with the functions GraArc() and GraBox(). Line attributes are also employed by the function GraPathOutline() which outlines a graphic path. The line attributes which can be specified are the following:
|Color mix attribute for foreground
All line attributes set remain until the function GraSetAttrLine() is called again. The exceptions to this are the colors, which are redefined with GraSetColor().
By default, colors set by GraSetColor() are used. For lines a foreground color is specified separately and lines have no background color.
Mix attributes for colors have meaning when lines are output over previously drawn graphic elements. For lines, only the mix attribute for foreground color can be set. Important attributes for the foreground color are GRA_FGMIX_OVERPAINT (the line overpaints everything previously visible) and GRA_FGMIX_OR (the overlapping section of the line receives another color).
Another mix attribute is GRA_FGMIX_XOR. This attribute effectively deletes a graphic primitive from the screen when it is executed or drawn a second time at the same coordinates.
The line width is specified in logical units, that is, the units specified in XbpPresSpace:create(). Per default, this is pixel. For setting a line width other than the default, a numeric value greater than 0 can be specified for the GRA_AL_WIDTH attribute. Alternatively, one of the two predefined #define constants GRA_LINEWIDTH_NORMAL (normal line) or GRA_LINEWIDTH_THICK (thick line) may be used.
Windows does not support selecting certain line types if the line width is greater than one unit. Furthermore, lines of width GRA_LINEWIDTH_NORMAL are always displayed one pixel wide on the Windows platform and are not affected by graphic transforms. If the viewport of a Presentation Space is used to scale graphical output, for example, the width of lines rendered using GRA_LINEWIDTH_NORMAL will not be scaled. Lines of other widths, however, are subject to graphic transforms and may therefore vary depending on the transform set for the Presentation Space. To select a normal, 1 unit-wide line that is subject to scaling, the value 1 must be specified for the line width attribute.
The following illustration shows the line types which can be selected by GraSetAttrLine().
Some line types available under OS/2 are not provided on the Windows platforms. In this case, a similar line type is choosen by Xbase++. Furthermore, line types other than GRA_LINETYPE_SOLID or GRA_LINETYPE_INVISIBLE cannot be selected if the line width specified in GRA_AL_WIDTH is greater than one unit or GRA_LINEWIDTH_NORMAL, respectively.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.