Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XSetLineAttributes(3X) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XCreateGC(3X)

XQueryBestSize(3X)

XSetArcMode(3X)

XSetClipOrigin(3X)

XSetFillStyle(3X)

XSetFont(3X)

XSetState(3X)

XSetTile(3X)




XSetLineAttributes(3X) XSetLineAttributes(3X)
NAME XSetLineAttributes, XSetDashes - set the line-drawing and dash components in the graphic context SYNOPSIS XSetLineAttributes (display, gc, line-width, line-style, cap-style, join-style) Display *display; GC gc; unsigned int line-width; int line-style; int cap-style; int join-style; XSetDashes (display, gc, dash-offset, dash-list, n) Display *display; GCgc; int dash-offset; char dash-list; int n; DESCRIPTION The XSetLineAttributes function sets the line drawing com- ponents in the specified graphic context. The XSetDashes function sets the dash-offset and dash-list attributes for dashed line styles in the specified graphic context. There must be at least one element in dash-list, or a BadValue error results. The initial and alternating elements (second, fourth, and so on) of the dash-list are the even dashes, and the others are the odd dashes. Each element specifies a dash length in pixels. All of the ele- ments must be nonzero, or a BadValue error results. Speci- fying an odd-length list is equivalent to specifying the same list concatenated with itself to produce an even-length list. The dash-offset argument defines the phase of the pattern, specifying how many pixels into the dash-list the pattern should actually begin in any single graphics request. Dash- ing is continuous through path elements combined with a join-style but is reset to the dash-offset between each se- quence of joined lines. The unit of measure for dashes is the same for the ordinary coordinate system. Ideally, a dash length is measured along the slope of the line, but implementations are only required to match this ideal for horizontal and vertical lines. Failing the ideal semantics, it is suggested that the length be measured along the major axis of the line. The major axis is defined as the x axis for lines drawn at an angle of between -45 and +45 degrees or between 315 and 225 degrees November, 1990 1



XSetLineAttributes(3X) XSetLineAttributes(3X)
from the x axis. For all other lines, the major axis is the y axis. Arguments These functions accept the following arguments: cap-style Specifies the line-style and cap-style you want to set for the specified graphic context. You can pass CapNotLast, CapButt, CapRound, or CapProjecting. dash-list Specifies the dash-list for the dashed line-style you want to set for the specified graphic context. dash-offset Specifies the phase of the pattern for the dashed line-style you want to set for the specified graphic context. display Specifies the connection to the X server. gc Specifies the graphic context. join-style Specifies the line join-style you want to set for the specified graphic context. You can pass Join- Miter, JoinRound, or JoinBevel. line-style Specifies the line-style you want to set for the specified graphic context. You can pass LineSolid, LineOnOffDash, or LineDoubleDash. line-width Specifies the line-width you want to set for the specified graphic context. n Specifies the number of elements in dash-list. ERRORS BadAlloc The server failed to allocate the requested resource or server memory. BadGC A value for a GC argument does not name a defined graphic context. BadValue Some numeric value falls outside the range of values accepted by the request. Unless a range is speci- 2 November, 1990



XSetLineAttributes(3X) XSetLineAttributes(3X)
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. The XSetLineAttributes and XSetDashes functions can generate BadAlloc, BadGC, and BadValue errors. SEE ALSO XCreateGC(3X), XQueryBestSize(3X), XSetArcMode(3X), XSetClipOrigin(3X), XSetFillStyle(3X), XSetFont(3X), XSetState(3X), XSetTile(3X)
Xlib - C Language Interface
November, 1990 3

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