File: _s_d_l2__rotozoom_8h.html

package info (click to toggle)
libsdl2-gfx 1.0.4%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 7,736 kB
  • sloc: ansic: 13,385; sh: 12,631; makefile: 93
file content (622 lines) | stat: -rwxr-xr-x 33,670 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>SDL2_gfx: /cygdrive/i/Sources/sdl2gfx/SDL2_rotozoom.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SDL2_gfx
   &#160;<span id="projectnumber">1.0.2</span>
   </div>
   <div id="projectbrief">GraphicsprimitivesandsurfacefunctionsforSDL2</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">/cygdrive/i/Sources/sdl2gfx/SDL2_rotozoom.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;math.h&gt;</code><br />
<code>#include &quot;SDL.h&quot;</code><br />
</div>
<p><a href="_s_d_l2__rotozoom_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ae71449b1cc6e6250b91f539153a7a0d3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l2__rotozoom_8h.html#ae71449b1cc6e6250b91f539153a7a0d3">M_PI</a>&#160;&#160;&#160;3.1415926535897932384626433832795</td></tr>
<tr class="separator:ae71449b1cc6e6250b91f539153a7a0d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6541cd06edcce77d8a6f1c6350c988af"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l2__rotozoom_8h.html#a6541cd06edcce77d8a6f1c6350c988af">SMOOTHING_OFF</a>&#160;&#160;&#160;0</td></tr>
<tr class="memdesc:a6541cd06edcce77d8a6f1c6350c988af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable anti-aliasing (no smoothing).  <a href="#a6541cd06edcce77d8a6f1c6350c988af">More...</a><br /></td></tr>
<tr class="separator:a6541cd06edcce77d8a6f1c6350c988af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abeb6ae7618fcb315d0399fe65849a2e8"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l2__rotozoom_8h.html#abeb6ae7618fcb315d0399fe65849a2e8">SMOOTHING_ON</a>&#160;&#160;&#160;1</td></tr>
<tr class="memdesc:abeb6ae7618fcb315d0399fe65849a2e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable anti-aliasing (smoothing).  <a href="#abeb6ae7618fcb315d0399fe65849a2e8">More...</a><br /></td></tr>
<tr class="separator:abeb6ae7618fcb315d0399fe65849a2e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3316f8a2f78ed696bbe0242c75b6ee7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a>&#160;&#160;&#160;extern</td></tr>
<tr class="separator:ab3316f8a2f78ed696bbe0242c75b6ee7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a6f5f31a362f63370dc60049df14d6856"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> SDL_Surface *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l2__rotozoom_8h.html#a6f5f31a362f63370dc60049df14d6856">rotozoomSurface</a> (SDL_Surface *src, double angle, double zoom, int smooth)</td></tr>
<tr class="memdesc:a6f5f31a362f63370dc60049df14d6856"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rotates and zooms a surface and optional anti-aliasing.  <a href="#a6f5f31a362f63370dc60049df14d6856">More...</a><br /></td></tr>
<tr class="separator:a6f5f31a362f63370dc60049df14d6856"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a592d84489ce544c050a9f3fe0e04f3f6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> SDL_Surface *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l2__rotozoom_8h.html#a592d84489ce544c050a9f3fe0e04f3f6">rotozoomSurfaceXY</a> (SDL_Surface *src, double angle, double zoomx, double zoomy, int smooth)</td></tr>
<tr class="memdesc:a592d84489ce544c050a9f3fe0e04f3f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-aliasing.  <a href="#a592d84489ce544c050a9f3fe0e04f3f6">More...</a><br /></td></tr>
<tr class="separator:a592d84489ce544c050a9f3fe0e04f3f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9097c513174e2d97603292c08a9db923"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l2__rotozoom_8h.html#a9097c513174e2d97603292c08a9db923">rotozoomSurfaceSize</a> (int width, int height, double angle, double zoom, int *dstwidth, int *dstheight)</td></tr>
<tr class="memdesc:a9097c513174e2d97603292c08a9db923"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the size of the resulting target surface for a <a class="el" href="_s_d_l2__rotozoom_8c.html#a5f64ed53eeee5f2667971c857698d1e5" title="Rotates and zooms a surface and optional anti-aliasing. ">rotozoomSurface()</a> call.  <a href="#a9097c513174e2d97603292c08a9db923">More...</a><br /></td></tr>
<tr class="separator:a9097c513174e2d97603292c08a9db923"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0126562efa572575e3962fe51d69e7c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l2__rotozoom_8h.html#aa0126562efa572575e3962fe51d69e7c">rotozoomSurfaceSizeXY</a> (int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight)</td></tr>
<tr class="memdesc:aa0126562efa572575e3962fe51d69e7c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the size of the resulting target surface for a <a class="el" href="_s_d_l2__rotozoom_8c.html#aab98b5b0da4ea468bacf47f7b85f0ee2" title="Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-...">rotozoomSurfaceXY()</a> call.  <a href="#aa0126562efa572575e3962fe51d69e7c">More...</a><br /></td></tr>
<tr class="separator:aa0126562efa572575e3962fe51d69e7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0867857132421429994198cabacb0528"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> SDL_Surface *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l2__rotozoom_8h.html#a0867857132421429994198cabacb0528">zoomSurface</a> (SDL_Surface *src, double zoomx, double zoomy, int smooth)</td></tr>
<tr class="memdesc:a0867857132421429994198cabacb0528"><td class="mdescLeft">&#160;</td><td class="mdescRight">Zoom a surface by independent horizontal and vertical factors with optional smoothing.  <a href="#a0867857132421429994198cabacb0528">More...</a><br /></td></tr>
<tr class="separator:a0867857132421429994198cabacb0528"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87a121da75a099fd980295c759a7005d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l2__rotozoom_8h.html#a87a121da75a099fd980295c759a7005d">zoomSurfaceSize</a> (int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight)</td></tr>
<tr class="memdesc:a87a121da75a099fd980295c759a7005d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates the size of the target surface for a <a class="el" href="_s_d_l2__rotozoom_8c.html#abdd772b2f6b1f26134e4e90cda657a21" title="Zoom a surface by independent horizontal and vertical factors with optional smoothing. ">zoomSurface()</a> call.  <a href="#a87a121da75a099fd980295c759a7005d">More...</a><br /></td></tr>
<tr class="separator:a87a121da75a099fd980295c759a7005d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9adfe732cbca348e3287096e7c67e72d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> SDL_Surface *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l2__rotozoom_8h.html#a9adfe732cbca348e3287096e7c67e72d">shrinkSurface</a> (SDL_Surface *src, int factorx, int factory)</td></tr>
<tr class="memdesc:a9adfe732cbca348e3287096e7c67e72d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shrink a surface by an integer ratio using averaging.  <a href="#a9adfe732cbca348e3287096e7c67e72d">More...</a><br /></td></tr>
<tr class="separator:a9adfe732cbca348e3287096e7c67e72d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac2858dec47549c8f82360568b5a29363"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> SDL_Surface *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l2__rotozoom_8h.html#ac2858dec47549c8f82360568b5a29363">rotateSurface90Degrees</a> (SDL_Surface *src, int numClockwiseTurns)</td></tr>
<tr class="memdesc:ac2858dec47549c8f82360568b5a29363"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rotates a 8/16/24/32 bit surface in increments of 90 degrees.  <a href="#ac2858dec47549c8f82360568b5a29363">More...</a><br /></td></tr>
<tr class="separator:ac2858dec47549c8f82360568b5a29363"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="ae71449b1cc6e6250b91f539153a7a0d3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_PI&#160;&#160;&#160;3.1415926535897932384626433832795</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="_s_d_l2__rotozoom_8h_source.html#l00041">41</a> of file <a class="el" href="_s_d_l2__rotozoom_8h_source.html">SDL2_rotozoom.h</a>.</p>

