Mercurial > repos > rliterman > csp2
comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/gtk-doc/html/cairo/cairo-Quartz-Surfaces.html @ 68:5028fdace37b
planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author | jpayne |
---|---|
date | Tue, 18 Mar 2025 16:23:26 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
67:0e9998148a16 | 68:5028fdace37b |
---|---|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
2 <html> | |
3 <head> | |
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
5 <title>Quartz Surfaces: Cairo: A Vector Graphics Library</title> | |
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> | |
7 <link rel="home" href="index.html" title="Cairo: A Vector Graphics Library"> | |
8 <link rel="up" href="cairo-surfaces.html" title="Surfaces"> | |
9 <link rel="prev" href="cairo-SVG-Surfaces.html" title="SVG Surfaces"> | |
10 <link rel="next" href="cairo-XCB-Surfaces.html" title="XCB Surfaces"> | |
11 <meta name="generator" content="GTK-Doc V1.27 (XML mode)"> | |
12 <link rel="stylesheet" href="style.css" type="text/css"> | |
13 </head> | |
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> | |
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> | |
16 <td width="100%" align="left" class="shortcuts"> | |
17 <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> | |
18 <a href="#cairo-Quartz-Surfaces.description" class="shortcut">Description</a></span> | |
19 </td> | |
20 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> | |
21 <td><a accesskey="u" href="cairo-surfaces.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> | |
22 <td><a accesskey="p" href="cairo-SVG-Surfaces.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> | |
23 <td><a accesskey="n" href="cairo-XCB-Surfaces.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> | |
24 </tr></table> | |
25 <div class="refentry"> | |
26 <a name="cairo-Quartz-Surfaces"></a><div class="titlepage"></div> | |
27 <div class="refnamediv"><table width="100%"><tr> | |
28 <td valign="top"> | |
29 <h2><span class="refentrytitle"><a name="cairo-Quartz-Surfaces.top_of_page"></a>Quartz Surfaces</span></h2> | |
30 <p>Quartz Surfaces — Rendering to Quartz surfaces</p> | |
31 </td> | |
32 <td class="gallery_image" valign="top" align="right"></td> | |
33 </tr></table></div> | |
34 <div class="refsect1"> | |
35 <a name="cairo-Quartz-Surfaces.functions"></a><h2>Functions</h2> | |
36 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
37 <colgroup> | |
38 <col width="150px" class="functions_return"> | |
39 <col class="functions_name"> | |
40 </colgroup> | |
41 <tbody> | |
42 <tr> | |
43 <td class="function_type"> | |
44 <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> * | |
45 </td> | |
46 <td class="function_name"> | |
47 <a class="link" href="cairo-Quartz-Surfaces.html#cairo-quartz-surface-create" title="cairo_quartz_surface_create ()">cairo_quartz_surface_create</a> <span class="c_punctuation">()</span> | |
48 </td> | |
49 </tr> | |
50 <tr> | |
51 <td class="function_type"> | |
52 <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> * | |
53 </td> | |
54 <td class="function_name"> | |
55 <a class="link" href="cairo-Quartz-Surfaces.html#cairo-quartz-surface-create-for-cg-context" title="cairo_quartz_surface_create_for_cg_context ()">cairo_quartz_surface_create_for_cg_context</a> <span class="c_punctuation">()</span> | |
56 </td> | |
57 </tr> | |
58 <tr> | |
59 <td class="function_type"> | |
60 <span class="returnvalue">CGContextRef</span> | |
61 </td> | |
62 <td class="function_name"> | |
63 <a class="link" href="cairo-Quartz-Surfaces.html#cairo-quartz-surface-get-cg-context" title="cairo_quartz_surface_get_cg_context ()">cairo_quartz_surface_get_cg_context</a> <span class="c_punctuation">()</span> | |
64 </td> | |
65 </tr> | |
66 </tbody> | |
67 </table></div> | |
68 </div> | |
69 <div class="refsect1"> | |
70 <a name="cairo-Quartz-Surfaces.other"></a><h2>Types and Values</h2> | |
71 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
72 <colgroup> | |
73 <col width="150px" class="name"> | |
74 <col class="description"> | |
75 </colgroup> | |
76 <tbody><tr> | |
77 <td class="define_keyword">#define</td> | |
78 <td class="function_name"><a class="link" href="cairo-Quartz-Surfaces.html#CAIRO-HAS-QUARTZ-SURFACE:CAPS" title="CAIRO_HAS_QUARTZ_SURFACE">CAIRO_HAS_QUARTZ_SURFACE</a></td> | |
79 </tr></tbody> | |
80 </table></div> | |
81 </div> | |
82 <div class="refsect1"> | |
83 <a name="cairo-Quartz-Surfaces.description"></a><h2>Description</h2> | |
84 <p>The Quartz surface is used to render cairo graphics targeting the | |
85 Apple OS X Quartz rendering system.</p> | |
86 </div> | |
87 <div class="refsect1"> | |
88 <a name="cairo-Quartz-Surfaces.functions_details"></a><h2>Functions</h2> | |
89 <div class="refsect2"> | |
90 <a name="cairo-quartz-surface-create"></a><h3>cairo_quartz_surface_create ()</h3> | |
91 <pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> * | |
92 cairo_quartz_surface_create (<em class="parameter"><code><a class="link" href="cairo-Image-Surfaces.html#cairo-format-t" title="enum cairo_format_t"><span class="type">cairo_format_t</span></a> format</code></em>, | |
93 <em class="parameter"><code>unsigned <span class="type">int</span> width</code></em>, | |
94 <em class="parameter"><code>unsigned <span class="type">int</span> height</code></em>);</pre> | |
95 <p>Creates a Quartz surface backed by a CGBitmap. The surface is | |
96 created using the Device RGB (or Device Gray, for A8) color space. | |
97 All Cairo operations, including those that require software | |
98 rendering, will succeed on this surface.</p> | |
99 <div class="refsect3"> | |
100 <a name="cairo-quartz-surface-create.parameters"></a><h4>Parameters</h4> | |
101 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
102 <colgroup> | |
103 <col width="150px" class="parameters_name"> | |
104 <col class="parameters_description"> | |
105 <col width="200px" class="parameters_annotations"> | |
106 </colgroup> | |
107 <tbody> | |
108 <tr> | |
109 <td class="parameter_name"><p>format</p></td> | |
110 <td class="parameter_description"><p>format of pixels in the surface to create</p></td> | |
111 <td class="parameter_annotations"> </td> | |
112 </tr> | |
113 <tr> | |
114 <td class="parameter_name"><p>width</p></td> | |
115 <td class="parameter_description"><p>width of the surface, in pixels</p></td> | |
116 <td class="parameter_annotations"> </td> | |
117 </tr> | |
118 <tr> | |
119 <td class="parameter_name"><p>height</p></td> | |
120 <td class="parameter_description"><p>height of the surface, in pixels</p></td> | |
121 <td class="parameter_annotations"> </td> | |
122 </tr> | |
123 </tbody> | |
124 </table></div> | |
125 </div> | |
126 <div class="refsect3"> | |
127 <a name="cairo-quartz-surface-create.returns"></a><h4>Returns</h4> | |
128 <p> the newly created surface.</p> | |
129 </div> | |
130 <p class="since">Since: 1.6</p> | |
131 </div> | |
132 <hr> | |
133 <div class="refsect2"> | |
134 <a name="cairo-quartz-surface-create-for-cg-context"></a><h3>cairo_quartz_surface_create_for_cg_context ()</h3> | |
135 <pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> * | |
136 cairo_quartz_surface_create_for_cg_context | |
137 (<em class="parameter"><code><span class="type">CGContextRef</span> cgContext</code></em>, | |
138 <em class="parameter"><code>unsigned <span class="type">int</span> width</code></em>, | |
139 <em class="parameter"><code>unsigned <span class="type">int</span> height</code></em>);</pre> | |
140 <p>Creates a Quartz surface that wraps the given CGContext. The | |
141 CGContext is assumed to be in the standard Cairo coordinate space | |
142 (that is, with the origin at the upper left and the Y axis | |
143 increasing downward). If the CGContext is in the Quartz coordinate | |
144 space (with the origin at the bottom left), then it should be | |
145 flipped before this function is called. The flip can be accomplished | |
146 using a translate and a scale; for example:</p> | |
147 <div class="informalexample"> | |
148 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> | |
149 <tbody> | |
150 <tr> | |
151 <td class="listing_lines" align="right"><pre>1 | |
152 2</pre></td> | |
153 <td class="listing_code"><pre class="programlisting"><span class="function">CGContextTranslateCTM</span> <span class="gtkdoc opt">(</span>cgContext<span class="gtkdoc opt">,</span> <span class="number">0.0</span><span class="gtkdoc opt">,</span> height<span class="gtkdoc opt">);</span> | |
154 <span class="function">CGContextScaleCTM</span> <span class="gtkdoc opt">(</span>cgContext<span class="gtkdoc opt">,</span> <span class="number">1.0</span><span class="gtkdoc opt">, -</span><span class="number">1.0</span><span class="gtkdoc opt">);</span></pre></td> | |
155 </tr> | |
156 </tbody> | |
157 </table> | |
158 </div> | |
159 | |
160 <p>All Cairo operations are implemented in terms of Quartz operations, | |
161 as long as Quartz-compatible elements are used (such as Quartz fonts).</p> | |
162 <div class="refsect3"> | |
163 <a name="cairo-quartz-surface-create-for-cg-context.parameters"></a><h4>Parameters</h4> | |
164 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
165 <colgroup> | |
166 <col width="150px" class="parameters_name"> | |
167 <col class="parameters_description"> | |
168 <col width="200px" class="parameters_annotations"> | |
169 </colgroup> | |
170 <tbody> | |
171 <tr> | |
172 <td class="parameter_name"><p>cgContext</p></td> | |
173 <td class="parameter_description"><p>the existing CGContext for which to create the surface</p></td> | |
174 <td class="parameter_annotations"> </td> | |
175 </tr> | |
176 <tr> | |
177 <td class="parameter_name"><p>width</p></td> | |
178 <td class="parameter_description"><p>width of the surface, in pixels</p></td> | |
179 <td class="parameter_annotations"> </td> | |
180 </tr> | |
181 <tr> | |
182 <td class="parameter_name"><p>height</p></td> | |
183 <td class="parameter_description"><p>height of the surface, in pixels</p></td> | |
184 <td class="parameter_annotations"> </td> | |
185 </tr> | |
186 </tbody> | |
187 </table></div> | |
188 </div> | |
189 <div class="refsect3"> | |
190 <a name="cairo-quartz-surface-create-for-cg-context.returns"></a><h4>Returns</h4> | |
191 <p> the newly created Cairo surface.</p> | |
192 </div> | |
193 <p class="since">Since: 1.6</p> | |
194 </div> | |
195 <hr> | |
196 <div class="refsect2"> | |
197 <a name="cairo-quartz-surface-get-cg-context"></a><h3>cairo_quartz_surface_get_cg_context ()</h3> | |
198 <pre class="programlisting"><span class="returnvalue">CGContextRef</span> | |
199 cairo_quartz_surface_get_cg_context (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);</pre> | |
200 <p>Returns the CGContextRef that the given Quartz surface is backed | |
201 by.</p> | |
202 <p>A call to <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-flush" title="cairo_surface_flush ()"><code class="function">cairo_surface_flush()</code></a> is required before using the | |
203 CGContextRef to ensure that all pending drawing operations are | |
204 finished and to restore any temporary modification cairo has made | |
205 to its state. A call to <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-mark-dirty" title="cairo_surface_mark_dirty ()"><code class="function">cairo_surface_mark_dirty()</code></a> is required | |
206 after the state or the content of the CGContextRef has been | |
207 modified.</p> | |
208 <div class="refsect3"> | |
209 <a name="cairo-quartz-surface-get-cg-context.parameters"></a><h4>Parameters</h4> | |
210 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
211 <colgroup> | |
212 <col width="150px" class="parameters_name"> | |
213 <col class="parameters_description"> | |
214 <col width="200px" class="parameters_annotations"> | |
215 </colgroup> | |
216 <tbody><tr> | |
217 <td class="parameter_name"><p>surface</p></td> | |
218 <td class="parameter_description"><p>the Cairo Quartz surface</p></td> | |
219 <td class="parameter_annotations"> </td> | |
220 </tr></tbody> | |
221 </table></div> | |
222 </div> | |
223 <div class="refsect3"> | |
224 <a name="cairo-quartz-surface-get-cg-context.returns"></a><h4>Returns</h4> | |
225 <p> the CGContextRef for the given surface.</p> | |
226 </div> | |
227 <p class="since">Since: 1.6</p> | |
228 </div> | |
229 </div> | |
230 <div class="refsect1"> | |
231 <a name="cairo-Quartz-Surfaces.other_details"></a><h2>Types and Values</h2> | |
232 <div class="refsect2"> | |
233 <a name="CAIRO-HAS-QUARTZ-SURFACE:CAPS"></a><h3>CAIRO_HAS_QUARTZ_SURFACE</h3> | |
234 <pre class="programlisting">#define CAIRO_HAS_QUARTZ_SURFACE 1 | |
235 </pre> | |
236 <p>Defined if the Quartz surface backend is available. | |
237 This macro can be used to conditionally compile backend-specific code.</p> | |
238 <p class="since">Since: 1.6</p> | |
239 </div> | |
240 </div> | |
241 <div class="refsect1"> | |
242 <a name="cairo-Quartz-Surfaces.see-also"></a><h2>See Also</h2> | |
243 <p><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a></p> | |
244 </div> | |
245 </div> | |
246 <div class="footer"> | |
247 <hr>Generated by GTK-Doc V1.27</div> | |
248 </body> | |
249 </html> |