Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XDrawPoint(3X) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XCreateGC(3X)

XDrawArc(3X)

XDrawLine(3X)

XDrawRectangle(3X)




XDrawPoint(3X) XDrawPoint(3X)
NAME XDrawPoint, XDrawPoints - draw points SYNOPSIS XDrawPoint (display, d, gc, x, y) Display *display; Drawable d; GC gc; int x,y; XDrawPoints (display, d, gc, points, npoints, mode) Display *display; Drawable d; GC gc; XPoint *points; int npoints; int mode; DESCRIPTION The XDrawPoint function uses the foreground and function components of the graphic context to draw a single point into the specified drawable, and XDrawPoints draws multiple points into the specified drawable. The value of mode can be CoordModeOrigin or CoordModePrevious. CoordModeOrigin causes all coordinates to be treated as re- lative to the origin, and CoordModePrevious causes all coor- dinates after the first to be treated as relative to the previous point. XDrawPoints draws the points in the order listed in the array. Both functions use these graphic context components: func- tion, plane-mask, foreground, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. Arguments These functions accept the following arguments: d Specifies the drawable. display Specifies the connection to the X server. gc Specifies the graphic context. mode Specifies the coordinate mode. CoordModeOrigin treats all coordinates as related to the origin, and CoordModePrevious treats all coordinates after the first as relative to the previous point. npoints Specifies the number of points in the array. points Specifies a pointer to an array of points. November, 1990 1



XDrawPoint(3X) XDrawPoint(3X)
x, y Specify the x and y coordinates where the point is to be drawn. Structures The XPoint structure is defined as follows. typedef struct { short x, y; } XPoint; All x and y members are signed integers. The width and height members are 16-bit unsigned integers. You should not generate coordinates and sizes out of the 16-bit ranges, be- cause the protocol only has 16-bit fields for these values. ERRORS BadDrawable A value for a Drawable argument does not name a de- fined window or pixel map. BadGC A value for a GC argument does not name a defined graphic context. BadMatch An InputOnly window is used as a drawable; or, an argument or pair of arguments has the correct type and range but fails to match in some other required way. BadValue A numeric value falls outside the range of values accepted by the request. Unless a range is speci- fied for an argument, the full range defined by the argument's type is accepted. Any argument defined as a set of alternatives can generate this error. XDrawPoint can generate BadDrawable, BadMatch, and BadGC errors. XDrawPoints can generate BadDrawable, BadGC, BadMatch, and BadValue errors. SEE ALSO XCreateGC(3X), XDrawArc(3X), XDrawLine(3X), XDrawRectangle(3X)
Xlib - C Language Interface
2 November, 1990

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026