1XSetLineAttributes(3) XLIB FUNCTIONS XSetLineAttributes(3)
2
3
4
6 XSetLineAttributes, XSetDashes - GC convenience routines
7
9 int XSetLineAttributes(Display *display, GC gc, unsigned int
10 line_width, int line_style, int cap_style, int join_style);
11
12 int XSetDashes(Display *display, GC gc, int dash_offset, char
13 dash_list[], int n);
14
16 cap_style Specifies the line-style and cap-style you want to set for
17 the specified GC. You can pass CapNotLast, CapButt,
18 CapRound, or CapProjecting.
19
20 dash_list Specifies the dash-list for the dashed line-style you want to
21 set for the specified GC.
22
23 dash_offset
24 Specifies the phase of the pattern for the dashed line-style
25 you want to set for the specified GC.
26
27 display Specifies the connection to the X server.
28
29 gc Specifies the GC.
30
31 join_style
32 Specifies the line join-style you want to set for the speci‐
33 fied GC. You can pass JoinMiter, JoinRound, or JoinBevel.
34
35 line_style
36 Specifies the line-style you want to set for the specified
37 GC. You can pass LineSolid, LineOnOffDash, or LineDou‐
38 bleDash.
39
40 line_width
41 Specifies the line-width you want to set for the specified
42 GC.
43
44 n Specifies the number of elements in dash_list.
45
47 The XSetLineAttributes function sets the line drawing components in the
48 specified GC.
49
50 XSetLineAttributes can generate BadAlloc, BadGC, and BadValue errors.
51
52 The XSetDashes function sets the dash-offset and dash-list attributes
53 for dashed line styles in the specified GC. There must be at least one
54 element in the specified dash_list, or a BadValue error results. The
55 initial and alternating elements (second, fourth, and so on) of the
56 dash_list are the even dashes, and the others are the odd dashes. Each
57 element specifies a dash length in pixels. All of the elements must be
58 nonzero, or a BadValue error results. Specifying an odd-length list is
59 equivalent to specifying the same list concatenated with itself to pro‐
60 duce an even-length list.
61
62 The dash-offset defines the phase of the pattern, specifying how many
63 pixels into the dash-list the pattern should actually begin in any sin‐
64 gle graphics request. Dashing is continuous through path elements com‐
65 bined with a join-style but is reset to the dash-offset between each
66 sequence of joined lines.
67
68 The unit of measure for dashes is the same for the ordinary coordinate
69 system. Ideally, a dash length is measured along the slope of the
70 line, but implementations are only required to match this ideal for
71 horizontal and vertical lines. Failing the ideal semantics, it is sug‐
72 gested that the length be measured along the major axis of the line.
73 The major axis is defined as the x axis for lines drawn at an angle of
74 between -45 and +45 degrees or between 135 and 225 degrees from the x
75 axis. For all other lines, the major axis is the y axis.
76
77 XSetDashes can generate BadAlloc, BadGC, and BadValue errors.
78
80 BadAlloc The server failed to allocate the requested resource or
81 server memory.
82
83 BadGC A value for a GContext argument does not name a defined GCon‐
84 text.
85
86 BadValue Some numeric value falls outside the range of values accepted
87 by the request. Unless a specific range is specified for an
88 argument, the full range defined by the argument's type is
89 accepted. Any argument defined as a set of alternatives can
90 generate this error.
91
93 XCreateGC(3), XQueryBestSize(3), XSetArcMode(3), XSetClipOrigin(3),
94 XSetFillStyle(3), XSetFont(3), XSetState(3), XSetTile(3)
95 Xlib - C Language X Interface
96
97
98
99X Version 11 libX11 1.6.5 XSetLineAttributes(3)