</div>
</div>
<a class="anchor" id="ab3316f8a2f78ed696bbe0242c75b6ee7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SDL2_ROTOZOOM_SCOPE&#160;&#160;&#160;extern</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="_s_d_l2__rotozoom_8h_source.html#l00070">70</a> of file <a class="el" href="_s_d_l2__rotozoom_8h_source.html">SDL2_rotozoom.h</a>.</p>

</div>
</div>
<a class="anchor" id="a6541cd06edcce77d8a6f1c6350c988af"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SMOOTHING_OFF&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disable anti-aliasing (no smoothing). </p>

<p>Definition at line <a class="el" href="_s_d_l2__rotozoom_8h_source.html#l00051">51</a> of file <a class="el" href="_s_d_l2__rotozoom_8h_source.html">SDL2_rotozoom.h</a>.</p>

</div>
</div>
<a class="anchor" id="abeb6ae7618fcb315d0399fe65849a2e8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SMOOTHING_ON&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable anti-aliasing (smoothing). </p>

<p>Definition at line <a class="el" href="_s_d_l2__rotozoom_8h_source.html#l00056">56</a> of file <a class="el" href="_s_d_l2__rotozoom_8h_source.html">SDL2_rotozoom.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ac2858dec47549c8f82360568b5a29363"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> SDL_Surface* rotateSurface90Degrees </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>numClockwiseTurns</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Rotates a 8/16/24/32 bit surface in increments of 90 degrees. </p>
<p>Specialized 90 degree rotator which rotates a 'src' surface in 90 degree increments clockwise returning a new surface. Faster than rotozoomer since no scanning or interpolation takes place. Input surface must be 8/16/24/32 bit. (code contributed by J. Schiller, improved by C. Allport and A. Schiffler)</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>Source surface to rotate. </td></tr>
    <tr><td class="paramname">numClockwiseTurns</td><td>Number of clockwise 90 degree turns to apply to the source.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The new, rotated surface; or NULL for surfaces with incorrect input format. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l2__rotozoom_8c_source.html#l00803">803</a> of file <a class="el" href="_s_d_l2__rotozoom_8c_source.html">SDL2_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="a6f5f31a362f63370dc60049df14d6856"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> SDL_Surface* rotozoomSurface </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>angle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoom</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>smooth</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Rotates and zooms a surface and optional anti-aliasing. </p>
