NAME
XSetDashes − set a pattern of line dashes in a graphics context.
Synopsis
XSetDashes(display, gc, dash_offset, dash_list, n)
Display *display;
GC gc;
int dash_offset;
char dash_list[];
int n;
Arguments
displaySpecifies a connection to an X server; returned from XOpenDisplay().
gcSpecifies the graphics context.
dash_offset
Specifies the phase of the pattern for the dashed line style.
dash_listSpecifies the dash list for the dashed line style. An odd-length list is equivalent to the same list concatenated with itself to produce an even-length list.
nSpecifies the length of the dash list argument.
Description
XSetDashes() sets the dashes component of a GC. The initial and alternating elements of the dash_list argument are the dashes, the others are the gaps. All of the elements must be nonzero, with lengths measured in pixels. The dash_offset argument defines the phase of the pattern, specifying how many pixels into the dash_list the pattern should actually begin in the line drawn by the request. n specifies the length of dash_list. An odd value for n is interpreted as specifying the dash_list concatenated with itself to produce twice as long a list. Ideally, a dash length is measured along the slope of the line, but server implementors are only required to match this ideal for horizontal and vertical lines. Failing the ideal semantics, it is suggested that the length be measured along the major axis of the line. The major axis is defined as the x axis for lines drawn at an angle of between
− 45 and +45 degrees or between 315 and 225 degrees from the x axis. For all other lines, the major axis is the y axis. See Volume One, Chapter 5, The Graphics Context, for further information.
Errors
BadAlloc
BadGC
BadValueNo values in dash_list. Element in dash_list is 0.
See Also
DefaultGC(), XChangeGC(), XCopyGC(), XCreateGC(), XFreeGC(), XGContextFromGC(), XSetArcMode(), XSetBackground(), XSetClipMask(), XSetClipOrigin(), XSetClipRectangles(), XSetFillRule(), XSetFillStyle(), XSetForeground(), XSetFunction(), XSetGraphicsExposures(), XSetLineAttributes(), XSetPlaneMask(), XSetState(), XSetStipple(), XSetSubwindowMode(), XSetTSOrigin().
Copyright O’Reilly & Assoc. —