Graphics Attributes

Much of the behavior of the drawing commands described in pxl-prim is determined by the graphics attributes of the destination drawable (or of the gc, if one is supplied as argument). Following is a list of the graphics attributes and their meaning.

How source and destination are combined. Possible values are clear, and, and_reverse, copy, and_inverted, noop, xor, or, nor, equiv, invert, or_reverse, copy_inverted, or_inverted, nand, and set. Default is copy.
A bitmask specifying which planes of destination are affected by operations. Default is all planes (i.e., -1).
Foreground pixel value. Default is the pixel value for black.
Background pixel value. Default is the pixel value for white.
Width of drawn lines, in pixels. A value of 0 means thin lines. These may be drawn somewhat faster than width 1 lines. Default is 0.
How (and if) lines are to be dashed. Possible values are solid, double_dash, or on_off_dash. Default is solid.
How wide lines are to be capped. Possible values are not_last, butt, round, and projecting. Default is butt.
How wide connecting lines are to be joined. Possible values are miter, round, and bevel. Default is miter.
How filling is to be done. Possible values are solid, tiled, opaque_stippled, and stippled. Default is solid.
How to decide which parts of a figure are to be filled when the lines specifying the figure cross. Possible values are odd_even_rule or winding_rule. Default is odd_even_rule.
How arcs are to be filled. Possible values are pie_slice or chord. Default is pie_slice.
The pixmap for tiling operations. This is only used if file_style(tiled) is selected. Default is a pixmap of unspecified size filled with the foreground color.
A 1 plane pixmap (a bitmap) for stipple operations. This is only used if file_style(opaque_stippled) or file_style(stippled) is selected. The default is a bitmap of unspecified size filled with 0.
X offset for tile and stipple operations. Default is 0.
Y offset for tile and stipple operations. Default is 0.
ts_origin(X, Y)
Same as ts_x_origin(X), ts_y_origin(Y).
The font used for text display. The default is implementation dependent.
Should drawing operations affect mapped subwindows of a windows being drawn into? Possible values are clip_by_children and include_inferiors. Default is clip_by_children.
Should graphics exposure events be generated when copying from a window? Possible values are true and false. Default is true.
X origin for clipping. Default is 0.
Y origin for clipping. Default is 0.
clip_origin(X, Y)
Same as clip_x_origin(X), clip_y_origin(Y).
Specifies how to restrict drawing operations to the destination. V may be none, a bitmap, or a list of rectangle(X, Y, Width, Height) terms. If it is a bitmap, only pixels in the destination corresponding to 1 bits in the bitmap will be affected by drawing. If a list of rectangle/4 terms, only pixels in the destination that fall within one of the rectangles will be affected. Default is none.
clip(List, Order)
same as clip(List), except that List must be a list of rectangle(X, Y, Width, Height) terms, and further, Order describes the order of the terms in the list. Possible values are unsorted, y_sorted, y_x_sorted, and y_x_banded. The default is that this attribute doesn't apply, since by default there is no clipping.
A list of alternating integer on and off lengths for dashed lines. This attribute is only used when line_style(double_dash) or line_style(on_off_dash) are selected. Default value is [4, 4] (which is the same as [4] since the list is used cyclically).
An integer specifying where in the dashes(V) list to begin drawing. Default is 0.

For more detailed information on particular attributes, see any good book on programming the X Window System. There are several good references on Xlib, the C interface to the X Window System.

If you are still confused about graphics attributes, the easiest, and often most effective, way to understand them is to experiment. ProXL makes this very easy. Simply open a window and use the drawing commands to draw into it. Then experiment with changing graphics attributes until you get the effect you want.