Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xdrawline(3) [hpux man page]

XDrawLine()															       XDrawLine()

Name
  XDrawLine - draw a line between two points.

Synopsis
  XDrawLine(display, drawable, gc, x1, y1, x2, y2)
	Display *display;
	Drawable drawable;
	GC gc;
	int x1, y1, x2, y2;

Arguments
  display   Specifies a connection to an X server; returned from XOpenDisplay().

  drawable  Specifies the drawable.

  gc	    Specifies the graphics context.

  x1, y1,   Specify  the  coordinates  of  the	endpoints of the line relative to the drawable origin.	XDrawLine() connects point (x1,y1) to
	    point (x2,y2).
  x2, y2

Description
  XDrawLine() uses the components of the specified graphics context to draw a line between two points in the specified drawable.  No pixel is
  drawn more than once.

  XDrawLine()  uses  these graphics context components:  function, plane_mask, line_width, line_style, cap_style, fill_style, subwindow_mode,
  clip_ x_origin, clip_y_origin, and clip_mask.  XDrawLine() also uses these graphics context mode-dependent  components:  foreground,	back-
  ground, tile, stipple, ts_x_origin, ts_y_origin, dash_offset, and dashes.

  For more information, see Volume One, Chapter 6, Drawing Graphics and Text, and Chapter 5, The Graphics Context.

Errors
  BadDrawable
	    Specified drawable is invalid.

  BadGC     Specified GC is invalid, or does not match the depth of drawable.

  BadMatch  Specified drawable is an InputOnly window.

See Also
  XClearArea(),  XClearWindow(), XCopyArea(), XCopyPlane(), XDraw, XDrawArc(), XDrawArcs(), XDrawFilled(), XDrawLines(), XDrawPoint(), XDraw-
  Points(), XDrawRectangle(), XDrawRectangles(), XDrawSegments(), XFillArc(),  XFillArcs(),  XFillPolygon(),  XFillRectangle(),  XFillRectan-
  gles().

Xlib - Drawing Primitives													       XDrawLine()

Check Out this Related Man Page

XDrawLines()															      XDrawLines()

Name
  XDrawLines - draw multiple connected lines.

Synopsis
  XDrawLines(display, drawable, gc, points, npoints, mode)
	Display *display;
	Drawable drawable;
	GC gc;
	XPoint *points;
	int npoints;
	int mode;

Arguments
  display   Specifies a connection to an X server; returned from XOpenDisplay().

  drawable  Specifies the drawable.

  gc	    Specifies the graphics context.

  points    Specifies a pointer to an array of points.

  npoints   Specifies the number of points in the array.

  mode	    Specifies the coordinate mode.  Pass either CoordModeOrigin or CoordModePrevious.

Description
  XDrawLines() draws a series of lines joined end-to-end.

  It  draws lines connecting each point in the list (points array) to the next point in the list.  The lines are drawn in the order listed in
  the points array.  For any given line, no pixel is drawn more than once.  If thin (zero line width) lines intersect, pixels will  be	drawn
  multiple  times.  If the first and last points coincide, the first and last lines will join correctly.  If wide lines intersect, the inter-
  secting pixels are drawn only once, as though the entire multiline request were a single filled shape.

  There is a limit to the number of lines that can be drawn in a single call, which varies according to the server.  To  determine  how  many
  lines  you  can  draw  in a single call, find out your server's maximum request size using XMaxRequestSize().  Subtract three and divide by
  two, and this is the maximum number of lines you can draw in a single XDrawLines() call.

  The mode argument may have two values:

  o  CoordModeOrigin indicates that all points are relative to the drawable's origin.

  o  CoordModePrevious indicates that all points after the first are relative to the previous point.  (The first point is always relative  to
     the drawable's origin.)

  XDrawLines()	uses  the  following components of the specified graphics context to draw multiple connected lines in the specified drawable:
  function, plane_mask, line_width, line_style,  cap_style,  join_style,  fill_style,  subwindow_mode,	clip_x_origin,	clip_y_  origin,  and
  clip_mask.   This function also uses these graphics context mode-dependent components:  foreground, background, tile, stipple, ts_x_origin,
  ts_y_origin, dash_offset, and dashes.

  For more information, see Volume One, Chapter 6, Drawing Graphics and Text, and Chapter 5, The Graphics Context.

Structures
     typedef struct {
	 short x, y;
     } XPoint;

Errors
  BadDrawable
	    Specified drawable is invalid.

  BadGC     Specified GC is invalid, or does not match the depth of drawable.

  BadMatch  Specified drawable is an InputOnly window.

  BadValue  Invalid coordinate_mode.

See Also
  XClearArea(), XClearWindow(), XCopyArea(), XCopyPlane(), XDraw, XDrawArc(), XDrawArcs(), XDrawFilled(), XDrawLine(),	XDrawPoint(),  XDraw-
  Points(),  XDrawRectangle(),	XDrawRectangles(),  XDrawSegments(),  XFillArc(), XFillArcs(), XFillPolygon(), XFillRectangle(), XFillRectan-
  gles().

Xlib - Drawing Primitives													      XDrawLines()
Man Page