XDrawSegments

Syntax

XDrawSegments(display, d, gc, segments, nsegments)
      Display *display;
      Drawable d;
      GC gc;
      XSegment *segments;
      int nsegments;

Arguments

display Specifies the connection to the X server.
d Specifies the drawable.
gc Specifies the GC.
segments Specifies an array of segments.
nsegments Specifies the number of segments in the array.

Description

The XDrawSegments() function draws multiple, unconnected lines. For each segment, XDrawSegments() draws a line between (x1, y1) and (x2, y2). It draws the lines in the order listed in the array of XSegment structures and does not perform joining at coincident endpoints. For any given line, XDrawSegments() does not draw a pixel more than once. If lines intersect, the intersecting pixels are drawn multiple times.

XDrawSegments() use these GC components: function, plane-mask, line-width, line-style, cap-style, fill-style, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. XDrawSegments() also uses these GC mode-dependent components: foreground, background, tile, stipple, tile-stipple-x-origin, tile-stipple-y-origin, dash-offset, and dash-list.

XDrawSegments(), can generate BadDrawable , BadGC , and BadMatch errors.

Diagnostics

BadDrawable A value for a Drawable argument does not name a defined Window or Pixmap.
BadGC A value for a GContext argument does not name a defined GContext.
BadMatch An InputOnly window is used as a Drawable.
BadMatch Some argument or pair of arguments has the correct type and range but fails to match in some other way required by the request.

See also

XDrawArc(), XDrawLine(), XDrawLines(), XDrawPoint(), XDrawRectangle(), "Drawing Single and Multiple Lines".
Christophe Tronche, [email protected]