<p>Rotates and zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'angle' is the rotation in degrees and 'zoom' a scaling factor. If 'smooth' is set then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>The surface to rotozoom. </td></tr>
    <tr><td class="paramname">angle</td><td>The angle to rotate in degrees. </td></tr>
    <tr><td class="paramname">zoom</td><td>The scaling factor. </td></tr>
    <tr><td class="paramname">smooth</td><td>Antialiasing flag; set to SMOOTHING_ON to enable.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The new rotozoomed surface. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l2__rotozoom_8c_source.html#l01035">1035</a> of file <a class="el" href="_s_d_l2__rotozoom_8c_source.html">SDL2_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="a9097c513174e2d97603292c08a9db923"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> void rotozoomSurfaceSize </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>angle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoom</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>dstwidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>dstheight</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the size of the resulting target surface for a <a class="el" href="_s_d_l2__rotozoom_8c.html#a5f64ed53eeee5f2667971c857698d1e5" title="Rotates and zooms a surface and optional anti-aliasing. ">rotozoomSurface()</a> call. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">width</td><td>The source surface width. </td></tr>
    <tr><td class="paramname">height</td><td>The source surface height. </td></tr>
    <tr><td class="paramname">angle</td><td>The angle to rotate in degrees. </td></tr>
    <tr><td class="paramname">zoom</td><td>The scaling factor. </td></tr>
    <tr><td class="paramname">dstwidth</td><td>The calculated width of the rotozoomed destination surface. </td></tr>
    <tr><td class="paramname">dstheight</td><td>The calculated height of the rotozoomed destination surface. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_d_l2__rotozoom_8c_source.html#l01013">1013</a> of file <a class="el" href="_s_d_l2__rotozoom_8c_source.html">SDL2_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="aa0126562efa572575e3962fe51d69e7c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> void rotozoomSurfaceSizeXY </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>angle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoomx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoomy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>dstwidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>dstheight</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the size of the resulting target surface for a <a class="el" href="_s_d_l2__rotozoom_8c.html#aab98b5b0da4ea468bacf47f7b85f0ee2" title="Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-...">rotozoomSurfaceXY()</a> call. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">width</td><td>The source surface width. </td></tr>
    <tr><td class="paramname">height</td><td>The source surface height. </td></tr>
    <tr><td class="paramname">angle</td><td>The angle to rotate in degrees. </td></tr>
    <tr><td class="paramname">zoomx</td><td>The horizontal scaling factor. </td></tr>
    <tr><td class="paramname">zoomy</td><td>The vertical scaling factor. </td></tr>
    <tr><td class="paramname">dstwidth</td><td>The calculated width of the rotozoomed destination surface. </td></tr>
    <tr><td class="paramname">dstheight</td><td>The calculated height of the rotozoomed destination surface. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_d_l2__rotozoom_8c_source.html#l00996">996</a> of file <a class="el" href="_s_d_l2__rotozoom_8c_source.html">SDL2_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="a592d84489ce544c050a9f3fe0e04f3f6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> SDL_Surface* rotozoomSurfaceXY </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>angle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoomx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoomy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>smooth</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-aliasing. </p>
