XSetLineAttributes()XSetLineAttributes()NameXSetLineAttributes – set the line drawing components in a graphics con‐
text.
Synopsis
XSetLineAttributes(display, gc, line_width, line_style,
cap_style, join_style)
Display *display;
GC gc;
unsigned int line_width;
int line_style;
int cap_style;
int join_style;
Arguments
display Specifies a connection to an X server; returned from
XOpenDisplay().
gc Specifies the graphics context.
line_width
Specifies the line width in the specified graphics context.
line_style
Specifies the line style in the specified graphics context.
Possible values are LineSolid, LineOnOffDash, or LineDou‐
bleDash.
cap_style Specifies the line and cap style in the specified graphics
context. Possible values are CapNotLast, CapButt, CapRound,
or CapProjecting.
join_style
Specifies the line-join style in the specified graphics con‐
text. Possible values are JoinMiter, JoinRound, or Join‐
Bevel. If you specify JoinMitre, JoinBevel is used instead
if the angle separating the two lines is less than 11
degrees.
DescriptionXSetLineAttributes() sets four types of line characteristics in the GC:
line_width, line_style, cap_style, and join_style.
See the description of line and join styles in Volume One, Chapter 5,
The Graphics Context. See also XSetDashes().
A line_width of zero (0) means to use the fastest algorithm for drawing
a line of one pixel width. These lines may not meet properly with
lines specified as width one or more.
Errors
BadAlloc
BadGC
BadValue
See AlsoXDefaultGC(), XChangeGC(), XCopyGC(), XCreateGC(), XFreeGC(), XGCon‐
textFromGC(), XSetArcMode(), XSetBackground(), XSetClipMask(), XSetCli‐
pOrigin(), XSetClipRectangles(), XSetDashes(), XSetFillRule(), XSet‐
FillStyle(), XSetForeground(), XSetFunction(), XSetGraphicsExposures(),
XSetPlaneMask(), XSetState(), XSetStipple(), XSetSubwindowMode(),
XSetTSOrigin().
Xlib - Graphics Context XSetLineAttributes()