1xcb_poly_line(3) XCB Requests xcb_poly_line(3)
2
3
4
6 xcb_poly_line - draw lines
7
9 #include <xcb/xproto.h>
10
11 Request function
12 xcb_void_cookie_t xcb_poly_line(xcb_connection_t *conn,
13 uint8_t coordinate_mode, xcb_drawable_t drawable,
14 xcb_gcontext_t gc, uint32_t points_len, const
15 xcb_point_t *points);
16
18 conn The XCB connection to X11.
19
20 coordinate_mode
21 One of the following values:
22
23 XCB_COORD_MODE_ORIGIN
24 Treats all coordinates as relative to the origin.
25
26 XCB_COORD_MODE_PREVIOUS
27 Treats all coordinates after the first as relative
28 to the previous coordinate.
29
30
31
32 drawable The drawable to draw the line(s) on.
33
34 gc The graphics context to use.
35
36 points_len
37 The number of xcb_point_t structures in points.
38
39 points An array of points.
40
42 Draws points_len-1 lines between each pair of points (point[i],
43 point[i+1]) in the points array. The lines are drawn in the order list‐
44 ed in the array. They join correctly at all intermediate points, and
45 if the first and last points coincide, the first and last lines also
46 join correctly. For any given line, a pixel is not drawn more than
47 once. If thin (zero line-width) lines intersect, the intersecting pix‐
48 els are drawn multiple times. If wide lines intersect, the intersecting
49 pixels are drawn only once, as though the entire request were a single,
50 filled shape.
51
53 Returns an xcb_void_cookie_t. Errors (if any) have to be handled in the
54 event loop.
55
56 If you want to handle errors directly with xcb_request_check instead,
57 use xcb_poly_line_checked. See xcb-requests(3) for details.
58
60 xcb_drawable_error_t
61 TODO: reasons?
62
63 xcb_g_context_error_t
64 TODO: reasons?
65
66 xcb_match_error_t
67 TODO: reasons?
68
69 xcb_value_error_t
70 TODO: reasons?
71
73 /*
74 * Draw a straight line.
75 *
76 */
77 void my_example(xcb_connection_t *conn, xcb_drawable_t drawable, xcb_gcontext_t gc) {
78 xcb_poly_line(conn, XCB_COORD_MODE_ORIGIN, drawable, gc, 2,
79 (xcb_point_t[]) { {10, 10}, {100, 10} });
80 xcb_flush(conn);
81 }
82
84 xcb-requests(3), xcb-examples(3)
85
87 Generated from xproto.xml. Contact xcb@lists.freedesktop.org for cor‐
88 rections and improvements.
89
90
91
92X Version 11 libxcb 1.13 xcb_poly_line(3)