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>Win32 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-Recording-Surfaces.html" title="Recording Surfaces">
|
jpayne@68
|
10 <link rel="next" href="cairo-SVG-Surfaces.html" title="SVG 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-Win32-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-Recording-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-SVG-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-Win32-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-Win32-Surfaces.top_of_page"></a>Win32 Surfaces</span></h2>
|
jpayne@68
|
30 <p>Win32 Surfaces — Microsoft Windows surface support</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-Win32-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-Win32-Surfaces.html#cairo-win32-surface-create" title="cairo_win32_surface_create ()">cairo_win32_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-Win32-Surfaces.html#cairo-win32-surface-create-with-dib" title="cairo_win32_surface_create_with_dib ()">cairo_win32_surface_create_with_dib</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 <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
|
61 </td>
|
jpayne@68
|
62 <td class="function_name">
|
jpayne@68
|
63 <a class="link" href="cairo-Win32-Surfaces.html#cairo-win32-surface-create-with-ddb" title="cairo_win32_surface_create_with_ddb ()">cairo_win32_surface_create_with_ddb</a> <span class="c_punctuation">()</span>
|
jpayne@68
|
64 </td>
|
jpayne@68
|
65 </tr>
|
jpayne@68
|
66 <tr>
|
jpayne@68
|
67 <td class="function_type">
|
jpayne@68
|
68 <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
|
69 </td>
|
jpayne@68
|
70 <td class="function_name">
|
jpayne@68
|
71 <a class="link" href="cairo-Win32-Surfaces.html#cairo-win32-surface-create-with-format" title="cairo_win32_surface_create_with_format ()">cairo_win32_surface_create_with_format</a> <span class="c_punctuation">()</span>
|
jpayne@68
|
72 </td>
|
jpayne@68
|
73 </tr>
|
jpayne@68
|
74 <tr>
|
jpayne@68
|
75 <td class="function_type">
|
jpayne@68
|
76 <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
|
77 </td>
|
jpayne@68
|
78 <td class="function_name">
|
jpayne@68
|
79 <a class="link" href="cairo-Win32-Surfaces.html#cairo-win32-printing-surface-create" title="cairo_win32_printing_surface_create ()">cairo_win32_printing_surface_create</a> <span class="c_punctuation">()</span>
|
jpayne@68
|
80 </td>
|
jpayne@68
|
81 </tr>
|
jpayne@68
|
82 <tr>
|
jpayne@68
|
83 <td class="function_type">
|
jpayne@68
|
84 <span class="returnvalue">HDC</span>
|
jpayne@68
|
85 </td>
|
jpayne@68
|
86 <td class="function_name">
|
jpayne@68
|
87 <a class="link" href="cairo-Win32-Surfaces.html#cairo-win32-surface-get-dc" title="cairo_win32_surface_get_dc ()">cairo_win32_surface_get_dc</a> <span class="c_punctuation">()</span>
|
jpayne@68
|
88 </td>
|
jpayne@68
|
89 </tr>
|
jpayne@68
|
90 <tr>
|
jpayne@68
|
91 <td class="function_type">
|
jpayne@68
|
92 <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
|
93 </td>
|
jpayne@68
|
94 <td class="function_name">
|
jpayne@68
|
95 <a class="link" href="cairo-Win32-Surfaces.html#cairo-win32-surface-get-image" title="cairo_win32_surface_get_image ()">cairo_win32_surface_get_image</a> <span class="c_punctuation">()</span>
|
jpayne@68
|
96 </td>
|
jpayne@68
|
97 </tr>
|
jpayne@68
|
98 </tbody>
|
jpayne@68
|
99 </table></div>
|
jpayne@68
|
100 </div>
|
jpayne@68
|
101 <div class="refsect1">
|
jpayne@68
|
102 <a name="cairo-Win32-Surfaces.other"></a><h2>Types and Values</h2>
|
jpayne@68
|
103 <div class="informaltable"><table class="informaltable" width="100%" border="0">
|
jpayne@68
|
104 <colgroup>
|
jpayne@68
|
105 <col width="150px" class="name">
|
jpayne@68
|
106 <col class="description">
|
jpayne@68
|
107 </colgroup>
|
jpayne@68
|
108 <tbody><tr>
|
jpayne@68
|
109 <td class="define_keyword">#define</td>
|
jpayne@68
|
110 <td class="function_name"><a class="link" href="cairo-Win32-Surfaces.html#CAIRO-HAS-WIN32-SURFACE:CAPS" title="CAIRO_HAS_WIN32_SURFACE">CAIRO_HAS_WIN32_SURFACE</a></td>
|
jpayne@68
|
111 </tr></tbody>
|
jpayne@68
|
112 </table></div>
|
jpayne@68
|
113 </div>
|
jpayne@68
|
114 <div class="refsect1">
|
jpayne@68
|
115 <a name="cairo-Win32-Surfaces.description"></a><h2>Description</h2>
|
jpayne@68
|
116 <p>The Microsoft Windows surface is used to render cairo graphics to
|
jpayne@68
|
117 Microsoft Windows windows, bitmaps, and printing device contexts.</p>
|
jpayne@68
|
118 <p>The surface returned by <a class="link" href="cairo-Win32-Surfaces.html#cairo-win32-printing-surface-create" title="cairo_win32_printing_surface_create ()"><code class="function">cairo_win32_printing_surface_create()</code></a> is of surface
|
jpayne@68
|
119 type <a class="link" href="cairo-cairo-surface-t.html#CAIRO-SURFACE-TYPE-WIN32-PRINTING:CAPS"><code class="literal">CAIRO_SURFACE_TYPE_WIN32_PRINTING</code></a> and is a multi-page vector surface
|
jpayne@68
|
120 type.</p>
|
jpayne@68
|
121 <p>The surface returned by the other win32 constructors is of surface type
|
jpayne@68
|
122 <a class="link" href="cairo-cairo-surface-t.html#CAIRO-SURFACE-TYPE-WIN32:CAPS"><code class="literal">CAIRO_SURFACE_TYPE_WIN32</code></a> and is a raster surface type.</p>
|
jpayne@68
|
123 </div>
|
jpayne@68
|
124 <div class="refsect1">
|
jpayne@68
|
125 <a name="cairo-Win32-Surfaces.functions_details"></a><h2>Functions</h2>
|
jpayne@68
|
126 <div class="refsect2">
|
jpayne@68
|
127 <a name="cairo-win32-surface-create"></a><h3>cairo_win32_surface_create ()</h3>
|
jpayne@68
|
128 <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
|
129 cairo_win32_surface_create (<em class="parameter"><code><span class="type">HDC</span> hdc</code></em>);</pre>
|
jpayne@68
|
130 <p>Creates a cairo surface that targets the given DC. The DC will be
|
jpayne@68
|
131 queried for its initial clip extents, and this will be used as the
|
jpayne@68
|
132 size of the cairo surface. The resulting surface will always be of
|
jpayne@68
|
133 format <a class="link" href="cairo-Image-Surfaces.html#CAIRO-FORMAT-RGB24:CAPS"><code class="literal">CAIRO_FORMAT_RGB24</code></a>; should you need another surface format,
|
jpayne@68
|
134 you will need to create one through
|
jpayne@68
|
135 <a class="link" href="cairo-Win32-Surfaces.html#cairo-win32-surface-create-with-format" title="cairo_win32_surface_create_with_format ()"><code class="function">cairo_win32_surface_create_with_format()</code></a> or
|
jpayne@68
|
136 <a class="link" href="cairo-Win32-Surfaces.html#cairo-win32-surface-create-with-dib" title="cairo_win32_surface_create_with_dib ()"><code class="function">cairo_win32_surface_create_with_dib()</code></a>.</p>
|
jpayne@68
|
137 <div class="refsect3">
|
jpayne@68
|
138 <a name="cairo-win32-surface-create.parameters"></a><h4>Parameters</h4>
|
jpayne@68
|
139 <div class="informaltable"><table class="informaltable" width="100%" border="0">
|
jpayne@68
|
140 <colgroup>
|
jpayne@68
|
141 <col width="150px" class="parameters_name">
|
jpayne@68
|
142 <col class="parameters_description">
|
jpayne@68
|
143 <col width="200px" class="parameters_annotations">
|
jpayne@68
|
144 </colgroup>
|
jpayne@68
|
145 <tbody><tr>
|
jpayne@68
|
146 <td class="parameter_name"><p>hdc</p></td>
|
jpayne@68
|
147 <td class="parameter_description"><p>the DC to create a surface for</p></td>
|
jpayne@68
|
148 <td class="parameter_annotations"> </td>
|
jpayne@68
|
149 </tr></tbody>
|
jpayne@68
|
150 </table></div>
|
jpayne@68
|
151 </div>
|
jpayne@68
|
152 <div class="refsect3">
|
jpayne@68
|
153 <a name="cairo-win32-surface-create.returns"></a><h4>Returns</h4>
|
jpayne@68
|
154 <p> the newly created surface, NULL on failure</p>
|
jpayne@68
|
155 </div>
|
jpayne@68
|
156 <p class="since">Since: 1.0</p>
|
jpayne@68
|
157 </div>
|
jpayne@68
|
158 <hr>
|
jpayne@68
|
159 <div class="refsect2">
|
jpayne@68
|
160 <a name="cairo-win32-surface-create-with-dib"></a><h3>cairo_win32_surface_create_with_dib ()</h3>
|
jpayne@68
|
161 <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
|
162 cairo_win32_surface_create_with_dib (<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
|
163 <em class="parameter"><code><span class="type">int</span> width</code></em>,
|
jpayne@68
|
164 <em class="parameter"><code><span class="type">int</span> height</code></em>);</pre>
|
jpayne@68
|
165 <p>Creates a device-independent-bitmap surface not associated with
|
jpayne@68
|
166 any particular existing surface or device context. The created
|
jpayne@68
|
167 bitmap will be uninitialized.</p>
|
jpayne@68
|
168 <div class="refsect3">
|
jpayne@68
|
169 <a name="cairo-win32-surface-create-with-dib.parameters"></a><h4>Parameters</h4>
|
jpayne@68
|
170 <div class="informaltable"><table class="informaltable" width="100%" border="0">
|
jpayne@68
|
171 <colgroup>
|
jpayne@68
|
172 <col width="150px" class="parameters_name">
|
jpayne@68
|
173 <col class="parameters_description">
|
jpayne@68
|
174 <col width="200px" class="parameters_annotations">
|
jpayne@68
|
175 </colgroup>
|
jpayne@68
|
176 <tbody>
|
jpayne@68
|
177 <tr>
|
jpayne@68
|
178 <td class="parameter_name"><p>format</p></td>
|
jpayne@68
|
179 <td class="parameter_description"><p>format of pixels in the surface to create</p></td>
|
jpayne@68
|
180 <td class="parameter_annotations"> </td>
|
jpayne@68
|
181 </tr>
|
jpayne@68
|
182 <tr>
|
jpayne@68
|
183 <td class="parameter_name"><p>width</p></td>
|
jpayne@68
|
184 <td class="parameter_description"><p>width of the surface, in pixels</p></td>
|
jpayne@68
|
185 <td class="parameter_annotations"> </td>
|
jpayne@68
|
186 </tr>
|
jpayne@68
|
187 <tr>
|
jpayne@68
|
188 <td class="parameter_name"><p>height</p></td>
|
jpayne@68
|
189 <td class="parameter_description"><p>height of the surface, in pixels</p></td>
|
jpayne@68
|
190 <td class="parameter_annotations"> </td>
|
jpayne@68
|
191 </tr>
|
jpayne@68
|
192 </tbody>
|
jpayne@68
|
193 </table></div>
|
jpayne@68
|
194 </div>
|
jpayne@68
|
195 <div class="refsect3">
|
jpayne@68
|
196 <a name="cairo-win32-surface-create-with-dib.returns"></a><h4>Returns</h4>
|
jpayne@68
|
197 <p> the newly created surface</p>
|
jpayne@68
|
198 </div>
|
jpayne@68
|
199 <p class="since">Since: 1.2</p>
|
jpayne@68
|
200 </div>
|
jpayne@68
|
201 <hr>
|
jpayne@68
|
202 <div class="refsect2">
|
jpayne@68
|
203 <a name="cairo-win32-surface-create-with-ddb"></a><h3>cairo_win32_surface_create_with_ddb ()</h3>
|
jpayne@68
|
204 <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
|
205 cairo_win32_surface_create_with_ddb (<em class="parameter"><code><span class="type">HDC</span> hdc</code></em>,
|
jpayne@68
|
206 <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
|
207 <em class="parameter"><code><span class="type">int</span> width</code></em>,
|
jpayne@68
|
208 <em class="parameter"><code><span class="type">int</span> height</code></em>);</pre>
|
jpayne@68
|
209 <p>Creates a device-dependent-bitmap surface not associated with
|
jpayne@68
|
210 any particular existing surface or device context. The created
|
jpayne@68
|
211 bitmap will be uninitialized.</p>
|
jpayne@68
|
212 <div class="refsect3">
|
jpayne@68
|
213 <a name="cairo-win32-surface-create-with-ddb.parameters"></a><h4>Parameters</h4>
|
jpayne@68
|
214 <div class="informaltable"><table class="informaltable" width="100%" border="0">
|
jpayne@68
|
215 <colgroup>
|
jpayne@68
|
216 <col width="150px" class="parameters_name">
|
jpayne@68
|
217 <col class="parameters_description">
|
jpayne@68
|
218 <col width="200px" class="parameters_annotations">
|
jpayne@68
|
219 </colgroup>
|
jpayne@68
|
220 <tbody>
|
jpayne@68
|
221 <tr>
|
jpayne@68
|
222 <td class="parameter_name"><p>hdc</p></td>
|
jpayne@68
|
223 <td class="parameter_description"><p>a DC compatible with the surface to create</p></td>
|
jpayne@68
|
224 <td class="parameter_annotations"> </td>
|
jpayne@68
|
225 </tr>
|
jpayne@68
|
226 <tr>
|
jpayne@68
|
227 <td class="parameter_name"><p>format</p></td>
|
jpayne@68
|
228 <td class="parameter_description"><p>format of pixels in the surface to create</p></td>
|
jpayne@68
|
229 <td class="parameter_annotations"> </td>
|
jpayne@68
|
230 </tr>
|
jpayne@68
|
231 <tr>
|
jpayne@68
|
232 <td class="parameter_name"><p>width</p></td>
|
jpayne@68
|
233 <td class="parameter_description"><p>width of the surface, in pixels</p></td>
|
jpayne@68
|
234 <td class="parameter_annotations"> </td>
|
jpayne@68
|
235 </tr>
|
jpayne@68
|
236 <tr>
|
jpayne@68
|
237 <td class="parameter_name"><p>height</p></td>
|
jpayne@68
|
238 <td class="parameter_description"><p>height of the surface, in pixels</p></td>
|
jpayne@68
|
239 <td class="parameter_annotations"> </td>
|
jpayne@68
|
240 </tr>
|
jpayne@68
|
241 </tbody>
|
jpayne@68
|
242 </table></div>
|
jpayne@68
|
243 </div>
|
jpayne@68
|
244 <div class="refsect3">
|
jpayne@68
|
245 <a name="cairo-win32-surface-create-with-ddb.returns"></a><h4>Returns</h4>
|
jpayne@68
|
246 <p> the newly created surface</p>
|
jpayne@68
|
247 </div>
|
jpayne@68
|
248 <p class="since">Since: 1.4</p>
|
jpayne@68
|
249 </div>
|
jpayne@68
|
250 <hr>
|
jpayne@68
|
251 <div class="refsect2">
|
jpayne@68
|
252 <a name="cairo-win32-surface-create-with-format"></a><h3>cairo_win32_surface_create_with_format ()</h3>
|
jpayne@68
|
253 <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
|
254 cairo_win32_surface_create_with_format
|
jpayne@68
|
255 (<em class="parameter"><code><span class="type">HDC</span> hdc</code></em>,
|
jpayne@68
|
256 <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>);</pre>
|
jpayne@68
|
257 <p>Creates a cairo surface that targets the given DC. The DC will be
|
jpayne@68
|
258 queried for its initial clip extents, and this will be used as the
|
jpayne@68
|
259 size of the cairo surface.</p>
|
jpayne@68
|
260 <p>Supported formats are:
|
jpayne@68
|
261 <a class="link" href="cairo-Image-Surfaces.html#CAIRO-FORMAT-ARGB32:CAPS"><code class="literal">CAIRO_FORMAT_ARGB32</code></a>
|
jpayne@68
|
262 <a class="link" href="cairo-Image-Surfaces.html#CAIRO-FORMAT-RGB24:CAPS"><code class="literal">CAIRO_FORMAT_RGB24</code></a></p>
|
jpayne@68
|
263 <p>Note: <em class="parameter"><code>format</code></em>
|
jpayne@68
|
264 only tells cairo how to draw on the surface, not what
|
jpayne@68
|
265 the format of the surface is. Namely, cairo does not (and cannot)
|
jpayne@68
|
266 check that <em class="parameter"><code>hdc</code></em>
|
jpayne@68
|
267 actually supports alpha-transparency.</p>
|
jpayne@68
|
268 <div class="refsect3">
|
jpayne@68
|
269 <a name="cairo-win32-surface-create-with-format.parameters"></a><h4>Parameters</h4>
|
jpayne@68
|
270 <div class="informaltable"><table class="informaltable" width="100%" border="0">
|
jpayne@68
|
271 <colgroup>
|
jpayne@68
|
272 <col width="150px" class="parameters_name">
|
jpayne@68
|
273 <col class="parameters_description">
|
jpayne@68
|
274 <col width="200px" class="parameters_annotations">
|
jpayne@68
|
275 </colgroup>
|
jpayne@68
|
276 <tbody>
|
jpayne@68
|
277 <tr>
|
jpayne@68
|
278 <td class="parameter_name"><p>hdc</p></td>
|
jpayne@68
|
279 <td class="parameter_description"><p>the DC to create a surface for</p></td>
|
jpayne@68
|
280 <td class="parameter_annotations"> </td>
|
jpayne@68
|
281 </tr>
|
jpayne@68
|
282 <tr>
|
jpayne@68
|
283 <td class="parameter_name"><p>format</p></td>
|
jpayne@68
|
284 <td class="parameter_description"><p>format of pixels in the surface to create</p></td>
|
jpayne@68
|
285 <td class="parameter_annotations"> </td>
|
jpayne@68
|
286 </tr>
|
jpayne@68
|
287 </tbody>
|
jpayne@68
|
288 </table></div>
|
jpayne@68
|
289 </div>
|
jpayne@68
|
290 <div class="refsect3">
|
jpayne@68
|
291 <a name="cairo-win32-surface-create-with-format.returns"></a><h4>Returns</h4>
|
jpayne@68
|
292 <p> the newly created surface, NULL on failure</p>
|
jpayne@68
|
293 </div>
|
jpayne@68
|
294 <p class="since">Since: 1.14</p>
|
jpayne@68
|
295 </div>
|
jpayne@68
|
296 <hr>
|
jpayne@68
|
297 <div class="refsect2">
|
jpayne@68
|
298 <a name="cairo-win32-printing-surface-create"></a><h3>cairo_win32_printing_surface_create ()</h3>
|
jpayne@68
|
299 <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
|
300 cairo_win32_printing_surface_create (<em class="parameter"><code><span class="type">HDC</span> hdc</code></em>);</pre>
|
jpayne@68
|
301 <p>Creates a cairo surface that targets the given DC. The DC will be
|
jpayne@68
|
302 queried for its initial clip extents, and this will be used as the
|
jpayne@68
|
303 size of the cairo surface. The DC should be a printing DC;
|
jpayne@68
|
304 antialiasing will be ignored, and GDI will be used as much as
|
jpayne@68
|
305 possible to draw to the surface.</p>
|
jpayne@68
|
306 <p>The returned surface will be wrapped using the paginated surface to
|
jpayne@68
|
307 provide correct complex rendering behaviour; <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-show-page" title="cairo_surface_show_page ()"><code class="function">cairo_surface_show_page()</code></a> and
|
jpayne@68
|
308 associated methods must be used for correct output.</p>
|
jpayne@68
|
309 <div class="refsect3">
|
jpayne@68
|
310 <a name="cairo-win32-printing-surface-create.parameters"></a><h4>Parameters</h4>
|
jpayne@68
|
311 <div class="informaltable"><table class="informaltable" width="100%" border="0">
|
jpayne@68
|
312 <colgroup>
|
jpayne@68
|
313 <col width="150px" class="parameters_name">
|
jpayne@68
|
314 <col class="parameters_description">
|
jpayne@68
|
315 <col width="200px" class="parameters_annotations">
|
jpayne@68
|
316 </colgroup>
|
jpayne@68
|
317 <tbody><tr>
|
jpayne@68
|
318 <td class="parameter_name"><p>hdc</p></td>
|
jpayne@68
|
319 <td class="parameter_description"><p>the DC to create a surface for</p></td>
|
jpayne@68
|
320 <td class="parameter_annotations"> </td>
|
jpayne@68
|
321 </tr></tbody>
|
jpayne@68
|
322 </table></div>
|
jpayne@68
|
323 </div>
|
jpayne@68
|
324 <div class="refsect3">
|
jpayne@68
|
325 <a name="cairo-win32-printing-surface-create.returns"></a><h4>Returns</h4>
|
jpayne@68
|
326 <p> the newly created surface</p>
|
jpayne@68
|
327 </div>
|
jpayne@68
|
328 <p class="since">Since: 1.6</p>
|
jpayne@68
|
329 </div>
|
jpayne@68
|
330 <hr>
|
jpayne@68
|
331 <div class="refsect2">
|
jpayne@68
|
332 <a name="cairo-win32-surface-get-dc"></a><h3>cairo_win32_surface_get_dc ()</h3>
|
jpayne@68
|
333 <pre class="programlisting"><span class="returnvalue">HDC</span>
|
jpayne@68
|
334 cairo_win32_surface_get_dc (<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
|
335 <p>Returns the HDC associated with this surface, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if none.
|
jpayne@68
|
336 Also returns <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the surface is not a win32 surface.</p>
|
jpayne@68
|
337 <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 HDC to
|
jpayne@68
|
338 ensure that all pending drawing operations are finished and to
|
jpayne@68
|
339 restore any temporary modification cairo has made to its state. A
|
jpayne@68
|
340 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 after the state or
|
jpayne@68
|
341 the content of the HDC has been modified.</p>
|
jpayne@68
|
342 <div class="refsect3">
|
jpayne@68
|
343 <a name="cairo-win32-surface-get-dc.parameters"></a><h4>Parameters</h4>
|
jpayne@68
|
344 <div class="informaltable"><table class="informaltable" width="100%" border="0">
|
jpayne@68
|
345 <colgroup>
|
jpayne@68
|
346 <col width="150px" class="parameters_name">
|
jpayne@68
|
347 <col class="parameters_description">
|
jpayne@68
|
348 <col width="200px" class="parameters_annotations">
|
jpayne@68
|
349 </colgroup>
|
jpayne@68
|
350 <tbody><tr>
|
jpayne@68
|
351 <td class="parameter_name"><p>surface</p></td>
|
jpayne@68
|
352 <td class="parameter_description"><p>a <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></td>
|
jpayne@68
|
353 <td class="parameter_annotations"> </td>
|
jpayne@68
|
354 </tr></tbody>
|
jpayne@68
|
355 </table></div>
|
jpayne@68
|
356 </div>
|
jpayne@68
|
357 <div class="refsect3">
|
jpayne@68
|
358 <a name="cairo-win32-surface-get-dc.returns"></a><h4>Returns</h4>
|
jpayne@68
|
359 <p> HDC or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no HDC available.</p>
|
jpayne@68
|
360 </div>
|
jpayne@68
|
361 <p class="since">Since: 1.2</p>
|
jpayne@68
|
362 </div>
|
jpayne@68
|
363 <hr>
|
jpayne@68
|
364 <div class="refsect2">
|
jpayne@68
|
365 <a name="cairo-win32-surface-get-image"></a><h3>cairo_win32_surface_get_image ()</h3>
|
jpayne@68
|
366 <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
|
367 cairo_win32_surface_get_image (<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
|
368 <p>Returns a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> image surface that refers to the same bits
|
jpayne@68
|
369 as the DIB of the Win32 surface. If the passed-in win32 surface
|
jpayne@68
|
370 is not a DIB surface, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned.</p>
|
jpayne@68
|
371 <div class="refsect3">
|
jpayne@68
|
372 <a name="cairo-win32-surface-get-image.parameters"></a><h4>Parameters</h4>
|
jpayne@68
|
373 <div class="informaltable"><table class="informaltable" width="100%" border="0">
|
jpayne@68
|
374 <colgroup>
|
jpayne@68
|
375 <col width="150px" class="parameters_name">
|
jpayne@68
|
376 <col class="parameters_description">
|
jpayne@68
|
377 <col width="200px" class="parameters_annotations">
|
jpayne@68
|
378 </colgroup>
|
jpayne@68
|
379 <tbody><tr>
|
jpayne@68
|
380 <td class="parameter_name"><p>surface</p></td>
|
jpayne@68
|
381 <td class="parameter_description"><p>a <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></td>
|
jpayne@68
|
382 <td class="parameter_annotations"> </td>
|
jpayne@68
|
383 </tr></tbody>
|
jpayne@68
|
384 </table></div>
|
jpayne@68
|
385 </div>
|
jpayne@68
|
386 <div class="refsect3">
|
jpayne@68
|
387 <a name="cairo-win32-surface-get-image.returns"></a><h4>Returns</h4>
|
jpayne@68
|
388 <p> a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> (owned by the win32 <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>),
|
jpayne@68
|
389 or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the win32 surface is not a DIB.</p>
|
jpayne@68
|
390 </div>
|
jpayne@68
|
391 <p class="since">Since: 1.4</p>
|
jpayne@68
|
392 </div>
|
jpayne@68
|
393 </div>
|
jpayne@68
|
394 <div class="refsect1">
|
jpayne@68
|
395 <a name="cairo-Win32-Surfaces.other_details"></a><h2>Types and Values</h2>
|
jpayne@68
|
396 <div class="refsect2">
|
jpayne@68
|
397 <a name="CAIRO-HAS-WIN32-SURFACE:CAPS"></a><h3>CAIRO_HAS_WIN32_SURFACE</h3>
|
jpayne@68
|
398 <pre class="programlisting">#define CAIRO_HAS_WIN32_SURFACE 1
|
jpayne@68
|
399 </pre>
|
jpayne@68
|
400 <p>Defined if the Microsoft Windows surface backend is available.
|
jpayne@68
|
401 This macro can be used to conditionally compile backend-specific code.</p>
|
jpayne@68
|
402 <p class="since">Since: 1.0</p>
|
jpayne@68
|
403 </div>
|
jpayne@68
|
404 </div>
|
jpayne@68
|
405 <div class="refsect1">
|
jpayne@68
|
406 <a name="cairo-Win32-Surfaces.see-also"></a><h2>See Also</h2>
|
jpayne@68
|
407 <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
|
408 </div>
|
jpayne@68
|
409 </div>
|
jpayne@68
|
410 <div class="footer">
|
jpayne@68
|
411 <hr>Generated by GTK-Doc V1.27</div>
|
jpayne@68
|
412 </body>
|
jpayne@68
|
413 </html> |