"Initial commit to Gerrit"
[profile/ivi/cogl.git] / doc / reference / cogl / html / cogl-Clipping-(Deprecated).html
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>Clipping (Deprecated)</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="Cogl Reference Manual">
8 <link rel="up" href="ch03.html" title="Cogl deprecated API">
9 <link rel="prev" href="cogl-Materials-(Deprecated).html" title="Materials (Deprecated)">
10 <link rel="next" href="cogl-Vertex-Buffers-(Deprecated).html" title="Vertex Buffers (Deprecated)">
11 <meta name="generator" content="GTK-Doc V1.18.1 (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="2">
16 <tr valign="middle">
17 <td><a accesskey="p" href="cogl-Materials-(Deprecated).html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="ch03.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">Cogl Reference Manual</th>
21 <td><a accesskey="n" href="cogl-Vertex-Buffers-(Deprecated).html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#cogl-Clipping-(Deprecated).synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#cogl-Clipping-(Deprecated).description" class="shortcut">Description</a>
27 </td></tr>
28 </table>
29 <div class="refentry">
30 <a name="cogl-Clipping-(Deprecated)"></a><div class="titlepage"></div>
31 <div class="refnamediv"><table width="100%"><tr>
32 <td valign="top">
33 <h2><span class="refentrytitle"><a name="cogl-Clipping-(Deprecated).top_of_page"></a>Clipping (Deprecated)</span></h2>
34 <p>Clipping (Deprecated)</p>
35 </td>
36 <td valign="top" align="right"></td>
37 </tr></table></div>
38 <div class="refsynopsisdiv">
39 <a name="cogl-Clipping-(Deprecated).synopsis"></a><h2>Synopsis</h2>
40 <pre class="synopsis"><span class="returnvalue">void</span>                <a class="link" href="cogl-Clipping-(Deprecated).html#cogl-clip-push" title="cogl_clip_push ()">cogl_clip_push</a>                      (<em class="parameter"><code><span class="type">float</span> x_offset</code></em>,
41                                                          <em class="parameter"><code><span class="type">float</span> y_offset</code></em>,
42                                                          <em class="parameter"><code><span class="type">float</span> width</code></em>,
43                                                          <em class="parameter"><code><span class="type">float</span> height</code></em>);
44 <span class="returnvalue">void</span>                <a class="link" href="cogl-Clipping-(Deprecated).html#cogl-clip-push-window-rect" title="cogl_clip_push_window_rect ()">cogl_clip_push_window_rect</a>          (<em class="parameter"><code><span class="type">float</span> x_offset</code></em>,
45                                                          <em class="parameter"><code><span class="type">float</span> y_offset</code></em>,
46                                                          <em class="parameter"><code><span class="type">float</span> width</code></em>,
47                                                          <em class="parameter"><code><span class="type">float</span> height</code></em>);
48 <span class="returnvalue">void</span>                <a class="link" href="cogl-Clipping-(Deprecated).html#cogl-clip-ensure" title="cogl_clip_ensure ()">cogl_clip_ensure</a>                    (<em class="parameter"><code><span class="type">void</span></code></em>);
49 <span class="returnvalue">void</span>                <a class="link" href="cogl-Clipping-(Deprecated).html#cogl-clip-stack-save" title="cogl_clip_stack_save ()">cogl_clip_stack_save</a>                (<em class="parameter"><code><span class="type">void</span></code></em>);
50 <span class="returnvalue">void</span>                <a class="link" href="cogl-Clipping-(Deprecated).html#cogl-clip-stack-restore" title="cogl_clip_stack_restore ()">cogl_clip_stack_restore</a>             (<em class="parameter"><code><span class="type">void</span></code></em>);
51 </pre>
52 </div>
53 <div class="refsect1">
54 <a name="cogl-Clipping-(Deprecated).description"></a><h2>Description</h2>
55 </div>
56 <div class="refsect1">
57 <a name="cogl-Clipping-(Deprecated).details"></a><h2>Details</h2>
58 <div class="refsect2">
59 <a name="cogl-clip-push"></a><h3>cogl_clip_push ()</h3>
60 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_clip_push                      (<em class="parameter"><code><span class="type">float</span> x_offset</code></em>,
61                                                          <em class="parameter"><code><span class="type">float</span> y_offset</code></em>,
62                                                          <em class="parameter"><code><span class="type">float</span> width</code></em>,
63                                                          <em class="parameter"><code><span class="type">float</span> height</code></em>);</pre>
64 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
65 <h3 class="title">Warning</h3>
66 <p><code class="literal">cogl_clip_push</code> has been deprecated since version 1.2 and should not be used in newly-written code. The x, y, width, height arguments are inconsistent
67   with other API that specify rectangles in model space, and when used
68   with a coordinate space that puts the origin at the center and y+
69   extending up, it's awkward to use. Please use <a class="link" href="cogl-Clipping.html#cogl-clip-push-rectangle" title="cogl_clip_push_rectangle ()"><code class="function">cogl_clip_push_rectangle()</code></a>
70   instead</p>
71 </div>
72 <p>
73 Specifies a rectangular clipping area for all subsequent drawing
74 operations. Any drawing commands that extend outside the rectangle
75 will be clipped so that only the portion inside the rectangle will
76 be displayed. The rectangle dimensions are transformed by the
77 current model-view matrix.
78 </p>
79 <p>
80 The rectangle is intersected with the current clip region. To undo
81 the effect of this function, call <a class="link" href="cogl-Clipping.html#cogl-clip-pop" title="cogl_clip_pop ()"><code class="function">cogl_clip_pop()</code></a>.
82 </p>
83 <div class="variablelist"><table border="0">
84 <col align="left" valign="top">
85 <tbody>
86 <tr>
87 <td><p><span class="term"><em class="parameter"><code>x_offset</code></em> :</span></p></td>
88 <td>left edge of the clip rectangle</td>
89 </tr>
90 <tr>
91 <td><p><span class="term"><em class="parameter"><code>y_offset</code></em> :</span></p></td>
92 <td>top edge of the clip rectangle</td>
93 </tr>
94 <tr>
95 <td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
96 <td>width of the clip rectangle</td>
97 </tr>
98 <tr>
99 <td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
100 <td>height of the clip rectangle</td>
101 </tr>
102 </tbody>
103 </table></div>
104 </div>
105 <hr>
106 <div class="refsect2">
107 <a name="cogl-clip-push-window-rect"></a><h3>cogl_clip_push_window_rect ()</h3>
108 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_clip_push_window_rect          (<em class="parameter"><code><span class="type">float</span> x_offset</code></em>,
109                                                          <em class="parameter"><code><span class="type">float</span> y_offset</code></em>,
110                                                          <em class="parameter"><code><span class="type">float</span> width</code></em>,
111                                                          <em class="parameter"><code><span class="type">float</span> height</code></em>);</pre>
112 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
113 <h3 class="title">Warning</h3>
114 <p><code class="literal">cogl_clip_push_window_rect</code> has been deprecated since version 1.2 and should not be used in newly-written code. Use <a class="link" href="cogl-Clipping.html#cogl-clip-push-window-rectangle" title="cogl_clip_push_window_rectangle ()"><code class="function">cogl_clip_push_window_rectangle()</code></a> instead</p>
115 </div>
116 <p>
117 Specifies a rectangular clipping area for all subsequent drawing
118 operations. Any drawing commands that extend outside the rectangle
119 will be clipped so that only the portion inside the rectangle will
120 be displayed. The rectangle dimensions are not transformed by the
121 current model-view matrix.
122 </p>
123 <p>
124 The rectangle is intersected with the current clip region. To undo
125 the effect of this function, call <a class="link" href="cogl-Clipping.html#cogl-clip-pop" title="cogl_clip_pop ()"><code class="function">cogl_clip_pop()</code></a>.
126 </p>
127 <div class="variablelist"><table border="0">
128 <col align="left" valign="top">
129 <tbody>
130 <tr>
131 <td><p><span class="term"><em class="parameter"><code>x_offset</code></em> :</span></p></td>
132 <td>left edge of the clip rectangle in window coordinates</td>
133 </tr>
134 <tr>
135 <td><p><span class="term"><em class="parameter"><code>y_offset</code></em> :</span></p></td>
136 <td>top edge of the clip rectangle in window coordinates</td>
137 </tr>
138 <tr>
139 <td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
140 <td>width of the clip rectangle</td>
141 </tr>
142 <tr>
143 <td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
144 <td>height of the clip rectangle</td>
145 </tr>
146 </tbody>
147 </table></div>
148 </div>
149 <hr>
150 <div class="refsect2">
151 <a name="cogl-clip-ensure"></a><h3>cogl_clip_ensure ()</h3>
152 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_clip_ensure                    (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
153 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
154 <h3 class="title">Warning</h3>
155 <p><code class="literal">cogl_clip_ensure</code> has been deprecated since version 1.2 and should not be used in newly-written code. Calling this function has no effect</p>
156 </div>
157 <p>
158 Ensures that the current clipping region has been set in GL. This
159 will automatically be called before any Cogl primitives but it
160 maybe be neccessary to call if you are using raw GL calls with
161 clipping.
162 </p>
163 <p class="since">Since 1.0</p>
164 </div>
165 <hr>
166 <div class="refsect2">
167 <a name="cogl-clip-stack-save"></a><h3>cogl_clip_stack_save ()</h3>
168 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_clip_stack_save                (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
169 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
170 <h3 class="title">Warning</h3>
171 <p><code class="literal">cogl_clip_stack_save</code> has been deprecated since version 1.2 and should not be used in newly-written code. This was originally added to allow us to save the
172   clip stack when switching to an offscreen framebuffer, but it's
173   not necessary anymore given that framebuffers now own separate
174   clip stacks which will be automatically switched between when a
175   new buffer is set. Calling this function has no effect</p>
176 </div>
177 <p>
178 Save the entire state of the clipping stack and then clear all
179 clipping. The previous state can be returned to with
180 <a class="link" href="cogl-Clipping-(Deprecated).html#cogl-clip-stack-restore" title="cogl_clip_stack_restore ()"><code class="function">cogl_clip_stack_restore()</code></a>. Each call to <a class="link" href="cogl-Clipping-(Deprecated).html#cogl-clip-push" title="cogl_clip_push ()"><code class="function">cogl_clip_push()</code></a> after this
181 must be matched by a call to <a class="link" href="cogl-Clipping.html#cogl-clip-pop" title="cogl_clip_pop ()"><code class="function">cogl_clip_pop()</code></a> before calling
182 <a class="link" href="cogl-Clipping-(Deprecated).html#cogl-clip-stack-restore" title="cogl_clip_stack_restore ()"><code class="function">cogl_clip_stack_restore()</code></a>.
183 </p>
184 <p class="since">Since 0.8.2</p>
185 </div>
186 <hr>
187 <div class="refsect2">
188 <a name="cogl-clip-stack-restore"></a><h3>cogl_clip_stack_restore ()</h3>
189 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_clip_stack_restore             (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
190 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
191 <h3 class="title">Warning</h3>
192 <p><code class="literal">cogl_clip_stack_restore</code> has been deprecated since version 1.2 and should not be used in newly-written code. This was originally added to allow us to restore
193   the clip stack when switching back from an offscreen framebuffer,
194   but it's not necessary anymore given that framebuffers now own
195   separate clip stacks which will be automatically switched between
196   when a new buffer is set. Calling this function has no effect</p>
197 </div>
198 <p>
199 Restore the state of the clipping stack that was previously saved
200 by <a class="link" href="cogl-Clipping-(Deprecated).html#cogl-clip-stack-save" title="cogl_clip_stack_save ()"><code class="function">cogl_clip_stack_save()</code></a>.
201 </p>
202 <p class="since">Since 0.8.2</p>
203 </div>
204 </div>
205 </div>
206 <div class="footer">
207 <hr>
208           Generated by GTK-Doc V1.18.1</div>
209 </body>
210 </html>