", Hyphenation = on, Consecutive Hyphens = 2, Vert. Just. = off> ", Level 1 Show = no, Level 2 Suffix = , Level 2 Starting Value = 0, Level 2 Show = no> ", Level 1 Show = no, Level 2 Suffix = "<#04>"> ", Level 1 Show = no, Level 2 Suffix = > ", Level 1 Show = no, Level 2 Suffix = "<#04>"> Graphics Contexts ) (E10,0,0,0,1,1,0.053333,1,15,0,0,1,0,0,0,0,1,1,1,0.066667,0.066667,6,6,0,0.066 667,6))> Graphics Contexts ) (E10,0,0,0,1,0,0.053333,1,15,0,0,1,0,0,0,0,1,0,1,0.066667,0.066667,6,6,0,0.066 667,6))> <|,"5<#1e>53"> GRAPHICS CONTEXTS ) (E10,0,0,0,1,0,0.053333,1,15,0,0,1,0,0,0,0,1,0,1,0.066667,0.066667,6,6,0,0.066 667,6))> ) (T8,2,12,0.026667,0.733333,0,1,0.333333,0,516,0,17,0,0,0,0,0,0,1,1,2048,512,10 2,1101,3, <"table"> ) (T8,3,12,0.066667,0.6,0,1,0.333333,0,516,0,17,0,0,0,0,0,0,1,1,2048,512,102,110 1,3, ) (g9,5,0 (p7,5,8,19 (g9,5,0 (g9,5,0 (v4,5,0,0.266667,0,1.6,0,17,1,0) (v4,6,0,1.6,0,1.6,0.933333,17,1,0) (v4,7,0,1.6,0.933333,0.266667,0.933333,17,1,0) (v4,8,0,0.266667,0.933333,0.266667,0,17,1,0)))) (g9,10,8 (p7,10,1032,13 (g9,10,0 (g9,10,0 (v4,10,0,1.320703,0.934816,1.006318,0.934816,17,1,0) (v4,11,0,1.006318,0.934816,0.871579,0.822225,17,1,0) (v4,12,0,0.871579,0.822225,0.871579,0.709631,17,1,0) (v4,13,0,0.871579,0.709631,1.073684,0.709631,17,1,0) (v4,14,0,1.073684,0.709631,1.073684,0.784694,17,1,0) (v4,15,0,1.073684,0.784694,1.253334,0.784694,17,1,0) (v4,16,0,1.253334,0.784694,1.253334,0.597039,17,1,0) (v4,17,0,1.253334,0.597039,0.938948,0.597039,17,1,0) (v4,18,0,0.938948,0.597039,0.871579,0.540743,17,1,0) (v4,19,0,0.871579,0.540743,0.871579,0.14667,17,1,0) (v4,20,0,0.871579,0.14667,1.432984,0.14667,17,1,0) (v4,21,0,1.432984,0.14667,1.432984,0.296792,17,1,0) (v4,22,0,1.432984,0.296792,1.073684,0.296792,17,1,0) (v4,23,0,1.073684,0.296792,1.073684,0.446915,17,1,0) (v4,24,0,1.073684,0.446915,1.320703,0.446915,17,1,0) (v4,25,0,1.320703,0.446915,1.455439,0.559508,17,1,0) (v4,26,0,1.455439,0.559508,1.455439,0.822225,17,1,0) (v4,27,0,1.455439,0.822225,1.320703,0.934816,17,1,0)))) (g9,28,2048 (v4,28,33,0.826667,1.16,0.826667,1.16,17,0,0) (v4,29,33,0.826667,0.14667,0.826667,0.14667,17,0,0) (v4,30,33,1.500352,0.14667,1.500352,0.14667,17,0,0) (v4,31,33,1.500352,1.16,1.500352,1.16,17,0,0)))) (E10,0,0,0,1,1,0.053333,1,15,0,0,1,0,0,0,0,1,1,1,0.066667,0.066667,6,6,0,0.066 667,6))> Introduction5.1<#04>Clients of the X Window System specify the visual attributes of graphical output primitives by using grap hics contexts. A graphics context is a set of graphical attribute values such as foreground color, font, line style, and so forth. Like a window, a graphics context is another kind of X server resource which is created and maintained at the request of a client program. The client program, which may use several different graphics contexts at different times, is responsible for specifying a graphics context to use with each graphical output function. CLX represents a graphics context by an object of type gcontext and defines functions to create, modify, and manipulate gcontext objects. By default, CLX also records the contents of graphics contexts in a cache associated with each display. This local caching of graphics contexts has two important advantages: Communication efficiency <#1f> Changes to attribute values in a gcontext are first made only in the local cache. Just before a gcontext is actually used, CLX automatically sends any changes to the X server, batching all changes into a single request. Inquiring gcontext contents <#1f> Accessor functions can be used to return the value of any individual gcont ext component by reading the copy of the gcontext from the cache. This kind of inquiry is not supported by the basic X protocol. There is no way for a client program to request an X server to return the contents of a gcontext. Caching graphics contexts can result in a synchronization problem if more than one client program modifies a graphics context. However, this problem is unusual. Sharing a graphics context among several clients, while possible, is not expected to be useful and is not very easy to do. At any rate, a client program can choose to not cache a gcontext when it is created. Each client program must determine its own policy for creating and using graphics contexts. Depending on the display hardware and the server implementation, creating a new graphics context can be more or less expensive than modifying an existing one. In general, some amount of graphics context information can be cached in the display hardware, in which case modifying the hardware cache is faster than replacing it. Typical display hardware can cache only a small number of graphics contexts. Graphics output is fastest when only a few graphics contexts are used without heavy modifications. This section explains the CLX functions used to: wCreate a graphics context wReturn the contents of a graphics context wChange the contents of a graphics context wCopy a graphics context wFree a graphics context <|,"5<#1e>54"> Creating 5.2<#04>To create a graphics context, use create<#1e>gcontext.<#04> Graphics Contexts create<#1e>gcontext &key :arc<#1e>mode :background (:cache<#1e>p t) :cap<#1e>styleFunctiongcontext", Sort String = "create<#1e>gcontext">
:clip<#1e>mask :clip<#1e>ordering :clip<#1e>x :clip<#1e>y :dash<#1e>offset :dashes
:drawable :exposures :fill<#1e>rule :fill<#1e>style :font :foreground
:function :join<#1e>style :line<#1e>style :line<#1e>width :plane<#1e>mask :stipple :subwindow<#1e>mode :tile :ts<#1e>x :ts<#1e>y Returns:
gcontext <#1f> Type gcontext. Creates, initializes, and returns a graphics context (gcontext). The graphics context can only be used with destination drawables having the same root and depth as the specified :drawable. If :cache<#1e> p is non<#1e>nil, the graphics context state is cached locally, and changing a component has no effect unless the new value differs from the cached value. Changes to a graphics context (setf and with<#1e>gcontext) are always deferred regardless of the cache mode and sent to the server only when required by a local operation or by an explicit call to force<#1e>gcontext<#1e>changes. :cache<#1e>p <#1f> Specifies if this graphics context should be cached locally by CLX. If nil then the state is not cached, otherwise a local cache is kept. :drawable <#1f> The drawable whose root and depth are to be associated with this graphics context. This is a required keyword argument. :arc<#1e>mode, :background, :cap<#1e>style, :clip <#1e>mask, :clip<#1e>ordering, :clip<#1e>x, :clip <#1e>y, :dash<#1e>offset, :dashes, :exposures , :fill<#1e>rule, :fill<#1e>style, :font, :foreground, :function, :join<#1e>style, :li ne<#1e>style, :line<#1e>width, :plane<#1e>mask, : stipple, :subwindow<#1e>mode, :tile, :ts<#1e>x , :ts<#1e>y <#1f> Initial attribute values for the graphics context. <|,"5<#1e>55">All of the graphics context components are set to the values that are specified by the keyword arguments, except that a value of nil causes the default value to be used. These default values are as follows:
ComponentDefault Value
arc<#1e>mode:pie<#1e>slice background1 cap<#1e>style:butt clip<#1e>mask:none clip<#1e>ordering:unsorted clip<#1e>x0 clip<#1e>y0 dash<#1e>offset0 dashes4 (that is, the list '(4, 4)) exposures:on fill<#1e>rule:even<#1e>odd fill<#1e>style:solid fontserver dependent foreground0 functionboole<#1e>1 join<#1e>style:miter line<#1e>style:solid line<#1e>width0 plane<#1e>maskA bit mask of all ones stipplePixmap of unspecified size filled with ones subwindo w<#1e>mode:clip<#1e>by<#1e>children tilePixmap of an unspecified size filled with the
foreground pixel (that is, the client<#1e>specified pixel
if any, or else 0) ts<#1e>x0 ts<#1e>y0 Note that foreground and background do not default to any values that are likely to be useful on a color display. Since specifying a nil value means use the default, this implies for clip<#1e>mask that an empty rectangle sequence cannot be specified as an empty list; :none must be used instead. Specifying a stringable for font causes an implicit open<#1e>font call to occur. Graphics 5.3<#04>The following paragraphs describe the CLX functions used to return or Contextchange theattributes of a gcontext. Functions that return the contents of a Attributesgcontext return nil if the last value stored is unknown (for example, if thegcontext was not cached or if the gcontext was not created by the inquiringclient). gcontext<#1e>arc<#1e>mode gcontextFunctionmode attribute of graphics context">mode">arc<#1e>mode", Sort String = "gcontext<#1e>arc<#1e>mode"> Returns:
arc<#1e>mode <#1f> Either :chord or :pie<#1e>slice. Returns and (with setf) changes the arc<#1e>mode attribute of the specified graphics context. The arc<#1e>mode attribute of a graphics context controls the kind of filling, if any, to be done by the draw<#1e>arcs function. A value of :chord specifies that arcs are filled inward to the chord between the end points of the arc. :pie<#1e>slice specif ies that arcs are filled inward to the center point of the arc, creating a pie slice effect. <|,"5<#1e>56">gcontext <#1f> A gcontext. gcontext<#1e>background gcontextFunctionbackground", Sort String = "gcontext<#1e>background"> Returns:
background <#1f> Type card32. Returns and (with setf) changes the background attribute of the specified graphics context. The background attribute specifies the pixel value drawn for pixels that are not set in a bitmap and for pixels that are cleared by a graphics operation, such as the gaps in dashed lines. gcontext <#1f> A gcontext. gcontext<#1e>cache<#1e>p gcontextFunctioncache<#1e>p", Sort String = "gcontext<#1e>cache<#1e>p"> Returns:
cache<#1e>p <#1f> Type boolean. Returns and (with setf) changes the local cache mode for the gcontext. If true, the state of the gcontext is cached by CLX and changes to its attributes have no effect unless the new value differs from its cached value. gcontext <#1f> A gcontext. gcontext<#1e>cap<#1e>style gcontextFunctionstyle attribute of graphics context">style">cap<#1e>style", Sort String = "gcontext<#1e>cap<#1e>style"> Returns:
cap<#1e>style <#1f> One of :butt, :not<#1e>last, :projecting, or :round. Returns and (with setf) changes the cap<#1e>style attribute of the specified graphics context. The cap<#1e>style attribute of a graphics context defines how the end points of a path are drawn. The possible values and their interpretations are as follows:
Cap<#1e>StyleInterpretation
:buttSquare at the end point (perpendicular to the slope of the line) with no projection beyond.
:not<#1e>lastEquivalent to :butt, except that for a line<#1e>width of zero or one the final end point is not drawn.
:projectingSquare at the end, but the path continues beyond the end point for a distance equal to half the line<#1e>width. This is equivalent to :butt for line<#1e>width zero or one.
:roundA circular arc with the radius equal to 1/2 of the line<#1e>width, centered on the end point. This is equivalent to :butt for line<#1e>width zero or one. The following table describes what happens when the end points of a line are identical. The effect depends on both the cap style and line width. <|,"5<#1e>57">
Cap<#1e>StyleLine<#1e>WidthEffect
:buttthinDevice dependent, but the desired
effect is that a single pixel is drawn.
:buttwideNothing is drawn.
:not<#1e>lastthinDevice dependent, but the desired
effect is that nothing is drawn.