<p>Rotates and zooms a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'angle' is the rotation in degrees, 'zoomx and 'zoomy' scaling factors. If 'smooth' is set then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>The surface to rotozoom. </td></tr>
    <tr><td class="paramname">angle</td><td>The angle to rotate in degrees. </td></tr>
    <tr><td class="paramname">zoomx</td><td>The horizontal scaling factor. </td></tr>
    <tr><td class="paramname">zoomy</td><td>The vertical scaling factor. </td></tr>
    <tr><td class="paramname">smooth</td><td>Antialiasing flag; set to SMOOTHING_ON to enable.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The new rotozoomed surface. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l2__rotozoom_8c_source.html#l01056">1056</a> of file <a class="el" href="_s_d_l2__rotozoom_8c_source.html">SDL2_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="a9adfe732cbca348e3287096e7c67e72d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> SDL_Surface* shrinkSurface </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>factorx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>factory</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Shrink a surface by an integer ratio using averaging. </p>
<p>Shrinks a 32bit or 8bit 'src' surface to a newly created 'dst' surface. 'factorx' and 'factory' are the shrinking ratios (i.e. 2=1/2 the size, 3=1/3 the size, etc.) The destination surface is antialiased by averaging the source box RGBA or Y information. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. The input surface is not modified. The output surface is newly allocated.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>The surface to shrink. </td></tr>
    <tr><td class="paramname">factorx</td><td>The horizontal shrinking ratio. </td></tr>
    <tr><td class="paramname">factory</td><td>The vertical shrinking ratio.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The new, shrunken surface. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l2__rotozoom_8c_source.html#l01512">1512</a> of file <a class="el" href="_s_d_l2__rotozoom_8c_source.html">SDL2_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="a0867857132421429994198cabacb0528"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> SDL_Surface* zoomSurface </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoomx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoomy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>smooth</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Zoom a surface by independent horizontal and vertical factors with optional smoothing. </p>
<p>Zooms a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'zoomx' and 'zoomy' are scaling factors for width and height. If 'smooth' is on then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. If zoom factors are negative, the image is flipped on the axes.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>The surface to zoom. </td></tr>
    <tr><td class="paramname">zoomx</td><td>The horizontal zoom factor. </td></tr>
    <tr><td class="paramname">zoomy</td><td>The vertical zoom factor. </td></tr>
    <tr><td class="paramname">smooth</td><td>Antialiasing flag; set to SMOOTHING_ON to enable.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The new, zoomed surface. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l2__rotozoom_8c_source.html#l01361">1361</a> of file <a class="el" href="_s_d_l2__rotozoom_8c_source.html">SDL2_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="a87a121da75a099fd980295c759a7005d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> void zoomSurfaceSize </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoomx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoomy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>dstwidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>dstheight</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Calculates the size of the target surface for a <a class="el" href="_s_d_l2__rotozoom_8c.html#abdd772b2f6b1f26134e4e90cda657a21" title="Zoom a surface by independent horizontal and vertical factors with optional smoothing. ">zoomSurface()</a> call. </p>
<p>The minimum size of the target surface is 1. The input factors can be positive or negative.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">width</td><td>The width of the source surface to zoom. </td></tr>
    <tr><td class="paramname">height</td><td>The height of the source surface to zoom. </td></tr>
    <tr><td class="paramname">zoomx</td><td>The horizontal zoom factor. </td></tr>
    <tr><td class="paramname">zoomy</td><td>The vertical zoom factor. </td></tr>
    <tr><td class="paramname">dstwidth</td><td>Pointer to an integer to store the calculated width of the zoomed target surface. </td></tr>
    <tr><td class="paramname">dstheight</td><td>Pointer to an integer to store the calculated height of the zoomed target surface. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_d_l2__rotozoom_8c_source.html#l01311">1311</a> of file <a class="el" href="_s_d_l2__rotozoom_8c_source.html">SDL2_rotozoom.c</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address>
</body>
</html>