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