home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
InfoMagic Source Code 1993 July
/
THE_SOURCE_CODE_CD_ROM.iso
/
X
/
mit
/
doc
/
CLX
/
s05.doc
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Interleaf document
|
1989-10-18
|
68.4 KB
|
2,205 lines
<!OPS, Version = 5.2>
<!Document,
Print Rev Bars = no,
Final Output Device = "ps",
Default Printer = "nearest-adps">
<!Font Definitions,
F2 = Times 10 Italic,
F3 = Times 10,
F4 = Times 8 Italic,
F5 = Times 18 Bold,
F6 = Times 10 Bold,
F7 = Times 12 Bold,
F8 = Symbol_B 8,
F9 = Courier 8>
<!Page,
Bottom Margin = 1 inches,
Left Margin = 1 inches,
Right Margin = 1.15 inches,
First Page = Right,
Starting Page # = Inherit,
Page # Prefix = "5<#1e>",
Hyphenation = on,
Consecutive Hyphens = 2,
Vert. Just. = off>
<!Autonumber Stream, List, 2,
Level 2 Suffix = ,
Level 2 Starting Value = 0,
Level 2 Show = no>
<!Autonumber Stream, Outline, 3,
Level 1 Symbol Type = UPPER ROMAN,
Level 2 Symbol Type = UPPER ALPHA>
<!Autonumber Stream, figure, 2,
Level 1 Prefix = "Figure ",
Level 1 Suffix = "<#1e>",
Level 1 Show = no,
Level 2 Suffix = ,
Level 2 Starting Value = 0,
Level 2 Show = no>
<!Autonumber Stream, figurelet, 2,
Level 1 Symbol Type = UPPER ALPHA,
Level 1 Prefix = "Figure ",
Level 1 Suffix = "<#1e>",
Level 1 Show = no,
Level 2 Suffix = "<#04>">
<!Autonumber Stream, invisible, 1,
Level 1 Suffix = ,
Level 1 Show = no>
<!Autonumber Stream, item, 2,
Level 2 Symbol Type = LOWER ALPHA,
Level 2 Trail = yes>
<!Autonumber Stream, paralet, 4,
Level 1 Symbol Type = UPPER ALPHA,
Level 1 Suffix = ,
Level 1 Show = no,
Level 2 Prefix = .,
Level 2 Suffix = ,
Level 3 Prefix = .,
Level 3 Suffix = ,
Level 4 Prefix = .,
Level 4 Suffix = >
<!Autonumber Stream, paranum, 4,
Level 1 Suffix = ,
Level 1 Show = no,
Level 2 Prefix = .,
Level 2 Suffix = ,
Level 3 Prefix = .,
Level 3 Suffix = ,
Level 4 Prefix = .,
Level 4 Suffix = >
<!Autonumber Stream, table, 2,
Level 1 Prefix = "Table ",
Level 1 Suffix = "<#1e>",
Level 1 Show = no,
Level 2 Suffix = >
<!Autonumber Stream, tablelet, 2,
Level 1 Symbol Type = UPPER ALPHA,
Level 1 Prefix = "Table ",
Level 1 Suffix = "<#1e>",
Level 1 Show = no,
Level 2 Suffix = "<#04>">
<!Class, arg,
Bottom Margin = 0.08 inches,
Left Margin = 1.85 inches,
First Indent = -0.25 inches,
Line Spacing = 1.121 lines,
Font = F2,
Left Tab = -0.25/0 inches>
<!Class, bullet,
Bottom Margin = 0.153 inches,
Left Margin = 1.85 inches,
First Indent = -0.25 inches,
Line Spacing = 1.121 lines,
Font = F3,
Allow Page Break Within = no,
Left Tab = -0.50/0 inches>
<!Class, caption,
Top Margin = 0.07 inches,
Bottom Margin = 0.07 inches,
Line Spacing = 1.100 lines,
Font = F4>
<!Class, endrule,
Bottom Margin = 0.15 inches,
Left Margin = 1.60 inches,
Line Spacing = 1.121 lines,
Alignment = Left,
Font = F3,
Hyphenation = off,
Allow Page Break Within = no,
Left Tab = 0/1.75/2.30/3.50/7.50 inches>
<!Class, fig,
Top Margin = 0.07 inches,
Bottom Margin = 0.07 inches,
Line Spacing = 1.100 lines,
Alignment = Left,
Font = F5>
<!Class, item,
Bottom Margin = 0.153 inches,
Left Margin = 1.85 inches,
First Indent = -0.25 inches,
Line Spacing = 1.121 lines,
Font = F3,
Allow Page Break Within = no,
Left Tab = 0 inches,
Right Tab = -0.50 inches,
Autonumber Name = item>
<!Class, keyword2,
Bottom Margin = 0.153 inches,
Left Margin = 1.85 inches,
First Indent = -0.25 inches,
Line Spacing = 1.121 lines,
Font = F6,
Left Tab = -0.50/0 inches>
<!Class, p1para,
Bottom Margin = 0.153 inches,
Left Margin = 1.60 inches,
First Indent = -1.60 inches,
Line Spacing = 1.121 lines,
Alignment = Left,
Font = F7,
Allow Page Break Within = no,
Allow Page Break After = no,
Left Tab = -1.70/0 inches>
<!Class, p1rule,
Bottom Margin = 0 inches,
Line Spacing = 1 lines,
Font = F3,
Hyphenation = off,
Allow Page Break After = no,
Left Tab = 0/0.75*13 inches>
<!Class, p1stacked,
Bottom Margin = 0 inches,
Left Margin = 1.60 inches,
First Indent = -1.60 inches,
Line Spacing = 1 lines,
Font = F6,
Allow Page Break Within = no,
Allow Page Break After = no,
Left Tab = -1.60/-0.17/0 inches>
<!Class, para,
Bottom Margin = 0.153 inches,
Left Margin = 1.60 inches,
Line Spacing = 1.121 lines,
Font = F3,
Allow Page Break Within = no,
Left Tab = 0/0.75*13 inches>
<!Class, return,
Bottom Margin = 0.077 inches,
Left Margin = 1.60 inches,
First Indent = -0.90 inches,
Line Spacing = 1.121 lines,
Alignment = Left,
Font = F6,
Hyphenation = off,
Allow Page Break Within = no,
Allow Page Break After = no,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
<!Class, ritabhd1,
Bottom Margin = 0 inches,
Left Margin = 1.60 inches,
Line Spacing = 1.121 lines,
Alignment = Left,
Font = F6,
Hyphenation = off,
Allow Page Break Within = no,
Allow Page Break After = no,
Left Tab = 0/1.30/2.30/3.50/7.50 inches>
<!Class, secno,
Top Margin = 0.07 inches,
Bottom Margin = 0.07 inches,
Line Spacing = 1.100 lines,
Alignment = Left,
Font = F5,
Autonumber Name = paranum>
<!Class, secrule,
Bottom Margin = 0 inches,
Line Spacing = 1 lines,
Font = F3,
Hyphenation = off,
Allow Page Break After = no,
Left Tab = 0/0.75*13 inches,
Autonumber Name = table>
<!Class, sectitle,
Bottom Margin = 0 inches,
Line Spacing = 1 lines,
Alignment = Right,
Font = F5,
Hyphenation = off,
New Page = yes,
Left Tab = 0/0.75*13 inches>
<!Class, syntax,
Bottom Margin = 0.077 inches,
Left Margin = 1.60 inches,
First Indent = -0.90 inches,
Line Spacing = 1.121 lines,
Alignment = Left,
Font = F6,
Hyphenation = off,
Allow Page Break Within = no,
Allow Page Break After = no,
Left Tab = -0.90/0 inches,
Right Tab = 8 inches>
<!Class, syntax0,
Bottom Margin = 0 inches,
Left Margin = 1.60 inches,
First Indent = -0.90 inches,
Line Spacing = 1.121 lines,
Alignment = Left,
Font = F6,
Hyphenation = off,
Allow Page Break Within = no,
Allow Page Break After = no,
Left Tab = -0.90/0 inches,
Right Tab = 8 inches>
<!Class, "table",
Top Margin = 0.07 inches,
Bottom Margin = 0.07 inches,
Line Spacing = 1.100 lines,
Font = F6,
Autonumber Name = table>
<!Class, tbline1,
Bottom Margin = 0 inches,
Left Margin = 1.60 inches,
Line Spacing = 1.121 lines,
Alignment = Left,
Font = F3,
Hyphenation = off,
Allow Page Break Within = no,
Allow Page Break After = no,
Left Tab = 0/1.50/2.30/3.50/7.50 inches>
<!Class, tbline1a,
Bottom Margin = 0 inches,
Left Margin = 3.20 inches,
First Indent = -1.60 inches,
Line Spacing = 1.121 lines,
Alignment = Left,
Font = F3,
Hyphenation = off,
Allow Page Break Within = no,
Allow Page Break After = no,
Left Tab = 0/1.30/2.30/3.50/7.50 inches>
<!Class, title,
Top Margin = 0.07 inches,
Bottom Margin = 0.07 inches,
Line Spacing = 1.100 lines,
Alignment = Right,
Font = F5,
TOC Doc Name = TOC>
<!Master Frame,
Name = "At Anchor",
Placement = At Anchor,
Width = 0.41 inches,
Height = 0.137 inches,
Vertical Alignment = 0.03 inches,
Diagram =
V4,
(g9,32767,0
(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))>
<!Master Frame,
Name = p1rule,
Placement = At Anchor,
Width = 6.35 inches,
Height = 0.153 inches,
Vertical Alignment = 0.007 inches,
Shared Contents = yes,
Diagram =
V4,
(g9,1,0
(v4,1,0,0.006667,0.066723,6.326667,0.066611,17,2,0)
(E10,0,0,0,1,1,0.053333,1,15,0,0,1,0,0,0,0,0,1,1,0.066667,0.066667,6,6,0,0.066
667,6))>
<First Page Header, Frame =
V4,
(g9,0,0
(E10,0,0,0,1,1,0.053333,1,15,0,0,1,0,0,0,1,1,1,1,0.066667,0.066667,6,6,0,0.066
667,6))>
<Right Page Header, Frame =
V4,
(g9,1,0
(T8,1,12,5.373333,0.333333,0.96,1,0.333333,0,516,0,17,0,0,0,0,0,0,1,1,2048,512
,102,1101,2,
<caption>
Graphics Contexts
<End Text>)
(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))>
<Left Page Header, Frame =
V4,
(g9,1,0
(T8,1,12,0,0.333333,1.6,1,0.333333,0,516,0,17,0,0,0,0,0,0,1,1,2048,512,102,110
1,2,
<caption>
Graphics Contexts
<End Text>)
(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))>
<Right Page Footer, Frame =
V4,
(g9,1,0
(t8,1,4,6.333333,0.266667,2,17,@nntimsps10b,\240)
(t8,2,4,0.006667,0.266667,0,17,@nntimsps8i,CLX\ Programmer's\ Reference)
(v4,3,0,0,0.066667,6.333333,0.066554,17,2,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))>
<Left Page Footer, Frame =
V4,
(g9,1,0
(t8,1,4,0,0.266667,0,17,@nntimsps10b,\240)
(t8,2,4,6.333333,0.266667,2,17,@nntimsps8i,CLX\ Programmer's\ Reference)
(v4,3,0,0.026667,0.066667,6.333333,0.066554,17,2,0)
(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))>
<sectitle,
Allow Page Break Within = no,
Allow Page Break After = no>
<|,"5<#1e>53">
<Frame,
Name = "At Anchor",
Placement = At Anchor,
Width = 4.72 inches,
Height = 0.94 inches,
Vertical Alignment = 0.03 inches,
Diagram =
V4,
(g9,1,0
(T8,1,12,0.133333,0.72,4.563333,1,0.333333,0,516,0,17,0,0,0,0,0,0,1,1,2048,512
,102,1101,3,
<title>
GRAPHICS CONTEXTS
<End Text>)
(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))>
<Frame,
Name = "At Anchor",
Placement = At Anchor,
Width = 1.626 inches,
Height = 0.938 inches,
Vertical Alignment = 0 inches,
Diagram =
V4,
(g9,1,0
(T8,1,12,0.066667,0.276667,0,1,0.333333,0,516,0,17,0,0,0,0,0,0,1,1,2048,512,10
2,1101,3,
<secno,
TOC Doc Name = TOC>
<Autonum, paranum, 1, First = Yes>
<End Text>)
(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">
<Autonum, table, 1, First = Yes>
<End Text>)
(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,
<fig,
Alignment = Both,
Font = F6,
Autonumber Name = figure>
<Autonum, figure, 1, First = Yes>
<End Text>)
(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))>
<secrule,
Allow Page Break Within = no,
Allow Page Break After = yes,
Autonumber Name = >
<Index, "graphics context", To Named = sectitle>
<Frame,
Name = "At Anchor",
Placement = At Anchor,
Width = 6.35 inches,
Height = 0.153 inches,
Vertical Alignment = 0.007 inches,
Diagram =
V4,
(g9,1,0
(v4,1,0,0.006667,0.066723,6.333333,0.066611,17,2,0)
(E10,0,0,0,1,1,0.053333,1,15,0,0,1,0,0,0,0,0,1,1,0.066667,0.066667,6,6,0,0.066
667,6))>
<p1para,
Alignment = Both,
Font = F3,
Allow Page Break After = yes>
<F7>Introduction<Tab><F6>5.1<F0><#04>Clients of the X Window System
specify the visual attributes of graphical output primitives by using <F2>grap
hics contexts<F0>. 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.
<para>
CLX represents a graphics context by an object of type <F6>gcontext<F0>
and defines functions to create, modify, and manipulate <F6>gcontext<F0>
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:
<item>
<Autonum, item, 1, First = Yes><Tab>Communication efficiency <#1f>
Changes to attribute values in a <F6>gcontext<F0> are first made
only in the local cache. Just before a <F6>gcontext<F0> is actually
used, CLX automatically sends any changes to the X server, batching
all changes into a single request.
<Autonum, item, 1><Tab>Inquiring <F6>gcontext<F0> contents <#1f>
Accessor functions can be used to return the value of any individual <F6>gcont
ext<F0> component by reading the copy of the <F6>gcontext<F0> 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 <F6>gcontext<F0>.
<para>
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 <F6>gcontext<F0> 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:
<bullet>
<F8>w<Tab><F0>Create a graphics context
<F8>w<Tab><F0>Return the contents of a graphics context
<F8>w<Tab><F0>Change the contents of a graphics context
<F8>w<Tab><F0>Copy a graphics context
<F8>w<Tab><F0>Free a graphics context
<p1rule>
<|,"5<#1e>54"><Index, "graphics context", "creating", To Named = p1rule>
<Frame,
Name = p1rule,
Placement = At Anchor,
Width = 6.35 inches,
Height = 0.153 inches,
Vertical Alignment = 0.007 inches,
Shared Contents = yes>
<p1stacked,
Font = F3,
Left Tab = -1.70/0 inches>
<F7>Creating <Tab><F6>5.2<#04><F0>To create a graphics context,
use <F6>create<#1e>gcontext.<#04>
<p1stacked,
Left Tab = -1.60/0 inches>
<F7>Graphics<F0><Tab>
<p1para,
Alignment = Both,
Font = F3,
Allow Page Break After = yes>
<F7>Contexts<Tab>
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
create<#1e>gcontext <F3>&key <F0>:arc<#1e>mode<F3> <F0>:background<F3>
(<F0>:cache<#1e>p<F3> t) <F0>:cap<#1e>style<Tab><F3>Function<Index, Doc = operations, "xlib:create<#1e>gcontext", Sort String = "create<#1e>gcontext"><HR>
<F0>:clip<#1e>mask :clip<#1e>ordering :clip<#1e>x :clip<#1e>y :dash<#1e>offset
:dashes <HR>
:drawable :exposures :fill<#1e>rule :fill<#1e>style :font :foreground <HR>
:function :join<#1e>style :line<#1e>style :line<#1e>width :plane<#1e>mask
:stipple :subwindow<#1e>mode :tile :ts<#1e>x :ts<#1e>y
<return>
<Tab><F3>Returns: <F2><HR>
gcontext <F3><#1f> Type <F0>gcontext<F3>.
<para>
Creates, initializes, and returns a graphics context (<F6>gcontext<F0>).
The graphics context can only be used with destination drawables having
the same root and depth as the specified <F6>:drawable<F0>. If <F6>:cache<#1e>
p<F0> is non<#1e><F6>nil<F0>, 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 (<F6>setf<F0>
and <F6>with<#1e>gcontext<F0>) 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 <F6>force<#1e>gcontext<#1e>changes<F0>.
<keyword2>
:cache<#1e>p <F3><#1f> Specifies if this graphics context should
be cached locally by CLX. If <F0>nil<F3> then the state is not cached,
otherwise a local cache is kept.
:drawable <F3><#1f> The <F0>drawable<F3> whose root and depth are
to be associated with this graphics context. This is a required keyword
argument.
:arc<#1e>mode<F3>, <F0>:background<F3>, <F0>:cap<#1e>style<F3>, <F0>:clip
<#1e>mask<F3>, <F0>:clip<#1e>ordering<F3>, <F0>:clip<#1e>x<F3>, <F0>:clip
<#1e>y<F3>, <F0>:dash<#1e>offset<F3>, <F0>:dashes<F3>, <F0>:exposures
<F3>, <F0>:fill<#1e>rule<F3>, <F0>:fill<#1e>style<F3>, <F0>:font<F3>,
<F0>:foreground<F3>, <F0>:function<F3>, <F0>:join<#1e>style<F3>, <F0>:li
ne<#1e>style<F3>, <F0>:line<#1e>width<F3>, <F0>:plane<#1e>mask<F3>, <F0>:
stipple<F3>, <F0>:subwindow<#1e>mode<F3>, <F0>:tile<F3>, <F0>:ts<#1e>x
<F3>, <F0>:ts<#1e>y <F3><#1f> Initial attribute values for the
graphics context.
<para,
New Page = yes>
<|,"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 <F6>nil
<F0>causes the default value to be used. These default values are
as <Autonum, table, 1>follows:
<ritabhd1,
Left Tab = 0/1.50/2.30/3.50/7.50 inches>
<Tab-><Tab-><Tab-><Tab-><HR>
<Index, "graphics context", "components", "default values">Component<Tab>Default Value<HR>
<Tab-><Tab-><Tab-><Tab->
<tbline1>
<F6>arc<#1e>mode<F0><Tab><F6>:pie<#1e>slice
<F6>background<F0><Tab>1
<F6>cap<#1e>style<F0><Tab><F6>:butt
<F6>clip<#1e>mask<F0><Tab><F6>:none
<F6>clip<#1e>ordering<F0><Tab><F6>:unsorted
<F6>clip<#1e>x<F0><Tab>0
<F6>clip<#1e>y<F0><Tab>0
<F6>dash<#1e>offset<F0><Tab>0
<F6>dashes<F0><Tab>4 (that is, the list '(4, 4))
<F6>exposures<F0><Tab><F6>:on
<F6>fill<#1e>rule<F0><Tab><F6>:even<#1e>odd
<F6>fill<#1e>style<F0><Tab><F6>:solid
<F6>font<F0><Tab>server dependent
<F6>foreground<F0><Tab>0
<F6>function<F0><Tab><F6>boole<#1e>1
<F6>join<#1e>style<F0><Tab><F6>:miter
<F6>line<#1e>style<F0><Tab><F6>:solid
<F6>line<#1e>width<F0><Tab>0
<F6>plane<#1e>mask<F0><Tab>A bit mask of all ones
<F6>stipple<F0><Tab>Pixmap of unspecified size filled with ones <F6>subwindo
w<#1e>mode<F0><Tab><F6>:clip<#1e>by<#1e>children
<F6>tile<F0><Tab>Pixmap of an unspecified size filled with the<HR>
<Tab>foreground pixel (that is, the client<#1e>specified pixel<HR>
<Tab>if any, or else 0)
<F6>ts<#1e>x<F0><Tab>0
<F6>ts<#1e>y<F0><Tab>0
<endrule>
<Tab-><Tab-><Tab-><Tab->
<para>
Note that foreground and background do not default to any values that
are likely to be useful on a color display. Since specifying a <F6>nil<F0>
value means use the default, this implies for clip<#1e>mask that an
empty rectangle sequence cannot be specified as an empty list; <F6>:none<F0>
must be used instead. Specifying a <F6>stringable<F0> for font causes
an implicit <F6>open<#1e>font<F0> call to occur.
<p1rule>
<Index, "graphics context", "attributes", To Named = p1rule>
<Frame,
Name = p1rule,
Placement = At Anchor,
Width = 6.35 inches,
Height = 0.153 inches,
Vertical Alignment = 0.007 inches,
Shared Contents = yes>
<p1stacked,
Font = F3,
Left Tab = -1.70/0 inches>
<F7>Graphics <Tab><F6>5.3<F0><#04>The following paragraphs describe
the CLX functions used to return or<FJ>
<p1stacked,
Left Tab = -1.60/0 inches>
<F7>Context<F0><Tab><F3>change the<SP>attributes of a <F0>gcontext<F3>.
Functions that return the contents of a<FJ>
<p1para,
Alignment = Both,
Font = F3,
Allow Page Break After = yes>
<F7>Attributes<Tab><F6>gcontext<F0> return <F6>nil<F0> if the
last value stored is unknown (for example, if<FJ>
the<SP><F6>gcontext<F0> was not cached or if the <F6>gcontext<F0>
was not created by the inquiring<SP>client).
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
gcontext<#1e>arc<#1e>mode<F3> <F2>gcontext<F0><Tab><F3>Function<F0><Index, "arc<#1e>mode attribute of graphics context"><Index, "graphics context", "attribute", "arc<#1e>mode"><Index, Doc = operations, "xlib:gcontext<#1e>arc<#1e>mode", Sort String = "gcontext<#1e>arc<#1e>mode">
<return>
<Tab><F3>Returns: <F2><HR>
arc<#1e>mode <F3><#1f> Either <F0>:chord<F3> or <F0>:pie<#1e>slice<F3>.
<para>
Returns and (with <F6>setf<F0>) 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 <F6>draw<#1e>arcs<F0> function.
A value of <F6>:chord<F0> specifies that arcs are filled inward
to the chord between the end points of the arc. <F6>:pie<#1e>slice <F0>specif
ies that arcs are filled inward to the center point of the arc, creating
a pie slice effect.
<arg>
<|,"5<#1e>56">gcontext <F3><#1f> A <F6>gcontext<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
gcontext<#1e>background<F3> <F2>gcontext<F0><Tab><F3>Function<F0><Index, "background attribute", "graphics context"><Index, "graphics context", "attribute", "background"><Index, Doc = operations, "xlib:gcontext<#1e>background", Sort String = "gcontext<#1e>background">
<return>
<Tab><F3>Returns: <F2><HR>
background <F3><#1f> Type <F0>card32<F3>.
<para>
Returns and (with <F6>setf<F0>) 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.
<arg>
gcontext <F3><#1f> A <F6>gcontext<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
gcontext<#1e>cache<#1e>p<F3> <F2>gcontext<F0><Tab><F3>Function<Index, Doc = operations, "xlib:gcontext<#1e>cache<#1e>p", Sort String = "gcontext<#1e>cache<#1e>p"><Index, "graphics context", "local cache mode">
<return>
<Tab><F3>Returns: <F2><HR>
cache<#1e>p <F3><#1f> Type <F0>boolean<F3>.
<para>
Returns and (with <F6>setf<F0>) changes the local cache mode for
the <F2>gcontext<F0>. If true, the state of the <F2>gcontext<F0>
is cached by CLX and changes to its attributes have no effect unless
the new value differs from its cached value.
<arg>
gcontext <F3><#1f> A <F6>gcontext<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
gcontext<#1e>cap<#1e>style <F2>gcontext<F0><Tab><F3>Function<F0><Index, "cap<#1e>style attribute of graphics context"><Index, "graphics context", "attribute", "cap<#1e>style"><Index, Doc = operations, "xlib:gcontext<#1e>cap<#1e>style", Sort String = "gcontext<#1e>cap<#1e>style">
<return>
<Tab><F3>Returns: <F2><HR>
cap<#1e>style <F3><#1f> One of <F0>:butt<F3>, <F0>:not<#1e>last<F3>,
<F0>:projecting<F3>, or <F0>:round<F3>.
<para,
Bottom Margin = 0.14 inches>
Returns and (with <F6>setf<F0>) changes the cap<#1e>style attribute
of the specified graphics context.
<para>
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:
<ritabhd1,
Left Tab = 0/1.30/1.60/3.50/7.50 inches>
<Tab-><Tab-><Tab-><Tab-><HR>
Cap<#1e>Style<Tab><Tab>Interpretation<HR>
<Tab-><Tab-><Tab-><Tab->
<tbline1a>
<F6>:butt<F0><Tab>Square at the end point (perpendicular to the
slope of the line) with no projection beyond.<HR>
<F6>:not<#1e>last<F0><Tab>Equivalent to <F6>:butt<F0>, except
that for a line<#1e>width of zero or one the final end point is not
drawn.<HR>
<F6>:projecting<F0><Tab>Square 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 <F6>:butt<F0> for line<#1e>width zero or one.<HR>
<F6>:round<F0><Tab>A circular arc with the radius equal to 1/2 of
the line<#1e>width, centered on the end point. This is equivalent
to <F6>:butt<F0> for line<#1e>width zero or one.
<endrule>
<Tab-><Tab-><Tab-><Tab->
<para,
Bottom Margin = 0.14 inches>
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.
<ritabhd1>
<|,"5<#1e>57"><Tab-><Tab-><Tab-><Tab-><HR>
Cap<#1e>Style<Tab>Line<#1e>Width<Tab>Effect<HR>
<Tab-><Tab-><Tab-><Tab->
<tbline1,
Left Tab = 0/1.30/2.30/3.50/7.50 inches>
<F6>:butt<F0><Tab>thin<Tab>Device dependent, but the desired<HR>
<Tab><Tab>effect is that a single pixel is drawn.<HR>
<F6>:butt<F0><Tab>wide<Tab>Nothing is drawn.<HR>
<F6>:not<#1e>last<F0><Tab>thin<Tab>Device dependent, but the desired<HR>
<Tab><Tab>effect is that nothing is drawn.<HR>
<HR>
<F6>:projecting<F0><Tab>thin<Tab>Same as <F6>:butt<F0> with thin
line<#1e>width.<HR>
<F6>:projecting<F0><Tab>wide<Tab>The closed path is a square, aligned<HR>
<Tab><Tab>with the coordinate axes, centered at<HR>
<Tab><Tab>the end point, with sides equal to the<HR>
<Tab><Tab>line<#1e>width.<HR>
<F6>:round<F0><Tab>wide<Tab>The closed path is a circle, centered<HR>
<Tab><Tab>at the end point, with diameter equal<HR>
<Tab><Tab>to the line<#1e>width.<HR>
<F6>:round<F0><Tab>thin<Tab>Same as <F6>:butt <F0>with thin line<#1e>width.
<endrule,
Bottom Margin = 0.14 inches>
<Tab-><Tab-><Tab-><Tab->
<arg>
gcontext <F3><#1f> A <F6>gcontext<F3>.
<syntax>
gcontext<#1e>clip<#1e>mask <F2>gcontext<F0> <F3>&optional <F2>ordering
<F0><Tab><F3>Function<F0><Index, "clip<#1e>mask attribute of graphics context"><Index, "graphics context", "attribute", "clip<#1e>mask"><Index, Doc = operations, "xlib:close<#1e>display", Sort String = "close<#1e>display">
<para>
Returns and (with <F6>setf<F0>) changes the clip<#1e>mask attribute
of the graphics context.
When changing the clip<#1e>mask attribute, the new clip<#1e>mask can
be<SP>specified as a pixmap or a <F6>rect<#1e>seq<F0> or as the
values <F6>:none<F0> or <F6>nil<F0>. The<SP>ordering argument
can be specified only with <F6>setf<F0> when the new clip<#1e>mask<SP>is
a <F6>rect<#1e>seq<F0>.
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 <F6>:none <F0>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 <F6>:none<F0>.
<|,"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 <F6>:unsorted<F0> means the rectangles are in arbitrary order.
A value of <F6>:y<#1e>sorted<F0> means that the rectangles are non<#1e>decrea
sing in their Y origin. A <F6>:yx<#1e>sorted<F0> value is like <F6>:y<#1e>so
rted<F0> with the additional constraint that all rectangles with
an equal Y origin are non<#1e>decreasing in their X origin. A <F6>:yx<#1e>band
ed<F0> value additionally constrains <F6>:yx<#1e>sorted<F0> 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.
<arg>
gcontext <#1f> <F3>A <F6>gcontext<F3>.
ordering <#1f> <F3>One of <F6>:unsorted<F3>, <F6>:y<#1e>sorted<F3>, <F6>:
yx<#1e>banded<F3>, <F6>:yx<#1e>sorted<F3>, or <F6>nil<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
gcontext<#1e>clip<#1e>x <F2>gcontext<F0><Tab><F3>Function<F0><Index, "clip<#1e>x attribute of graphics context"><Index, "graphics context", "attribute", "clip<#1e>x"><Index, Doc = operations, "xlib:gcontext<#1e>clip<#1e>x", Sort String = "gcontext<#1e>clip<#1e>x">
<return>
<Tab><F3>Returns: <F2><HR>
clip<#1e>x <F3><#1f> Type <F0>int16<F3>.
<para>
Returns and (with <F6>setf<F0>) 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.
<arg>
gcontext <F3><#1f> A <F6>gcontext<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
gcontext<#1e>clip<#1e>y <F2>gcontext<F0><Tab><F3>Function<F0><Index, "clip<#1e>y attribute of graphics context"><Index, "graphics context", "attribute", "clip<#1e>y"><Index, Doc = operations, "xlib:gcontext<#1e>clip<#1e>y", Sort String = "gcontext<#1e>clip<#1e>y">
<return>
<Tab><F3>Returns: <F2><HR>
clip<#1e>y <F3><#1f> Type <F0>int16<F3>.
<para>
Returns and (with <F6>setf<F0>) 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.
<arg>
gcontext <F3><#1f> A <F6>gcontext<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
gcontext<#1e>dash<#1e>offset <F2>gcontext<F0><Tab><F3>Function<F0><Index, "dash<#1e>offset attribute of graphics context"><Index, "graphics context", "attribute", "dash<#1e>offset"><Index, Doc = operations, "xlib:gcontext<#1e>dash<#1e>offset", Sort String = "gcontext<#1e>dash<#1e>offset">
<return>
<Tab><F3>Returns: <F2><HR>
dash<#1e>offset <F3><#1f> Type <F0>card16<F3>.
<para>
Returns and (with <F6>setf<F0>) 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.
<arg>
gcontext <F3><#1f> A <F6>gcontext<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
gcontext<#1e>dashes <F2>gcontext<F0><Tab><F3>Function<F0><Index, "dashes attribute of graphics context"><Index, "graphics context", "attribute", "dashes"><Index, Doc = operations, "xlib:gcontext<#1e>dashes", Sort String = "gcontext<#1e>dashes">
<return>
<Tab><F3>Returns: <F2><HR>
dashes <F3><#1f> Type <F0>sequence<F3> or <F0>card8<F3>.
<para>
Returns and (with <F6>setf<F0>) changes the dashes attribute of
the specified graphics context. The sequence must be non<#1e>empty
and the elements must be non<#1e>zero <F6>card8<F0> 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><F6>nil<F0> 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, <F2>N<F0>, for the dashes attribute
is an abbreviated way of specifying a two element sequence with both
elements equal to the specified value [<F2>N<F0>, <F2>N<F0>].
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.
<arg>
gcontext <F3><#1f> A <F6>gcontext<F3>.
<syntax0>
gcontext<#1e>display<F3> <F2>gcontext<F0><Tab><F3>Function<Index, Doc = operations, "xlib:gcontext<#1e>display", Sort String = "gcontext<#1e>display">
<return>
<Tab><F3>Returns: <F2><HR>
display <F3><#1f> Type <F0>display<F3>.
<para>
Returns the <F6>display<F0> object associated with the specified <F2>gcontex
t<F0>.
<arg>
gcontext <#1f> <F3>A <F6>gcontext<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
gcontext<#1e>equal <F2>gcontext<#1e>1<F3> <F2>gcontext<#1e>2<F0><Tab><F3>F
unction<Index, Doc = operations, "xlib:gcontext<#1e>equal", Sort String = "gcontext<#1e>equal">
<return>
<Tab><F3>Returns: <F2><HR>
equal<#1e>p <F3><#1f> Type <F0>boolean<F3>.
<para>
Returns true if the two arguments refer to the same server resource,
and <F6>nil<F0> if they do not.
<arg>
gcontext<#1e>1<F3>, <F0>gcontext<#1e>2 <F3><#1f> A <F6>gcontext<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
gcontext<#1e>exposures <F2>gcontext<F0><Tab><F3>Function<F0><Index, "exposures attribute of graphics context"><Index, "graphics context", "attribute", "exposures"><Index, Doc = operations, "xlib:gcontext<#1e>exposures", Sort String = "gcontext<#1e>exposures">
<return>
<Tab><F3>Returns: <F2><HR>
exposures <F3><#1f> Either <F0>:off<F3> or <F0>:on<F3>.
<para>
Returns and (with <F6>setf<F0>) changes the exposures attribute
of the specified graphics context.
The exposures attribute in a graphics context controls the generation
of <F6>:graphics<#1e>exposure<F0> events for calls to the <F6>copy<#1e>area
<F0> and <F6>copy<#1e>plane<F0> functions. If <F6>:on<F0>, <F6>:graphics<#1e>
exposure<F0> events will be reported when calling the <F6>copy<#1e>area<F0>
and <F6>copy<#1e>plane<F0> functions with this graphics context.
Otherwise, if <F6>:off<F0>, the events will not be reported.
<arg>
gcontext <F3><#1f> A <F6>gcontext<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
gcontext<#1e>fill<#1e>rule <F2>gcontext<F0><Tab><F3>Function<F0><Index, "fill<#1e>rule attribute of graphics context"><Index, "graphics context", "attribute", "fill<#1e>rule"><Index, Doc = operations, "xlib:gcontext<#1e>fill<#1e>rule", Sort String = "gcontext<#1e>fill<#1e>rule">
<return>
<Tab><F3>Returns: <F2><HR>
fill<#1e>rule <F3><#1f> Either <F0>:even<#1e>odd<F3> or <F0>:winding
<F3>.
<para>
Returns and (with <F6>setf<F0>) 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 <F6>:even<#1e>odd<F0> or <F6>:winding<F0>.
The <F6>:even<#1e>odd<F0> 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 <F6>:winding<F0> 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 <F6>:even<#1e>odd<F0> and <F6>:winding<F0>, 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).
<arg>
gcontext <F3><#1f> A <F6>gcontext<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
gcontext<#1e>fill<#1e>style <F2>gcontext<F0><Tab><F3>Function<F0><Index, "fill<#1e>style attribute of graphics context"><Index, "graphics context", "attribute", "fill<#1e>style"><Index, Doc = operations, "xlib:gcontext<#1e>fill<#1e>style", Sort String = "gcontext<#1e>fill<#1e>style">
<return>
<Tab><F3>Returns: <F2><HR>
fill<#1e>style <F3><#1f> One of <F0>:opaque<#1e>stippled<F3>, <F0>:solid
<F3>, <F0>:stippled<F3>, or :<F0>tiled<F3>.
<para>
Returns and (with <F6>setf<F0>) 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:
<ritabhd1,
Left Tab = 0/1.30/1.60/3.50/7.50 inches>
<Tab-><Tab-><Tab-><Tab-><HR>
Fill<#1e>Style<Tab><Tab>Meaning<HR>
<Tab-><Tab-><Tab-><Tab->
<tbline1,
Left Margin = 3.20 inches,
First Indent = -1.60 inches,
Left Tab = 0/1.30/2.30/3.50/7.50 inches>
<F6>:opaque<#1e>stippled<F0><Tab>Filled 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.<HR>
<F6>:solid<F0><Tab>Filled with the foreground pixel value.<HR>
<F6>:stippled<F0><Tab>Filled with the foreground pixel value masked
by stipple.<HR>
<F6>:tiled<F0><Tab>Filled with tile.
<endrule>
<Tab-><Tab-><Tab-><Tab->
<para>
When drawing lines with line<#1e>style <F6>:double<#1e>dash<F0>,
the filling of the odd dashes are controlled by the fill<#1e>style
in the following manner:
<ritabhd1,
Left Tab = 0/1.50/2.30/3.50/7.50 inches>
<Tab-><Tab-><Tab-><Tab-><HR>
Fill<#1e>Style<Tab>Effect<HR>
<Tab-><Tab-><Tab-><Tab->
<tbline1,
Left Tab = 0/1.50/2.50/3.50/7.50 inches>
<F6>:opaque<#1e>stippled<Tab><F0>Same as for even dashes.<HR>
<tbline1>
<F6>:solid<F0><Tab>Filled with the background pixel value.<HR>
<F6>:stippled<F0><Tab>Filled with the background pixel value masked
by<HR>
<Tab>stipple.<HR>
<F6>:tiled<F0><Tab>Filled the same as the even dashes.
<endrule>
<Tab-><Tab-><Tab-><Tab->
<arg>
<|,"5<#1e>61">gcontext <F3><#1f> A <F6>gcontext<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
gcontext<#1e>font <F2>gcontext <F3>&optional <F2>metrics<#1e>p<F0><Tab>
<F3>Function<F0><Index, "font", "attribute of graphics context"><Index, "graphics context", "attribute", "font"><Index, Doc = operations, "xlib:gcontext<#1e>font", Sort String = "gcontext<#1e>font">
<return>
<Tab><F3>Returns: <F2> <HR>
font <F3><#1f> Type <F0>font<F3> or <F0>null<F3>.
<para>
Returns and (with <F6>setf<F0>) changes the <F2>font<F0> attribute
of the specified graphics context. If the stored font is known, it
is returned. If it is not known and the <F2>metrics<#1e>p<F0> argument
is <F6>nil<F0>, then <F6>nil<F0> is returned. If the font is not
known and <F2>metrics<#1e>p<F0> 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 <F6>font<F0> object or a font name can
be used. If a font name is passed, <F6>open<#1e>font<F0> is call
automatically to get the <F6>font<F0> object.
<arg>
gcontext <F3><#1f> A <F6>gcontext<F3>.
metrics<#1e>p <F3><#1f> Specifies whether a pseudo<#1e>font is returned
when the real font stored in the graphics context is not known. The
default is <F6>nil<F3>, which means do not return a pseudo<#1e>font.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
gcontext<#1e>foreground<F3> <F2>gcontext<F0><Tab><F3>Function<F0><Index, "foreground attribute of graphics context"><Index, "graphics context", "attribute", "foreground"><Index, Doc = operations, "xlib:gcontext<#1e>foreground", Sort String = "gcontext<#1e>foreground">
<return>
<Tab><F3>Returns: <F2><HR>
foreground <F3><#1f> Type <F0>card32<F3>.
<para>
Returns and (with <F6>setf<F0>) 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.
<arg>
gcontext <F3><#1f> A <F6>gcontext<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
gcontext<#1e>function<F2> gcontext<F0><Tab><F3>Function<F0><Index, "function attribute of graphics context"><Index, "graphics context", "attribute", "function"><Index, Doc = operations, "xlib:gcontext<#1e>function", Sort String = "gcontext<#1e>function">
<return>
<Tab><F3>Returns: <F2><HR>
function <F3><#1f> Type <F0>boole<#1e>constant<F3>.
<para>
Returns the <F2>function<F0> of the specified graphics context.
In all graphic operations, given a source pixel and a corresponding<SP>destinat
ion pixel, the resulting pixel drawn is computed bitwise on the<SP>bits
of the source and destination pixels. That is, a logical operation<SP>is
used to combine each bit plane of corresponding source and<SP>destination
pixels. The graphics context function attribute specifies<SP>the logical
operation used via one of the 16 operation codes defined by Common
Lisp for the <F6>boole<F0> function.
The following table shows each of the logical operation codes that
can<SP>be given by the function attribute. For each operation code,
its result<SP> is shown as a logical function of a source pixel <F2>S<F0>
and a destination<SP>pixel <F2>D<F0>.
<ritabhd1,
Left Tab = 0/1.50/2.30/3.50/7.50 inches>
<|,"5<#1e>62"><Tab-><Tab-><Tab-><Tab-><HR>
<Index, "function attribute of graphics context", "logical operation codes"><Index, "graphics context", "attribute", "function", "logical operation codes">Symbol<Tab>Result<HR>
<Tab-><Tab-><Tab-><Tab->
<tbline1>
<F6>boole<#1e>1<F0><Tab><F2>S
<F6>boole<#1e>2<F0><Tab><F2>D
<F6>boole<#1e>andc1<F0><Tab>(logandc1 <F2>S<F0> <F2>D<F0>)
<F6>boole<#1e>andc2 <F0><Tab>(logandc2 <F2>S D<F0>)
<F6>boole<#1e>and<F0><Tab>(logand <F2>S D<F0>)
<F6>boole<#1e>c1<F0><Tab>(lognot <F2> S<F0>)
<F6>boole<#1e>c2<F0><Tab>(lognot <F2>D<F0>)
<F6>boole<#1e>clr <F0><Tab>0
<F6>boole<#1e>eqv<F0><Tab>(logeqv <F2>S D<F0>)
<F6>boole<#1e>ior<F0><Tab>(logior <F2>S D<F0>)
<F6>boole<#1e>nand<F0><Tab>(lognand <F2>S D<F0>)
<F6>boole<#1e>nor<F0><Tab>(lognor <F2>S D<F0>)
<F6>boole<#1e>orc1<F0><Tab>(logorc1 <F2>S D<F0>)
<F6>boole<#1e>orc2<F0><Tab>(logorc2 <F2>S D<F0>)
<F6>boole<#1e>set<F0><Tab>1
<F6>boole<#1e>xor<F0><Tab>(logxor<F2> S D<F0>)
<endrule>
<F6><Tab-><Tab-><Tab-><Tab->
<arg>
gcontext <F3><#1f> A <F6>gcontext<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
gcontext<#1e>id <F2>gcontext<F0><Tab><F3>Function<Index, Doc = operations, "xlib:gcontext<#1e>id", Sort String = "gcontext<#1e>id">
<return>
<Tab><F3>Returns: <F2><HR>
id <F3><#1f> Type <F0>resource<#1e>id<F3>.
<para>
Returns the unique ID that has been assigned to the specified graphics
context.
<arg>
gcontext <F3><#1f> A <F6>gcontext<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
gcontext<#1e>join<#1e>style <F2>gcontext<F0><Tab><F3>Function<F0><Index, "join<#1e>style attribute of graphics context"><Index, "graphics context", "attribute", "join<#1e>style"><Index, Doc = operations, "xlib:gcontext<#1e>join<#1e>style", Sort String = "gcontext<#1e>join<#1e>style">
<return>
<Tab><F3>Returns: <F2><HR>
join<#1e>style <F3><#1f> One of <F0>:bevel<F3>, <F0>:miter<F3>,
or <F0>:round<F3>.
<para>
Returns and (with <F6>setf<F0>) changes the join<#1e>style attribute
of the specified graphics context.
<para,
Bottom Margin = 0.14 inches,
New Page = yes>
<|,"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:
<ritabhd1,
Left Tab = 0/1.30/1.60/3.50/7.50 inches>
<Tab-><Tab-><Tab-><Tab-><HR>
Join<#1e>Style<Tab><Tab>Interpretation<HR>
<Tab-><Tab-><Tab-><Tab->
<tbline1a>
<F6>:bevel<F0><Tab>Uses <F6>:butt<F0> end point styles with the
triangular notch filled.<HR>
<F6>:miter<F0><Tab>The outer edges of two lines extend to meet at
an angle.<HR>
<F6>:round<F0><Tab>A circular arc with diameter equal to the line<#1e>width,
centered on the join point.
<endrule,
Bottom Margin = 0.14 inches>
<Tab-><Tab-><Tab-><Tab->
<para,
Bottom Margin = 0.14 inches>
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.
<arg>
gcontext <F3><#1f> A <F6>gcontext<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
gcontext<#1e>line<#1e>style <F2>gcontext<F0><Tab><F3>Function<F0><Index, "line<#1e>style attribute of graphics context"><Index, "graphics context", "attribute", "line<#1e>style"><Index, Doc = operations, "xlib:gcontext<#1e>line<#1e>style", Sort String = "gcontext<#1e>line<#1e>style">
<return>
<Tab><F3>Returns: <F2><HR>
line<#1e>style <F3><#1f> One of <F0>:dash<F3>, <F0>:double<#1e>dash<F3>,
or <F0>:solid<F3>.
<para>
Returns and (with <F6>setf<F0>) 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:
<ritabhd1,
Left Tab = 0/1.30/1.60/3.50/7.50 inches>
<Tab-><Tab-><Tab-><Tab-><HR>
Line<#1e>Style<Tab><Tab>Meaning<HR>
<Tab-><Tab-><Tab-><Tab->
<tbline1,
Left Margin = 3.20 inches,
First Indent = -1.60 inches,
Left Tab = 0/1.30/2.30/3.50/7.50 inches>
<F6>:solid<F0><Tab>The full path is drawn.<HR>
<F6>:double<#1e>dash<F0><Tab>The full path is drawn, but the even
dashes are filled differently than the odd dashes. The <F6>:butt <F0>style
is used where even and odd dashes meet (see paragraph 5.4.7, Fill<#1e>Rule
and Fill<#1e>Style).<HR>
<F6>:on<#1e>off<#1e>dash<F0><Tab>Only the even dashes are drawn,
with cap<#1e>style applied to all internal ends of the individual
dashes, except <F6>:not<#1e>last<F0> is treated as <F6>:butt<F0>.
<endrule>
<Tab-><Tab-><Tab-><Tab->
<arg>
gcontext <F3><#1f> A <F6>gcontext<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
gcontext<#1e>line<#1e>width<F2> gcontext<F0><Tab><F3>Function<F0><Index, "line<#1e>width attribute of graphics context"><Index, "graphics context", "attribute", "line<#1e>width"><Index, Doc = operations, "xlib:gcontext<#1e>line<#1e>width", Sort String = "gcontext<#1e>line<#1e>width">
<return>
<Tab><F3>Returns: <F2><HR>
line<#1e>width <F3><#1f> Type <F0>card16<F3>.
<para>
Returns the <F2>line<#1e>width<F0> 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*<F2>sin<F0>/2), y1 + (w*<F2>cos<F0>/2)], [x1+ (w*<F2>sin<F0>/2)
,<F2> <F0>y1 - (w*<F2>cos<F0>/2)],<HR>
[x2 - (w*<F2>sin<F0>/2), y2 + (w*<F2>cos<F0>/2)], [x2 + (w*<F2>sin<F0>/2)
,<F2> <F0>y2 - (w*<F2>cos<F0>/2)]
where <F2>sin<F0> is the sine of the angle of the line and <F2>cos <F0>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.
<item>
<Autonum, item, 1, Restart = Yes><Tab>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.
<Autonum, item, 1><Tab>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.
<para>
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.
<arg>
gcontext <F3><#1f> A <F6>gcontext<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
gcontext<#1e>p <F2>gcontext<F0><Tab><F3>Function<Index, Doc = operations, "xlib:gcontext<#1e>p", Sort String = "gcontext<#1e>p">
<return>
<Tab><F3>Returns: <F2><HR>
gcontext <F3><#1f> Type <F0>boolean<F3>.
<para>
Returns non<#1e><F6>nil<F0> if the argument is a graphics context
and <F6>nil<F0> otherwise.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
gcontext<#1e>plane<#1e>mask<F2> gcontext<F0><Tab><F3>Function<F0><Index, "plane<#1e>mask attribute of graphics context"><Index, "graphics context", "attribute", "plane<#1e>mask"><Index, Doc = operations, "xlib:gcontext<#1e>plane<#1e>mask", Sort String = "gcontext<#1e>plane<#1e>mask">
<return>
<Tab><F3>Returns: <F2><HR>
plane<#1e>mask <F3><#1f> Type <F0>card32<F3>.
<para>
Returns the <F2>plane<#1e>mask<F0> of the specified graphics context.
<|,"5<#1e>65">The plane<#1e>mask attribute of a graphics context specifies
which bit<SP>planes 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 on<SP>both the function and plane<#1e>mask attributes
of the graphics context and<SP>is given by the following expression:
<F9>(logior (logand<SP><HR>
(boole function source destination)<HR>
plane<#1e>mask)<HR>
<HR>
(logandc2<HR>
destination<HR>
plane<#1e>mask))
<arg>
gcontext <F3><#1f> A <F6>gcontext<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
gcontext<#1e>plist <F2>gcontext<F0><Tab><F3>Function<Index, Doc = operations, "xlib:gcontext<#1e>plist", Sort String = "gcontext<#1e>plist">
<return>
<Tab><F3>Returns: <F2><HR>
gcontext<#1e>p <F3><#1f> Type <F0>list<F3>.
<para>
Returns and (with <F6>setf<F0>) sets the property list for the specified
<F2>gcontext<F0>. This function provides a hook where extensions
can add data.
<arg>
gcontext <F3><#1f> A <F6>gcontext<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
gcontext<#1e>stipple<F2> gcontext<F0><Tab><F3>Function<F0><Index, "stipple", "attribute of graphics context"><Index, "graphics context", "attribute", "stipple"><Index, Doc = operations, "xlib:gcontext<#1e>stipple", Sort String = "gcontext<#1e>stipple">
<return>
<Tab><F3>Returns: <F2><HR>
stipple <F3><#1f> Type <F0>pixmap<F3>.
<para>
Returns the <F2>stipple<F0> 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 <F6>:stippled<F0> (but not <F6>:opaqu
e<#1e>stippled<F0>), the stipple pattern is tiled in a single plane
and acts as an additional clip mask to be <F6>and<F0>ed 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 <F6>query<#1e>best<#1e>stipple<F0> and <F6>query<#1e>be
st<#1e>tile<F0>).
<arg>
gcontext <F3><#1f> A <F6>gcontext<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
<|,"5<#1e>66">gcontext<#1e>subwindow<#1e>mode <F2>gcontext<F0><Tab><F3>Function
<F0><Index, "subwindow<#1e>mode attribute of graphics context"><Index, "graphics context", "attribute", "subwindow<#1e>mode"><Index, Doc = operations, "xlib:gcontext<#1e>subwindow<#1e>mode", Sort String = "gcontext<#1e>subwindow<#1e>mode">
<return>
<Tab><F3>Returns: <F2><HR>
subwindow<#1e>mode <F3><#1f> One of <F0>:clip<#1e>by<#1e>children<F3>
or <F0>:include<#1e>inferiors<F3>.
<para>
Returns and (with <F6>setf<F0>) 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 <F6>:clip<#1e>by<#1e>children<F0>, both
source and destination windows are clipped by all viewable <F6>:input<#1e>outp
ut<F0> class children. This clipping is in addition to the clipping
provided by the clip<#1e>mode attribute. For a value of <F6>:include<#1e>infer
iors<F0>, 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 <F6>:include<#1e>inferiors<F0> 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.
<arg>
gcontext <F3><#1f> A <F6>gcontext<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
gcontext<#1e>tile<F2> gcontext<F0><Tab><F3>Function<F0><Index, "tile", "attribute of graphics context"><Index, "graphics context", "attribute", "tile"><Index, Doc = operations, "xlib:gcontext<#1e>tile", Sort String = "gcontext<#1e>tile">
<return>
<Tab><F3>Returns: <F2><HR>
tile <F3><#1f> Type <F0>pixmap<F3>.
<para>
Returns the <F2>tile<F0> 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 <F6>:stippled<F0> (but not <F6>:opaqu
e<#1e>stippled<F0>), the stipple pattern is tiled in a single plane
and acts as an additional clip mask to be <F6>and<F0>ed 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 <F6>query<#1e>best<#1e>stipple<F0> and <F6>query<#1e>be
st<#1e>tile<F0>).
<arg>
gcontext <F3><#1f> A <F6>gcontext<F3>.
<syntax,
Bottom Margin = 0 inches,
New Page = yes,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
<|,"5<#1e>67">gcontext<#1e>ts<#1e>x<F2> gcontext<F0><Tab><F3>Function<F0><Index, "ts<#1e>x attribute of graphics context"><Index, "graphics context", "attribute", "ts<#1e>x"><Index, Doc = operations, "xlib:gcontext<#1e>ts<#1e>x", Sort String = "gcontext<#1e>ts<#1e>x">
<return>
<Tab><F3>Returns: <F2><HR>
ts<#1e>x <F3><#1f> Type <F0>int16<F3>.
<para>
Returns the <F2>ts<#1e>x<F0> 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.
<arg>
gcontext <F3><#1f> A <F6>gcontext<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
gcontext<#1e>ts<#1e>y<F2> gcontext<F0><Tab><F3>Function<F0><Index, "ts<#1e>y attribute of graphics context"><Index, "graphics context", "attribute", "ts<#1e>y"><Index, Doc = operations, "xlib:gcontext<#1e>ts<#1e>y", Sort String = "gcontext<#1e>ts<#1e>y">
<return>
<Tab><F3>Returns: <F2><HR>
ts<#1e>y <F3><#1f> Type <F0>int16<F3>.
<para>
Returns the <F2>ts<#1e>y<F0> 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.
<arg>
gcontext <F3><#1f> A <F6>gcontext<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
query<#1e>best<#1e>stipple<F3> <F2>width height drawable<F0><Tab><F3>Functi
on<F0><Index, "stipple", "best, graphics context"><Index, "graphics context", "attribute", "stipple", "best"><Index, Doc = operations, "xlib:query<#1e>best<#1e>stipple", Sort String = "query<#1e>best<#1e>stipple">
<return>
<Tab><F3>Returns: <F2><HR>
best<#1e>width<F3>,<F2> best<#1e>height <F3><#1f> Type <F0>card16<F3>.
<para>
Returns the <F2>best<#1e>width<F0> and <F2>best<#1e>height<F0>
for stipple pixmaps on the <F2>drawable<F0>.
The <F2>drawable<F0> indicates the screen and possibly the window
class and depth. An <F6>:input<#1e>only<F0> window cannot be specified
as the <F2>drawable<F0>. The size is returned as width and height
values.
<arg>
width<F3>, <F0>height <F3><#1f> Specifies the width and height
of the desired stipple pattern.
drawable <F3><#1f> A <F6>drawable<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
query<#1e>best<#1e>tile<F3> <F2>width height drawable<F0><Tab><F3>Function
<F0><Index, "tile", "best, graphics context"><Index, "graphics context", "attribute", "tile", "best"><Index, Doc = operations, "xlib:query<#1e>best<#1e>tile", Sort String = "query<#1e>best<#1e>tile">
<return>
<Tab><F3>Returns: <F2><HR>
best<#1e>width<F3>,<F2> best<#1e>height <F3><#1f> Type <F0>card16<F3>.
<para>
Returns the <F2>best<#1e>width<F0> and <F2>best<#1e>height<F0>
for tile pixmaps on the <F2>drawable<F0>.
The <F2>drawable<F0> indicates the screen and possibly the window
class and depth. An <F6>:input<#1e>only<F0> window cannot be specified
as the <F2>drawable<F0>. The size is returned as width and height
values.
<arg>
width<F3>, <F0>height <F3><#1f> Specifies the width and height
of the desired tile pattern.
drawable <F3><#1f> A <F6>drawable<F3>.
<p1rule>
<Index, "graphics context", "copying">
<Frame,
Name = p1rule,
Placement = At Anchor,
Width = 6.35 inches,
Height = 0.153 inches,
Vertical Alignment = 0.007 inches,
Shared Contents = yes>
<p1stacked,
Font = F3,
Left Tab = -1.70/0 inches>
<F7>Copying <Tab><F6>5.3<F0><#04>CLX provides functions to copy
some or all attribute values from<FJ>
<p1stacked,
Left Tab = -1.60/0 inches>
<F7>Graphics<F0><Tab><F3>one graphics context to another. These
functions are generally more efficient<FJ>
<p1para,
Alignment = Both,
Font = F3,
Allow Page Break After = yes>
<F7>Contexts <Tab><F0>than using <F6>setf<F0> to copy <F6>gcontext<F0>
attributes individually.
<syntax,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
copy<#1e>gcontext<F3> <F2>source destination<F0><Tab><F3>Function<Index, Doc = operations, "xlib:copy<#1e>gcontext", Sort String = "copy<#1e>gcontext">
<para>
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.
<arg>
<F3> <F0>source <F3><#1f> The source <F6>gcontext<F3>.
<|,"5<#1e>68">destination <F3><#1f> The destination <F6>gcontext<F3>.
<syntax,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
copy<#1e>gcontext<#1e>components<F3> <F2>source destination <F3>&rest <F2>k
eys<F0><Tab><F3>Function<Index, Doc = operations, "xlib:copy<#1e>gcontext<#1e>components", Sort String = "copy<#1e>gcontext<#1e>components">
<para,
Bottom Margin = 0.12 inches>
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.
<arg>
source <F3><#1f> The source <F6>gcontext<F3>.
destination <F3><#1f> The destination <F6>gcontext<F3>.
keys <F3><#1f> The remaining arguments are keywords, of type <F6>gcontext<#1e>
key<F3>, which specify which attributes of the graphics context are
to be copied.
<p1rule>
<Index, "graphics context", "destroying">
<Frame,
Name = p1rule,
Placement = At Anchor,
Width = 6.35 inches,
Height = 0.153 inches,
Vertical Alignment = 0.007 inches,
Shared Contents = yes>
<p1stacked,
Font = F3,
Left Tab = -1.70/0 inches>
<F7>Destroying<Tab><F6>5.5<#04><F0>To destroy a graphics context,
use<F6> free<#1e>gcontext.
<p1stacked,
Left Tab = -1.60/0 inches>
<F7>Graphics<F0><Tab>
<p1para,
Bottom Margin = 0.05 inches,
Alignment = Both,
Font = F3,
Allow Page Break After = yes>
<F7>Contexts <F0><Tab>
<syntax,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
free<#1e>gcontext <F2>gcontext<F0><Tab><F3>Function<Index, Doc = operations, "xlib:free<#1e>gcontext", Sort String = "free<#1e>gcontext">
<para,
Bottom Margin = 0.12 inches>
Deletes the association between the assigned resource ID and the specified
graphics context, and then destroys the graphics context.
<arg>
gcontext <F3><#1f> A <F6>gcontext<F3>.
<p1rule>
<Index, "graphics context", "cache">
<Frame,
Name = p1rule,
Placement = At Anchor,
Width = 6.35 inches,
Height = 0.153 inches,
Vertical Alignment = 0.007 inches,
Shared Contents = yes>
<p1stacked,
Font = F3,
Left Tab = -1.70/0 inches>
<F7>Graphics<Tab><F6>5.6<F0><#04>CLX provides a set of functions
to control the automatic graphics<FJ>
<p1stacked,
Left Tab = -1.60/0 inches>
<F7>Context<F0><Tab><F3>context caching mechanism.
<p1para,
Bottom Margin = 0.05 inches,
Alignment = Both,
Font = F3,
Allow Page Break After = yes>
<F7>Cache<Tab>
<syntax,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
force<#1e>gcontext<#1e>changes<F3> <F2>gcontext<F0><Tab><F3>Function<Index, Doc = operations, "xlib:force<#1e>gcontext<#1e>changes", Sort String = "force<#1e>gcontext<#1e>changes">
<para,
Bottom Margin = 0.12 inches>
Forces any delayed changes to the specified graphics context to be
sent out to the server. Note that <F6>force<#1e>gcontext<#1e>changes<F0>
is called by all of the graphics functions.
<arg>
gcontext <F3><#1f> A <F6>gcontext<F3>.
<syntax,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
with<#1e>gcontext<F3> <F2>gcontext<F0> <F3>&key<F0> :arc<#1e>mode
:background :cap<#1e>style :clip<#1e>mask<Tab><F3>Macro<Index, Doc = operations, "xlib:with<#1e>gcontext", Sort String = "with<#1e>gcontext"><HR>
<F0>:clip<#1e>ordering :clip<#1e>x :clip<#1e>y :dashes :dash<#1e>offset
:exposures <HR>
:fill<#1e>rule :fill<#1e>style :font :foreground :function :join<#1e>style <HR>
:line<#1e>style :line<#1e>width :plane<#1e>mask :stipple :subwindow<#1e>mode <HR>
:tile :ts<#1e>x :ts<#1e>y<F3> &allow<#1e>other<#1e>keys &body <F2>body
<para,
Bottom Margin = 0.12 inches>
Changes the indicated graphics context components to the specified
values only within the dynamic extent of the body. <F6>with<#1e>gcontext<F0>
works on a per<#1e>process basis in a multiprocessing environment.
The <F2>body<F0> is not surrounded by a <F6>with<#1e>display<F0>
form. If there is no local cache for the specified graphics context,
or if some of the component states are unknown, <F6>with<#1e>gcontext<F0>
does the save and restore by creating a temporary graphics context
and copying components to and from it using <F6>copy<#1e>gcontext<#1e>componen
ts<F0>.
<arg>
gcontext <F3><#1f> A <F6>gcontext<F3>.
<F6>:arc<#1e>mode,<F3> <F6>:background<F3>, <F6>:cap<#1e>style<F3>,
<F6>:clip<#1e>mask<F3>, <F6>:clip<#1e>ordering<F3>, <F6>:clip<#1e>x<F3>,
<F6>:clip<#1e>y<F3>, <F6>:dashes<F3>, <F6>:dash<#1e>offset<F3>, <F6>:exp
osures<F3>, <F6>:fill<#1e>rule<F3>, <F6>:fill<#1e>style<F3>, <F6>:font
<F3>, <F6>:foreground<F3>, <F6>:function<F3>, <F6>:join<#1e>style<F3>,
<F6>:line<#1e>style<F3>, <F6>:line<#1e>width<F3>, <F6>:plane<#1e>mask
<F3>, <F6>:stipple<F3>, <F6>:subwindow<#1e>mode<F3>, <F6>:tile<F3>,
<F6>:ts<#1e>x<F3>, <F6>:ts<#1e>y <F3><#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 <F3><#1f> The body of code which will have access to the altered
graphics context.
<para>