Skip to content

Commit a73d115

Browse files
committed
Add SDL3_gfx (rotozoom part)
1 parent 01c1cce commit a73d115

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

units/SDL3_gfx.pas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ interface
4545
{$ENDIF}
4646

4747
{$INCLUDE SDL3_imageFilter.inc}
48+
{$INCLUDE SDL3_rotozoom.inc}
4849

4950
implementation
5051

units/SDL3_rotozoom.inc

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
This file is part of:
3+
4+
SDL3 for Pascal
5+
(https://github.com/PascalGameDevelopment/SDL3-for-Pascal)
6+
SPDX-License-Identifier: Zlib
7+
}
8+
9+
Const
10+
{*!
11+
\brief Disable anti-aliasing (no smoothing).
12+
*}
13+
SMOOTHING_OFF = 0;
14+
15+
{*!
16+
\brief Enable anti-aliasing (smoothing).
17+
*}
18+
SMOOTHING_ON = 1;
19+
20+
function rotozoomSurface(src: PSDL_Surface; angle, zoom: cdouble; smooth: cint): PSDL_Surface; cdecl;
21+
external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_rotozoomSurface' {$ENDIF} {$ENDIF};
22+
23+
function rotozoomSurfaceXY(src: PSDL_Surface; angle, zoomx, zoomy: cdouble; smooth: cint): PSDL_Surface; cdecl;
24+
external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_rotozoomSurfaceXY' {$ENDIF} {$ENDIF};
25+
26+
procedure rotozoomSurfaceSize(width, height: cint; angle, zoom: cdouble; dstwidth, dstheight: pcint); cdecl;
27+
external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_rotozoomSurfaceSize' {$ENDIF} {$ENDIF};
28+
29+
procedure rotozoomSurfaceSizeXY(width, height: cint; angle, zoomx, zoomy: cdouble; dstwidth, dstheight: pcint); cdecl;
30+
external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_rotozoomSurfaceSizeXY' {$ENDIF} {$ENDIF};
31+
32+
function zoomSurface(src: PSDL_Surface; zoomx, zoomy: cdouble; smooth: cint): PSDL_Surface; cdecl;
33+
external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_zoomSurface' {$ENDIF} {$ENDIF};
34+
35+
procedure zoomSurfaceSize(width, height: cint; zoomx, zoomy: cdouble; dstwidth, dstheight: pcint); cdecl;
36+
external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_zoomSurfaceSize' {$ENDIF} {$ENDIF};
37+
38+
function shrinkSurface(src: PSDL_Surface; factorx, factory: cint): PSDL_Surface; cdecl;
39+
external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_shrinkSurface' {$ENDIF} {$ENDIF};
40+
41+
function rotateSurface90Degrees(src: PSDL_Surface; numClockwiseTurns: cint): PSDL_Surface; cdecl;
42+
external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_rotateSurface90Degrees' {$ENDIF} {$ENDIF};

0 commit comments

Comments
 (0)