:projectingthinSame as :butt with thin line<#1e>width.
:projectingwideThe closed path is a square, aligned
with the coordinate axes, centered at
the end point, with sides equal to the
line<#1e>width.
:roundwideThe closed path is a circle, centered
at the end point, with diameter equal
to the line<#1e>width.
:roundthinSame as :butt with thin line<#1e>width. gcontext <#1f> A gcontext. gcontext<#1e>clip<#1e>mask gcontext &optional ordering Functionmask attribute of graphics context">mask">display", Sort String = "close<#1e>display"> Returns and (with setf) changes the clip<#1e>mask attribute of the graphics context. When changing the clip<#1e>mask attribute, the new clip<#1e>mask can bespecified as a pixmap or a rect<#1e>seq or as the values :none or nil. Theordering argument can be specified only with setf when the new clip<#1e>maskis a rect<#1e>seq. The clip<#1e>mask attribute of a graphics context affects all graphics operations and is used to restrict output to the destination drawable. The clip<#1e>mask does not clip the source of a graphics operation. A value of :none for clip<#1e>mask indicates that no clipping is to be done. If a pixmap is specified as the clip<#1e>mask, it must have depth one and the same root as the specified graphics context. Pixels where the clip<#1e>mask has a one bit are drawn. Pixels outside the area covered by the clip<#1e>mask or where the clip<#1e>mask has a zero bit are not drawn. If a sequence of rectangles is specified as the clip<#1e>mask, the output is clipped to remain contained within the rectangles. The rectangles should be non<#1e>intersecting, or the results of graphics operations will be undefined. The rectangle coordinates are interpreted relative to the clip origin. Note that the sequence of rectangles can be empty, which effectively disables output. This is the opposite of setting the clip<#1e>mask to :none. <|,"5<#1e>58">If known by the client, the ordering of clip<#1e>mask rectangles can be specified to provide faster operation by the server. A value of :unsorted means the rectangles are in arbitrary order. A value of :y<#1e>sorted means that the rectangles are non<#1e>decrea sing in their Y origin. A :yx<#1e>sorted value is like :y<#1e>so rted with the additional constraint that all rectangles with an equal Y origin are non<#1e>decreasing in their X origin. A :yx<#1e>band ed value additionally constrains :yx<#1e>sorted by requiring that, for every possible Y scan line, all rectangles that include that scan line have an identical Y origins and Y extents. If incorrect ordering is specified, the X server may generate an error, but it is not required to do so. If no error is generated, the results of the graphics operations are undefined. gcontext <#1f> A gcontext. ordering <#1f> One of :unsorted, :y<#1e>sorted, : yx<#1e>banded, :yx<#1e>sorted, or nil. gcontext<#1e>clip<#1e>x gcontextFunctionx attribute of graphics context">x">clip<#1e>x", Sort String = "gcontext<#1e>clip<#1e>x"> Returns:
clip<#1e>x <#1f> Type int16. Returns and (with setf) changes the clip<#1e>x attribute of the specified graphics context. The clip<#1e>x and clip<#1e>y attributes specify the origin for the clip<#1e>mask, whether it is a pixmap or a sequence of rectangles. These coordinates are interpreted relative to the origin of whatever destination drawable is specified in a graphics operation. gcontext <#1f> A gcontext. gcontext<#1e>clip<#1e>y gcontextFunctiony attribute of graphics context">y">clip<#1e>y", Sort String = "gcontext<#1e>clip<#1e>y"> Returns:
clip<#1e>y <#1f> Type int16. Returns and (with setf) changes the clip<#1e>y attribute of the specified graphics context. The clip<#1e>x and clip<#1e>y attributes specify the origin for the clip<#1e>mask, whether it is a pixmap or a sequence of rectangles. These coordinates are interpreted relative to the origin of whatever destination drawable is specified in a graphics operation. gcontext <#1f> A gcontext. gcontext<#1e>dash<#1e>offset gcontextFunctionoffset attribute of graphics context">offset">dash<#1e>offset", Sort String = "gcontext<#1e>dash<#1e>offset"> Returns:
dash<#1e>offset <#1f> Type card16. Returns and (with setf) changes the dash<#1e>offset attribute of the specified graphics context. The dash<#1e>offset attribute of a graphics context defines the phase of the pattern contained in the dashes attribute. This phase specifies how many elements (pixels) into the path the pattern should actually begin in any single graphics operation. Dashing is continuous through path elements combined with a join<#1e>style, but is reset to the dash<#1e>offset each time a cap<#1e>style is applied at a line end point. gcontext <#1f> A gcontext. gcontext<#1e>dashes gcontextFunctiondashes", Sort String = "gcontext<#1e>dashes"> Returns:
dashes <#1f> Type sequence or card8. Returns and (with setf) changes the dashes attribute of the specified graphics context. The sequence must be non<#1e>empty and the elements must be non<#1e>zero card8 values. <|,"5<#1e>59">The dashes attribute in a graphics context specifies the pattern that is used for graphics operations which use the dashed line styles. It is a non<#1e>nil sequence with each element representing the length of a single dash or space. The initial and alternating elements of the dashes are the even dashes, while the others are the odd dashes. An odd length sequence is equivalent to the same sequence concatenated with itself to produce an even length sequence. All of the elements of a dashes sequence must be non<#1e>zero. Specifying a single integer value, N, for the dashes attribute is an abbreviated way of specifying a two element sequence with both elements equal to the specified value [N, N]. The unit of measure for dashes is the same as in the ordinary coordinate system. Ideally, a dash length is measured along the slope of the line, but server implementations are only required to match this ideal for horizontal and vertical lines. gcontext <#1f> A gcontext. gcontext<#1e>display gcontextFunctiondisplay", Sort String = "gcontext<#1e>display"> Returns:
display <#1f> Type display. Returns the display object associated with the specified gcontex t. gcontext <#1f> A gcontext. gcontext<#1e>equal gcontext<#1e>1 gcontext<#1e>2F unctionequal", Sort String = "gcontext<#1e>equal"> Returns:
equal<#1e>p <#1f> Type boolean. Returns true if the two arguments refer to the same server resource, and nil if they do not. gcontext<#1e>1, gcontext<#1e>2 <#1f> A gcontext. gcontext<#1e>exposures gcontextFunctionexposures", Sort String = "gcontext<#1e>exposures"> Returns:
exposures <#1f> Either :off or :on. Returns and (with setf) changes the exposures attribute of the specified graphics context. The exposures attribute in a graphics context controls the generation of :graphics<#1e>exposure events for calls to the copy<#1e>area and copy<#1e>plane functions. If :on, :graphics<#1e> exposure events will be reported when calling the copy<#1e>area and copy<#1e>plane functions with this graphics context. Otherwise, if :off, the events will not be reported. gcontext <#1f> A gcontext. gcontext<#1e>fill<#1e>rule gcontextFunctionrule attribute of graphics context">rule">fill<#1e>rule", Sort String = "gcontext<#1e>fill<#1e>rule"> Returns:
fill<#1e>rule <#1f> Either :even<#1e>odd or :winding . Returns and (with setf) changes the fill<#1e>rule attribute of the specified graphics context. The fill<#1e>rule attribute in a graphics context specifies the rule used to determine the interior of a filled area. It can be specified as either :even<#1e>odd or :winding. The :even<#1e>odd rule defines a point to be inside if any infinite ray starting at the point crosses the border an odd number of times. Tangencies do not count as a crossing. <|,"5<#1e>60">The :winding rule defines a point to be inside if any infinite ray starting at the point crosses an unequal number of clockwise and counterclockwise directed border segments. A clockwise directed border segment crosses the ray from left to right as observed from the point. A counterclockwise segment crosses the ray from right to left as observed from the point. The case where a directed line segment is coincident with the ray is uninteresting because you can simply choose a different ray that is not coincident with a segment. For both :even<#1e>odd and :winding, a point is infinitely small, and the border is an infinitely thin line. A pixel is inside if the center point of the pixel is inside, and the center point is not on the border. If the center point is on the border, the pixel is inside if, and only if, the polygon interior is immediately to its right (x increasing direction). Pixels with centers along a horizontal edge are a special case and are inside if, and only if, the polygon interior is immediately below (y increasing direction). gcontext <#1f> A gcontext. gcontext<#1e>fill<#1e>style gcontextFunctionstyle attribute of graphics context">style">fill<#1e>style", Sort String = "gcontext<#1e>fill<#1e>style"> Returns:
fill<#1e>style <#1f> One of :opaque<#1e>stippled, :solid , :stippled, or :tiled. Returns and (with setf) changes the fill<#1e>style attribute of the specified graphics context. The fill<#1e>style attribute of a graphics context defines the contents of the source for line, text, and fill graphics operations. It determines whether the source image is drawn with a solid color, a tile, or a stippled tile. The possible values and their meanings are as follows:
Fill<#1e>StyleMeaning
:opaque<#1e>stippledFilled with a tile with the same width and height as stipple, but with the background value used everywhere stipple has a zero and the foreground pixel value used everywhere stipple has a one.
:solidFilled with the foreground pixel value.
:stippledFilled with the foreground pixel value masked by stipple.
:tiledFilled with tile. When drawing lines with line<#1e>style :double<#1e>dash, the filling of the odd dashes are controlled by the fill<#1e>style in the following manner:
Fill<#1e>StyleEffect
:opaque<#1e>stippledSame as for even dashes.
:solidFilled with the background pixel value.
:stippledFilled with the background pixel value masked by
stipple.
:tiledFilled the same as the even dashes. <|,"5<#1e>61">gcontext <#1f> A gcontext. gcontext<#1e>font gcontext &optional metrics<#1e>p Functionfont", Sort String = "gcontext<#1e>font"> Returns:
font <#1f> Type font or null. Returns and (with setf) changes the font attribute of the specified graphics context. If the stored font is known, it is returned. If it is not known and the metrics<#1e>p argument is nil, then nil is returned. If the font is not known and metrics<#1e>p is true, then a pseudo<#1e>font is constructed and returned. For a constructed pseudo<#1e>font, full metric and property information can be obtained, but it does not have a name or a resource ID, and attempts to use it where a resource ID is required results in an invalid<#1e>font error. The font attribute in a graphics context defines the default text font used in text drawing operations. When setting the value of the font attribute, either a font object or a font name can be used. If a font name is passed, open<#1e>font is call automatically to get the font object. gcontext <#1f> A gcontext. metrics<#1e>p <#1f> Specifies whether a pseudo<#1e>font is returned when the real font stored in the graphics context is not known. The default is nil, which means do not return a pseudo<#1e>font. gcontext<#1e>foreground gcontextFunctionforeground", Sort String = "gcontext<#1e>foreground"> Returns:
foreground <#1f> Type card32. Returns and (with setf) changes the foreground attribute of the specified graphics context. The foreground attribute of a graphics context specifies the pixel value drawn for set bits in a bitmap and for bits set by a graphics operation. gcontext <#1f> A gcontext. gcontext<#1e>function gcontextFunctionfunction", Sort String = "gcontext<#1e>function"> Returns:
function <#1f> Type boole<#1e>constant. Returns the function of the specified graphics context. In all graphic operations, given a source pixel and a correspondingdestinat ion pixel, the resulting pixel drawn is computed bitwise on thebits of the source and destination pixels. That is, a logical operationis used to combine each bit plane of corresponding source anddestination pixels. The graphics context function attribute specifiesthe logical operation used via one of the 16 operation codes defined by Common Lisp for the boole function. The following table shows each of the logical operation codes that canbe given by the function attribute. For each operation code, its result is shown as a logical function of a source pixel S and a destinationpixel D. <|,"5<#1e>62">
SymbolResult
boole<#1e>1S boole<#1e>2D boole<#1e>andc1(logandc1 S D) boole<#1e>andc2 (logandc2 S D) boole<#1e>and(logand S D) boole<#1e>c1(lognot S) boole<#1e>c2(lognot D) boole<#1e>clr 0 boole<#1e>eqv(logeqv S D) boole<#1e>ior(logior S D) boole<#1e>nand(lognand S D) boole<#1e>nor(lognor S D) boole<#1e>orc1(logorc1 S D) boole<#1e>orc2(logorc2 S D) boole<#1e>set1 boole<#1e>xor(logxor S D) gcontext <#1f> A gcontext. gcontext<#1e>id gcontextFunctionid", Sort String = "gcontext<#1e>id"> Returns:
id <#1f> Type resource<#1e>id. Returns the unique ID that has been assigned to the specified graphics context. gcontext <#1f> A gcontext. gcontext<#1e>join<#1e>style gcontextFunctionstyle attribute of graphics context">style">join<#1e>style", Sort String = "gcontext<#1e>join<#1e>style"> Returns:
join<#1e>style <#1f> One of :bevel, :miter, or :round. Returns and (with setf) changes the join<#1e>style attribute of the specified graphics context. <|,"5<#1e>63">The join<#1e>style attribute of a graphics context defines how the segment intersections are drawn for wide polylines. The possible values and their interpretations are as follows:
Join<#1e>StyleInterpretation
:bevelUses :butt end point styles with the triangular notch filled.
:miterThe outer edges of two lines extend to meet at an angle.
:roundA circular arc with diameter equal to the line<#1e>width, centered on the join point. When the end points of a polyline segment are identical, the effect is as if the segment was removed from the polyline. When a polyline is a single point, the effect is the same as when the cap<#1e>style is applied at both end points. gcontext <#1f> A gcontext. gcontext<#1e>line<#1e>style gcontextFunctionstyle attribute of graphics context">style">line<#1e>style", Sort String = "gcontext<#1e>line<#1e>style"> Returns:
line<#1e>style <#1f> One of :dash, :double<#1e>dash, or :solid. Returns and (with setf) changes the line<#1e>style attribute of the specified graphics context. The line<#1e>style attribute of a graphics context specifies how (which sections of) lines are drawn for a path in graphics operations. The possible values and their meanings are as follows:
Line<#1e>StyleMeaning
:solidThe full path is drawn.
:double<#1e>dashThe full path is drawn, but the even dashes are filled differently than the odd dashes. The :butt style is used where even and odd dashes meet (see paragraph 5.4.7, Fill<#1e>Rule and Fill<#1e>Style).
:on<#1e>off<#1e>dashOnly the even dashes are drawn, with cap<#1e>style applied to all internal ends of the individual dashes, except :not<#1e>last is treated as :butt. gcontext <#1f> A gcontext. gcontext<#1e>line<#1e>width gcontextFunctionwidth attribute of graphics context">width">line<#1e>width", Sort String = "gcontext<#1e>line<#1e>width"> Returns:
line<#1e>width <#1f> Type card16. Returns the line<#1e>width of the specified graphics context. The line<#1e>width is measured in pixels and can be greater than or equal to one (wide line) or can be the special value zero (thin line). <|,"5<#1e>64">Wide lines are drawn centered on the path described by the graphics operation. Unless otherwise specified by the join<#1e>style or cap<#1e>style, the bounding box of a wide line with end points [x1, y1], [x2, y2], and width w is a rectangle with vertices at the following real coordinates: [x1 - (w*sin/2), y1 + (w*cos/2)], [x1+ (w*sin/2) , y1 - (w*cos/2)],
[x2 - (w*sin/2), y2 + (w*cos/2)], [x2 + (w*sin/2) , y2 - (w*cos/2)] where sin is the sine of the angle of the line and cos is the cosine of the angle of the line. A pixel is part of the line and, hence, is drawn if the center of the pixel is fully inside the bounding box (which is viewed as having infinitely thin edges). If the center of the pixel is exactly on the bounding box, it is part of the line if, and only if, the interior is immediately to its right (x increasing direction). Pixels with centers on a horizontal edge are a special case and are part of the line if, and only if, the interior is immediately below (y increasing direction). Thin lines (zero line<#1e>width) are always one pixel wide lines drawn using an unspecified, device dependent algorithm. There are only two constraints on this algorithm. If a line is drawn unclipped from [x1,y1] to [x2,y2] and if another line is drawn unclipped from [x1+dx,y1+dy] to [x2+dx,y2+dy], a point [x,y] is touched by drawing the first line if, and only if ,the point [x+dx,y+dy] is touched by drawing the second line. The effective set of points comprising a line cannot be affected by clipping. That is, a point is touched in a clipped line if, and only if, the point lies inside the clipping region and the point would be touched by the line when drawn unclipped. A wide line drawn from [x1,y1] to [x2,y2] always draws the same pixels as a wide line drawn from [x2,y2] to [x1,y1], not counting cap<#1e>style and join<#1e>style. Implementors are encouraged to make this property true for thin lines, but it is not required. A line<#1e>width of zero may differ from a line<#1e>width of one in which pixels are drawn. This permits the use of many manufacturer's line drawing hardware, which may run much faster than the more precisely specified wide lines. In general, drawing a thin line is faster than drawing a wide line of width one. However, because of their different drawing algorithms, thin lines may not mix well, aesthetically speaking, with wide lines. If it is desirable to obtain precise and uniform results across all displays, a client should always use a line<#1e>width of one, rather than a line<#1e>width of zero. gcontext <#1f> A gcontext. gcontext<#1e>p gcontextFunctionp", Sort String = "gcontext<#1e>p"> Returns:
gcontext <#1f> Type boolean. Returns non<#1e>nil if the argument is a graphics context and nil otherwise. gcontext<#1e>plane<#1e>mask gcontextFunctionmask attribute of graphics context">mask">plane<#1e>mask", Sort String = "gcontext<#1e>plane<#1e>mask"> Returns:
plane<#1e>mask <#1f> Type card32. Returns the plane<#1e>mask of the specified graphics context. <|,"5<#1e>65">The plane<#1e>mask attribute of a graphics context specifies which bitplanes of the destination drawable are modified during a graphic operation. The plane<#1e>mask is a pixel value in which a 1 bit means that the corresponding bit plane will be modified and a 0 bit means that the corresponding bit plane will not be affected during a graphic operations. Thus, the actual result of a graphic operation depends onboth the function and plane<#1e>mask attributes of the graphics context andis given by the following expression: (logior (logand
(boole function source destination)
plane<#1e>mask)

(logandc2
destination
plane<#1e>mask)) gcontext <#1f> A gcontext. gcontext<#1e>plist gcontextFunctionplist", Sort String = "gcontext<#1e>plist"> Returns:
gcontext<#1e>p <#1f> Type list. Returns and (with setf) sets the property list for the specified gcontext. This function provides a hook where extensions can add data. gcontext <#1f> A gcontext. gcontext<#1e>stipple gcontextFunctionstipple", Sort String = "gcontext<#1e>stipple"> Returns:
stipple <#1f> Type pixmap. Returns the stipple of the specified graphics context. The stipple attribute of a graphics context is a bitmap used to prevent certain pixels in the destination of graphics operations from being affected by tiling. The stipple and tile have the same origin. This origin point is interpreted relative to the origin of whatever destination drawable is specified in a graphics request. The stipple pixmap must have depth one and must have the same root as the graphics context. The tile pixmap must have the same root and depth as the graphics context. For stipple operations where the fill<#1e>style is :stippled (but not :opaqu e<#1e>stippled), the stipple pattern is tiled in a single plane and acts as an additional clip mask to be anded with the clip<#1e>mask. Any size pixmap can be used for stipple or tile, although some sizes may be faster to use than others. Specifying a pixmap for stipple or tile in a graphics context might or might not result in a copy being made. If the pixmap is later used as the destination for a graphics operation, the change might or might not be reflected in the graphics context. If the pixmap is used both as the destination for a graphics operation and as a stipple or tile, the results are not defined. Some displays have hardware support for tiling or stippling with patterns of specific sizes. Tiling and stippling operations that restrict themselves to those sizes may run much faster than such operations with arbitrary size patterns. CLX provides functions to determine the best size for stipple or tile (see query<#1e>best<#1e>stipple and query<#1e>be st<#1e>tile). gcontext <#1f> A gcontext. <|,"5<#1e>66">gcontext<#1e>subwindow<#1e>mode gcontextFunction mode attribute of graphics context">mode">subwindow<#1e>mode", Sort String = "gcontext<#1e>subwindow<#1e>mode"> Returns:
subwindow<#1e>mode <#1f> One of :clip<#1e>by<#1e>children or :include<#1e>inferiors. Returns and (with setf) changes the subwindow<#1e>mode attribute of the specified graphics context. The subwindow<#1e>mode attribute of a graphics context specifies whether subwindows obscure the contents of their parent window during a graphics operation. For a value of :clip<#1e>by<#1e>children, both source and destination windows are clipped by all viewable :input<#1e>outp ut class children. This clipping is in addition to the clipping provided by the clip<#1e>mode attribute. For a value of :include<#1e>infer iors, neither the source nor destination window is clipped by its inferiors. This results in the inclusion of subwindow contents in the source and the drawing through of subwindow boundaries of the destination. The use of :include<#1e>inferiors on a window of one depth with mapped inferiors of differing depth is not illegal, but the semantics are not defined by the core protocol. gcontext <#1f> A gcontext. gcontext<#1e>tile gcontextFunctiontile", Sort String = "gcontext<#1e>tile"> Returns:
tile <#1f> Type pixmap. Returns the tile of the specified graphics context. The tile attribute is a pixmap used to fill in areas for graphics operations. It is so named because copies of it are laid out side by side to fill the area. The stipple and tile have the same origin. This origin point is interpreted relative to the origin of whatever destination drawable is specified in a graphics request. The stipple pixmap must have depth one and must have the same root as the graphics context. The tile pixmap must have the same root and depth as the graphics context. For stipple operations where the fill<#1e>style is :stippled (but not :opaqu e<#1e>stippled), the stipple pattern is tiled in a single plane and acts as an additional clip mask to be anded with the clip<#1e>mask. Any size pixmap can be used for stipple or tile, although some sizes may be faster to use than others. Specifying a pixmap for stipple or tile in a graphics context might or might not result in a copy being made. If the pixmap is later used as the destination for a graphics operation, the change might or might not be reflected in the graphics context. If the pixmap is used both as the destination for a graphics operation and as a stipple or tile, the results are not defined. Some displays have hardware support for tiling or stippling with patterns of specific sizes. Tiling and stippling operations that restrict themselves to those sizes may run much faster than such operations with arbitrary size patterns. CLX provides functions to determine the best size for stipple or tile (see query<#1e>best<#1e>stipple and query<#1e>be st<#1e>tile). gcontext <#1f> A gcontext. <|,"5<#1e>67">gcontext<#1e>ts<#1e>x gcontextFunctionx attribute of graphics context">x">ts<#1e>x", Sort String = "gcontext<#1e>ts<#1e>x"> Returns:
ts<#1e>x <#1f> Type int16. Returns the ts<#1e>x attribute of the specified graphics context. The ts<#1e>x and ts<#1e>y attributes of a graphics context are the coordinates of the origin for tile pixmaps and the stipple. gcontext <#1f> A gcontext. gcontext<#1e>ts<#1e>y gcontextFunctiony attribute of graphics context">y">ts<#1e>y", Sort String = "gcontext<#1e>ts<#1e>y"> Returns:
ts<#1e>y <#1f> Type int16. Returns the ts<#1e>y attribute of the specified graphics context. The ts<#1e>x and ts<#1e>y attributes of a graphics context are the coordinates of the origin for tile pixmaps and the stipple. gcontext <#1f> A gcontext. query<#1e>best<#1e>stipple width height drawableFuncti onbest<#1e>stipple", Sort String = "query<#1e>best<#1e>stipple"> Returns:
best<#1e>width, best<#1e>height <#1f> Type card16. Returns the best<#1e>width and best<#1e>height for stipple pixmaps on the drawable. The drawable indicates the screen and possibly the window class and depth. An :input<#1e>only window cannot be specified as the drawable. The size is returned as width and height values. width, height <#1f> Specifies the width and height of the desired stipple pattern. drawable <#1f> A drawable. query<#1e>best<#1e>tile width height drawableFunction best<#1e>tile", Sort String = "query<#1e>best<#1e>tile"> Returns:
best<#1e>width, best<#1e>height <#1f> Type card16. Returns the best<#1e>width and best<#1e>height for tile pixmaps on the drawable. The drawable indicates the screen and possibly the window class and depth. An :input<#1e>only window cannot be specified as the drawable. The size is returned as width and height values. width, height <#1f> Specifies the width and height of the desired tile pattern. drawable <#1f> A drawable. Copying 5.3<#04>CLX provides functions to copy some or all attribute values from Graphicsone graphics context to another. These functions are generally more efficient Contexts than using setf to copy gcontext attributes individually. copy<#1e>gcontext source destinationFunctiongcontext", Sort String = "copy<#1e>gcontext"> Copies all the values of the attributes of the source graphics context into the destination graphics context. The source and destination graphics contexts must have the same root and depth. source <#1f> The source gcontext. <|,"5<#1e>68">destination <#1f> The destination gcontext. copy<#1e>gcontext<#1e>components source destination &rest k eysFunctiongcontext<#1e>components", Sort String = "copy<#1e>gcontext<#1e>components"> Copies the values of the specified attributes of the source graphics context to the destination graphics context. The source and destination graphics contexts must have the same root and depth. source <#1f> The source gcontext. destination <#1f> The destination gcontext. keys <#1f> The remaining arguments are keywords, of type gcontext<#1e> key, which specify which attributes of the graphics context are to be copied. Destroying5.5<#04>To destroy a graphics context, use free<#1e>gcontext. Graphics Contexts free<#1e>gcontext gcontextFunctiongcontext", Sort String = "free<#1e>gcontext"> Deletes the association between the assigned resource ID and the specified graphics context, and then destroys the graphics context. gcontext <#1f> A gcontext. Graphics5.6<#04>CLX provides a set of functions to control the automatic graphics Contextcontext caching mechanism. Cache force<#1e>gcontext<#1e>changes gcontextFunctiongcontext<#1e>changes", Sort String = "force<#1e>gcontext<#1e>changes"> Forces any delayed changes to the specified graphics context to be sent out to the server. Note that force<#1e>gcontext<#1e>changes is called by all of the graphics functions. gcontext <#1f> A gcontext. with<#1e>gcontext gcontext &key :arc<#1e>mode :background :cap<#1e>style :clip<#1e>maskMacrogcontext", Sort String = "with<#1e>gcontext">
:clip<#1e>ordering :clip<#1e>x :clip<#1e>y :dashes :dash<#1e>offset :exposures
:fill<#1e>rule :fill<#1e>style :font :foreground :function :join<#1e>style
:line<#1e>style :line<#1e>width :plane<#1e>mask :stipple :subwindow<#1e>mode
:tile :ts<#1e>x :ts<#1e>y &allow<#1e>other<#1e>keys &body body Changes the indicated graphics context components to the specified values only within the dynamic extent of the body. with<#1e>gcontext works on a per<#1e>process basis in a multiprocessing environment. The body is not surrounded by a with<#1e>display form. If there is no local cache for the specified graphics context, or if some of the component states are unknown, with<#1e>gcontext does the save and restore by creating a temporary graphics context and copying components to and from it using copy<#1e>gcontext<#1e>componen ts. gcontext <#1f> A gcontext. :arc<#1e>mode, :background, :cap<#1e>style, :clip<#1e>mask, :clip<#1e>ordering, :clip<#1e>x, :clip<#1e>y, :dashes, :dash<#1e>offset, :exp osures, :fill<#1e>rule, :fill<#1e>style, :font , :foreground, :function, :join<#1e>style, :line<#1e>style, :line<#1e>width, :plane<#1e>mask , :stipple, :subwindow<#1e>mode, :tile, :ts<#1e>x, :ts<#1e>y <#1f>These keyword arguments and associated values specify which graphics context components are to be changed. Any components not specified are left unmodified. See paragraph 5.2, Creating Graphics Contexts, for more information. body <#1f> The body of code which will have access to the altered graphics context. .