sdljavax.gfx
Class SDLGfx

java.lang.Object
  extended by sdljavax.gfx.SDLGfx

public class SDLGfx
extends java.lang.Object

Binding to the SDL_gfx library

Note: all ___Color routines expect the color to be in format 0xRRGGBBAA

Also note in the functions which take a list of points (ShortBuffer), the length is inferred from the size of the buffer, you do not have to specify it to the function, SDLGfx will take care of this for you. No checking is done to ensure vx.capacity() = vy[].capacity() so make sure they are the same length or the results could will most likely be a segfault.

Version:
$Id: SDLGfx.java,v 1.10 2005/02/19 02:02:06 ivan_ganza Exp $
Author:
Ivan Z. Ganza

Constructor Summary
SDLGfx()
           
 
Method Summary
static int aacircleColor(SDLSurface dst, int x, int y, int r, long color)
          aacircleColor
static int aacircleRGBA(SDLSurface dst, int x, int y, int rad, int r, int g, int b, int a)
          aacircleRGBA
static int aaellipseColor(SDLSurface dst, int xc, int yc, int rx, int ry, long color)
          aaellipseColor
static int aaellipseRGBA(SDLSurface dst, int x, int y, int rx, int ry, int r, int g, int b, int a)
          aaellipseRGBA
static int aalineColor(SDLSurface dst, int x1, int y1, int x2, int y2, long color)
          aalineColor
static int aalineRGBA(SDLSurface dst, int x1, int y1, int x2, int y2, int r, int g, int b, int a)
          aalineRGBA
static int aapolygonColor(SDLSurface dst, java.nio.ShortBuffer vx, java.nio.ShortBuffer vy, long color)
          aapolygonColor
static int aapolygonRGBA(SDLSurface dst, java.nio.ShortBuffer vx, java.nio.ShortBuffer vy, short r, short g, short b, short a)
          aapolygonRGBA
static int aatrigonColor(SDLSurface dst, int x1, int y1, int x2, int y2, int x3, int y3, long color)
          aatrigonColor
static int aatrigonRGBA(SDLSurface dst, int x1, int y1, int x2, int y2, int x3, int y3, int r, int g, int b, int a)
          aatrigonRGBA
static int bezierColor(SDLSurface dst, java.nio.ShortBuffer vx, java.nio.ShortBuffer vy, short s, long color)
          bezierColor
static int bezierRGBA(SDLSurface dst, java.nio.ShortBuffer vx, java.nio.ShortBuffer vy, short s, short r, short g, short b, short a)
          bezierRGBA
static int boxColor(SDLSurface dst, int x1, int y1, int x2, int y2, long color)
          boxColor
static int boxRGBA(SDLSurface dst, int x1, int y1, int x2, int y2, int r, int g, int b, int a)
          boxRGBA
static int characterColor(SDLSurface dst, int x, int y, char c, long color)
          characterColor
static int characterRGBA(SDLSurface dst, int x, int y, char c, int r, int g, int b, int a)
          characterRGBA
static int circleColor(SDLSurface dst, int x, int y, int r, long color)
          circleColor
static int circleRGBA(SDLSurface dst, int x, int y, int rad, int r, int g, int b, int a)
          circleRGBA
static int ellipseColor(SDLSurface dst, int x, int y, int rx, int ry, long color)
          ellipseColor
static int ellipseRGBA(SDLSurface dst, int x, int y, int rx, int ry, int r, int g, int b, int a)
          ellipseRGBA
static int filledCircleColor(SDLSurface dst, int x, int y, int r, long color)
          filledCircleColor
static int filledCircleRGBA(SDLSurface dst, int x, int y, int rad, int r, int g, int b, int a)
          filledCircleRGBA
static int filledEllipseColor(SDLSurface dst, int x, int y, int rx, int ry, long color)
          filledEllipseColor
static int filledEllipseRGBA(SDLSurface dst, int x, int y, int rx, int ry, int r, int g, int b, int a)
          filledEllipseRGBA
static int filledpieColor(SDLSurface dst, int x, int y, int rad, int start, int end, long color)
          filledpieColor
static int filledpieRGBA(SDLSurface dst, int x, int y, int rad, int start, int end, int r, int g, int b, int a)
          filledpieRGBA
static int filledPolygonColor(SDLSurface dst, java.nio.ShortBuffer vx, java.nio.ShortBuffer vy, short color)
          filledPolygonColor
static int filledPolygonRGBA(SDLSurface dst, java.nio.ShortBuffer vx, java.nio.ShortBuffer vy, short r, short g, short b, short a)
          filledPolygonRGBA
static int filledTrigonColor(SDLSurface dst, int x1, int y1, int x2, int y2, int x3, int y3, int color)
          filledTrigonColor
static int filledTrigonRGBA(SDLSurface dst, int x1, int y1, int x2, int y2, int x3, int y3, int r, int g, int b, int a)
          filledTrigonRGBA
static int hlineColor(SDLSurface dst, int x1, int x2, int y, long color)
          hlineColor
static int hlineRGBA(SDLSurface dst, int x1, int x2, int y, int r, int g, int b, int a)
          hlineRGBA
static int lineColor(SDLSurface dst, int x1, int y1, int x2, int y2, long color)
          lineColor
static int lineRGBA(SDLSurface dst, int x1, int y1, int x2, int y2, int r, int g, int b, int a)
          lineRGBA
static int pixelColor(SDLSurface dst, int x, int y, long color)
          pixelColor
static int pixelRGBA(SDLSurface dst, int x, int y, int r, int g, int b, int a)
          pixelRGBA
static int polygonColor(SDLSurface dst, java.nio.ShortBuffer vx, java.nio.ShortBuffer vy, long color)
          polygonColor
static int polygonRGBA(SDLSurface dst, java.nio.ShortBuffer vx, java.nio.ShortBuffer vy, short r, short g, short b, short a)
          polygonRGBA
static int rectangleColor(SDLSurface dst, int x1, int y1, int x2, int y2, long color)
          rectangleColor
static int rectangleRGBA(SDLSurface dst, int x1, int y1, int x2, int y2, int r, int g, int b, int a)
          rectangleRGBA
static SDLSurface rotozoomSurface(SDLSurface src, double angle, double zoom, boolean smooth)
          Rotates and zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface.
static java.awt.Dimension rotozoomSurfaceSize(int width, int height, double angle, double zoom)
          Compute the size that would be required to hold the surface after the zoom
static int stringColor(SDLSurface dst, int x, int y, java.lang.String c, long color)
          stringColor
static int stringRGBA(SDLSurface dst, int x, int y, java.lang.String c, int r, int g, int b, int a)
          stringRGBA
static int trigonColor(SDLSurface dst, int x1, int y1, int x2, int y2, int x3, int y3, long color)
          trigonColor
static int trigonRGBA(SDLSurface dst, int x1, int y1, int x2, int y2, int x3, int y3, int r, int g, int b, int a)
          trigonRGBA
static int vlineColor(SDLSurface dst, int x, int y1, int y2, long color)
          vlineColor
static int vlineRGBA(SDLSurface dst, int x, int y1, int y2, int r, int g, int b, int a)
          vlineRGBA
static SDLSurface zoomSurface(SDLSurface src, double zoomx, double zoomy, boolean smooth)
          Zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface.
static java.awt.Dimension zoomSurfaceSize(int width, int height, double zoomx, double zoomy)
          Compute the size that would be required to hold the surface after the zoom
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SDLGfx

public SDLGfx()
Method Detail

pixelColor

public static int pixelColor(SDLSurface dst,
                             int x,
                             int y,
                             long color)
pixelColor

Parameters:
dst - a SDLSurface value
x - an int value
y - an int value
color - a long value
Returns:
an int value

pixelRGBA

public static int pixelRGBA(SDLSurface dst,
                            int x,
                            int y,
                            int r,
                            int g,
                            int b,
                            int a)
pixelRGBA

Parameters:
dst - a SDLSurface value
x - a short value
y - a short value
r - a short value
g - a short value
b - a short value
a - a short value
Returns:
an int value

hlineColor

public static int hlineColor(SDLSurface dst,
                             int x1,
                             int x2,
                             int y,
                             long color)
hlineColor

Parameters:
dst - a SDLSurface value
x1 - a int value
x2 - a int value
y - a int value
color - a long value
Returns:
an int value

hlineRGBA

public static int hlineRGBA(SDLSurface dst,
                            int x1,
                            int x2,
                            int y,
                            int r,
                            int g,
                            int b,
                            int a)
hlineRGBA

Parameters:
dst - a SDLSurface value
x1 - a int value
x2 - a int value
y - a int value
r - a int value
g - a int value
b - a int value
a - a int value
Returns:
an int value

vlineColor

public static int vlineColor(SDLSurface dst,
                             int x,
                             int y1,
                             int y2,
                             long color)
vlineColor

Parameters:
dst - a SDLSurface value
x - a int value
y1 - a int value
y2 - a int value
color - a long value
Returns:
an int value

vlineRGBA

public static int vlineRGBA(SDLSurface dst,
                            int x,
                            int y1,
                            int y2,
                            int r,
                            int g,
                            int b,
                            int a)
vlineRGBA

Parameters:
dst - a SDLSurface value
x - a int value
y1 - a int value
y2 - a int value
r - a int value
g - a int value
b - a int value
a - a int value
Returns:
an int value

rectangleColor

public static int rectangleColor(SDLSurface dst,
                                 int x1,
                                 int y1,
                                 int x2,
                                 int y2,
                                 long color)
rectangleColor

Parameters:
dst - a SDLSurface value
x1 - a int value
y1 - a int value
x2 - a int value
y2 - a int value
color - a long value
Returns:
an int value

rectangleRGBA

public static int rectangleRGBA(SDLSurface dst,
                                int x1,
                                int y1,
                                int x2,
                                int y2,
                                int r,
                                int g,
                                int b,
                                int a)
rectangleRGBA

Parameters:
dst - a SDLSurface value
x1 - a int value
y1 - a int value
x2 - a int value
y2 - a int value
r - a int value
g - a int value
b - a int value
a - a int value
Returns:
an int value

boxColor

public static int boxColor(SDLSurface dst,
                           int x1,
                           int y1,
                           int x2,
                           int y2,
                           long color)
boxColor

Parameters:
dst - a SDLSurface value
x1 - a int value
y1 - a int value
x2 - a int value
y2 - a int value
color - a long value
Returns:
an int value

boxRGBA

public static int boxRGBA(SDLSurface dst,
                          int x1,
                          int y1,
                          int x2,
                          int y2,
                          int r,
                          int g,
                          int b,
                          int a)
boxRGBA

Parameters:
dst - a SDLSurface value
x1 - a int value
y1 - a int value
x2 - a int value
y2 - a int value
r - a int value
g - a int value
b - a int value
a - a int value
Returns:
an int value

lineColor

public static int lineColor(SDLSurface dst,
                            int x1,
                            int y1,
                            int x2,
                            int y2,
                            long color)
lineColor

Parameters:
dst - a SDLSurface value
x1 - a int value
y1 - a int value
x2 - a int value
y2 - a int value
color - a long value
Returns:
an int value

lineRGBA

public static int lineRGBA(SDLSurface dst,
                           int x1,
                           int y1,
                           int x2,
                           int y2,
                           int r,
                           int g,
                           int b,
                           int a)
lineRGBA

Parameters:
dst - a SDLSurface value
(short)x1 - a int value
(short)y1 - a int value
(short)x2 - a int value
(short)y2 - a int value
r - a int value
g - a int value
b - a int value
a - a int value
Returns:
an int value

aalineColor

public static int aalineColor(SDLSurface dst,
                              int x1,
                              int y1,
                              int x2,
                              int y2,
                              long color)
aalineColor

Parameters:
dst - a SDLSurface value
(short)x1 - a int value
(short)y1 - a int value
(short)x2 - a int value
(short)y2 - a int value
color - a long value
Returns:
an int value

aalineRGBA

public static int aalineRGBA(SDLSurface dst,
                             int x1,
                             int y1,
                             int x2,
                             int y2,
                             int r,
                             int g,
                             int b,
                             int a)
aalineRGBA

Parameters:
dst - a SDLSurface value
(short)x1 - a int value
(short)y1 - a int value
(short)x2 - a int value
(short)y2 - a int value
r - a int value
g - a int value
b - a int value
a - a int value
Returns:
an int value

circleColor

public static int circleColor(SDLSurface dst,
                              int x,
                              int y,
                              int r,
                              long color)
circleColor

Parameters:
dst - a SDLSurface value
x - a int value
y - a int value
r - a int value
color - a long value
Returns:
an int value

circleRGBA

public static int circleRGBA(SDLSurface dst,
                             int x,
                             int y,
                             int rad,
                             int r,
                             int g,
                             int b,
                             int a)
circleRGBA

Parameters:
dst - a SDLSurface value
x - a int value
y - a int value
rad - a int value
r - a int value
g - a int value
b - a int value
a - a int value
Returns:
an int value

aacircleColor

public static int aacircleColor(SDLSurface dst,
                                int x,
                                int y,
                                int r,
                                long color)
aacircleColor

Parameters:
dst - a SDLSurface value
x - a int value
y - a int value
r - a int value
color - a long value
Returns:
an int value

aacircleRGBA

public static int aacircleRGBA(SDLSurface dst,
                               int x,
                               int y,
                               int rad,
                               int r,
                               int g,
                               int b,
                               int a)
aacircleRGBA

Parameters:
dst - a SDLSurface value
x - a int value
y - a int value
rad - a int value
r - a int value
g - a int value
b - a int value
a - a int value
Returns:
an int value

filledCircleColor

public static int filledCircleColor(SDLSurface dst,
                                    int x,
                                    int y,
                                    int r,
                                    long color)
filledCircleColor

Parameters:
dst - a SDLSurface value
x - a int value
y - a int value
r - a int value
color - a long value
Returns:
an int value

filledCircleRGBA

public static int filledCircleRGBA(SDLSurface dst,
                                   int x,
                                   int y,
                                   int rad,
                                   int r,
                                   int g,
                                   int b,
                                   int a)
filledCircleRGBA

Parameters:
dst - a SDLSurface value
x - a int value
y - a int value
rad - a int value
r - a int value
g - a int value
b - a int value
a - a int value
Returns:
an int value

ellipseColor

public static int ellipseColor(SDLSurface dst,
                               int x,
                               int y,
                               int rx,
                               int ry,
                               long color)
ellipseColor

Parameters:
dst - a SDLSurface value
x - a int value
y - a int value
rx - a int value
ry - a int value
color - a long value
Returns:
an int value

ellipseRGBA

public static int ellipseRGBA(SDLSurface dst,
                              int x,
                              int y,
                              int rx,
                              int ry,
                              int r,
                              int g,
                              int b,
                              int a)
ellipseRGBA

Parameters:
dst - a SDLSurface value
x - a int value
y - a int value
rx - a int value
ry - a int value
r - a int value
g - a int value
b - a int value
a - a int value
Returns:
an int value

aaellipseColor

public static int aaellipseColor(SDLSurface dst,
                                 int xc,
                                 int yc,
                                 int rx,
                                 int ry,
                                 long color)
aaellipseColor

Parameters:
dst - a SDLSurface value
xc - a int value
yc - a int value
rx - a int value
ry - a int value
color - a long value
Returns:
an int value

aaellipseRGBA

public static int aaellipseRGBA(SDLSurface dst,
                                int x,
                                int y,
                                int rx,
                                int ry,
                                int r,
                                int g,
                                int b,
                                int a)
aaellipseRGBA

Parameters:
dst - a SDLSurface value
x - a int value
y - a int value
rx - a int value
ry - a int value
r - a int value
g - a int value
b - a int value
a - a int value
Returns:
an int value

filledEllipseColor

public static int filledEllipseColor(SDLSurface dst,
                                     int x,
                                     int y,
                                     int rx,
                                     int ry,
                                     long color)
filledEllipseColor

Parameters:
dst - a SDLSurface value
x - a int value
y - a int value
rx - a int value
ry - a int value
color - a long value
Returns:
an int value

filledEllipseRGBA

public static int filledEllipseRGBA(SDLSurface dst,
                                    int x,
                                    int y,
                                    int rx,
                                    int ry,
                                    int r,
                                    int g,
                                    int b,
                                    int a)
filledEllipseRGBA

Parameters:
dst - a SDLSurface value
x - a int value
y - a int value
rx - a int value
ry - a int value
r - a int value
g - a int value
b - a int value
a - a int value
Returns:
an int value

filledpieColor

public static int filledpieColor(SDLSurface dst,
                                 int x,
                                 int y,
                                 int rad,
                                 int start,
                                 int end,
                                 long color)
filledpieColor

Parameters:
dst - a SDLSurface value
x - a int value
y - a int value
rad - a int value
start - a int value
end - a int value
color - a long value
Returns:
an int value

filledpieRGBA

public static int filledpieRGBA(SDLSurface dst,
                                int x,
                                int y,
                                int rad,
                                int start,
                                int end,
                                int r,
                                int g,
                                int b,
                                int a)
filledpieRGBA

Parameters:
dst - a SDLSurface value
x - a int value
y - a int value
rad - a int value
start - a int value
end - a int value
r - a int value
g - a int value
b - a int value
a - a int value
Returns:
an int value

trigonColor

public static int trigonColor(SDLSurface dst,
                              int x1,
                              int y1,
                              int x2,
                              int y2,
                              int x3,
                              int y3,
                              long color)
trigonColor

Parameters:
dst - a SDLSurface value
(short)x1 - a int value
(short)y1 - a int value
(short)x2 - a int value
(short)y2 - a int value
x3 - a int value
y3 - a int value
color - a long value
Returns:
an int value

trigonRGBA

public static int trigonRGBA(SDLSurface dst,
                             int x1,
                             int y1,
                             int x2,
                             int y2,
                             int x3,
                             int y3,
                             int r,
                             int g,
                             int b,
                             int a)
trigonRGBA

Parameters:
dst - a SDLSurface value
(short)x1 - a int value
(short)y1 - a int value
(short)x2 - a int value
(short)y2 - a int value
x3 - a int value
y3 - a int value
r - a int value
g - a int value
b - a int value
a - a int value
Returns:
an int value

aatrigonColor

public static int aatrigonColor(SDLSurface dst,
                                int x1,
                                int y1,
                                int x2,
                                int y2,
                                int x3,
                                int y3,
                                long color)
aatrigonColor

Parameters:
dst - a SDLSurface value
(short)x1 - a int value
(short)y1 - a int value
(short)x2 - a int value
(short)y2 - a int value
x3 - a int value
y3 - a int value
color - a long value
Returns:
an int value

aatrigonRGBA

public static int aatrigonRGBA(SDLSurface dst,
                               int x1,
                               int y1,
                               int x2,
                               int y2,
                               int x3,
                               int y3,
                               int r,
                               int g,
                               int b,
                               int a)
aatrigonRGBA

Parameters:
dst - a SDLSurface value
(short)x1 - a int value
(short)y1 - a int value
(short)x2 - a int value
(short)y2 - a int value
x3 - a int value
y3 - a int value
r - a int value
g - a int value
b - a int value
a - a int value
Returns:
an int value

filledTrigonColor

public static int filledTrigonColor(SDLSurface dst,
                                    int x1,
                                    int y1,
                                    int x2,
                                    int y2,
                                    int x3,
                                    int y3,
                                    int color)
filledTrigonColor

Parameters:
dst - a SDLSurface value
(short)x1 - a int value
(short)y1 - a int value
(short)x2 - a int value
(short)y2 - a int value
x3 - a int value
y3 - a int value
color - an int value
Returns:
an int value

filledTrigonRGBA

public static int filledTrigonRGBA(SDLSurface dst,
                                   int x1,
                                   int y1,
                                   int x2,
                                   int y2,
                                   int x3,
                                   int y3,
                                   int r,
                                   int g,
                                   int b,
                                   int a)
filledTrigonRGBA

Parameters:
dst - a SDLSurface value
(short)x1 - a int value
(short)y1 - a int value
(short)x2 - a int value
(short)y2 - a int value
x3 - a int value
y3 - a int value
r - a int value
g - a int value
b - a int value
a - a int value
Returns:
an int value

polygonColor

public static int polygonColor(SDLSurface dst,
                               java.nio.ShortBuffer vx,
                               java.nio.ShortBuffer vy,
                               long color)
polygonColor

Parameters:
dst - a SDLSurface value
vx - a ShortBuffer value
vy - a ShortBuffer value
color - a long value
Returns:
an int value

polygonRGBA

public static int polygonRGBA(SDLSurface dst,
                              java.nio.ShortBuffer vx,
                              java.nio.ShortBuffer vy,
                              short r,
                              short g,
                              short b,
                              short a)
polygonRGBA

Parameters:
dst - a SDLSurface value
vx - a ShortBuffer value
vy - a ShortBuffer value
r - a int value
g - a int value
b - a int value
a - a int value
Returns:
an int value

aapolygonColor

public static int aapolygonColor(SDLSurface dst,
                                 java.nio.ShortBuffer vx,
                                 java.nio.ShortBuffer vy,
                                 long color)
aapolygonColor

Parameters:
dst - a SDLSurface value
vx - a int[] value
vy - a int[] value
n - an int value
color - a long value
Returns:
an int value

aapolygonRGBA

public static int aapolygonRGBA(SDLSurface dst,
                                java.nio.ShortBuffer vx,
                                java.nio.ShortBuffer vy,
                                short r,
                                short g,
                                short b,
                                short a)
aapolygonRGBA

Parameters:
dst - a SDLSurface value
vx - a ShortBuffer value
vy - a ShortBuffer value
r - a int value
g - a int value
b - a int value
a - a int value
Returns:
an int value

filledPolygonColor

public static int filledPolygonColor(SDLSurface dst,
                                     java.nio.ShortBuffer vx,
                                     java.nio.ShortBuffer vy,
                                     short color)
filledPolygonColor

Parameters:
dst - a SDLSurface value
vx - a ShortBuffer value
vy - a ShortBuffer value
color - an int value
Returns:
an int value

filledPolygonRGBA

public static int filledPolygonRGBA(SDLSurface dst,
                                    java.nio.ShortBuffer vx,
                                    java.nio.ShortBuffer vy,
                                    short r,
                                    short g,
                                    short b,
                                    short a)
filledPolygonRGBA

Parameters:
dst - a SDLSurface value
vx - a ShortBuffer value
vy - a ShortBuffer value
r - a int value
g - a int value
b - a int value
a - a int value
Returns:
an int value

bezierColor

public static int bezierColor(SDLSurface dst,
                              java.nio.ShortBuffer vx,
                              java.nio.ShortBuffer vy,
                              short s,
                              long color)
                       throws SDLException
bezierColor

Parameters:
dst - a SDLSurface value
vx - a ShortBuffer value
vy - a ShortBuffer value
s - an int value
color - a long value
Returns:
an int value
Throws:
SDLException - if an error occurs

bezierRGBA

public static int bezierRGBA(SDLSurface dst,
                             java.nio.ShortBuffer vx,
                             java.nio.ShortBuffer vy,
                             short s,
                             short r,
                             short g,
                             short b,
                             short a)
bezierRGBA

Parameters:
dst - a SDLSurface value
vx - a ShortBuffer value
vy - a ShortBuffer value
s - an int value
r - a int value
g - a int value
b - a int value
a - a int value
Returns:
an int value

characterColor

public static int characterColor(SDLSurface dst,
                                 int x,
                                 int y,
                                 char c,
                                 long color)
characterColor

Parameters:
dst - a SDLSurface value
x - a int value
y - a int value
c - a char value
color - a long value
Returns:
an int value

characterRGBA

public static int characterRGBA(SDLSurface dst,
                                int x,
                                int y,
                                char c,
                                int r,
                                int g,
                                int b,
                                int a)
characterRGBA

Parameters:
dst - a SDLSurface value
x - a int value
y - a int value
c - a char value
r - a int value
g - a int value
b - a int value
a - a int value
Returns:
an int value

stringColor

public static int stringColor(SDLSurface dst,
                              int x,
                              int y,
                              java.lang.String c,
                              long color)
stringColor

Parameters:
dst - a SDLSurface value
x - a int value
y - a int value
c - a String value
color - a long value
Returns:
an int value

stringRGBA

public static int stringRGBA(SDLSurface dst,
                             int x,
                             int y,
                             java.lang.String c,
                             int r,
                             int g,
                             int b,
                             int a)
stringRGBA

Parameters:
dst - a SDLSurface value
x - a int value
y - a int value
c - a String value
r - a int value
g - a int value
b - a int value
a - a int value
Returns:
an int value

rotozoomSurface

public static SDLSurface rotozoomSurface(SDLSurface src,
                                         double angle,
                                         double zoom,
                                         boolean smooth)
                                  throws SDLException
Rotates and zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'angle' is the rotation in degrees. 'zoom' a scaling factor. If 'smooth' is true 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.

Parameters:
src - a SDLSurface value
angle - a double value
zoom - a double value
smooth - an int value
Returns:
a SDLSurface value
Throws:
SDLException - if an error occurs

rotozoomSurfaceSize

public static java.awt.Dimension rotozoomSurfaceSize(int width,
                                                     int height,
                                                     double angle,
                                                     double zoom)
                                              throws SDLException
Compute the size that would be required to hold the surface after the zoom

Parameters:
width - an int value
height - an int value
angle - a double value
zoom - a double value
Returns:
a Dimension value
Throws:
SDLException - if an error occurs

zoomSurface

public static SDLSurface zoomSurface(SDLSurface src,
                                     double zoomx,
                                     double zoomy,
                                     boolean smooth)
                              throws SDLException
Zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'zoomx' and 'zoomy' are scaling factors for width and height. If 'smooth' is true 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.

Parameters:
src - a SDLSurface value
zoomx - a double value
zoomy - a double value
smooth - an int value
Returns:
a SDLSurface value
Throws:
SDLException - if an error occurs

zoomSurfaceSize

public static java.awt.Dimension zoomSurfaceSize(int width,
                                                 int height,
                                                 double zoomx,
                                                 double zoomy)
                                          throws SDLException
Compute the size that would be required to hold the surface after the zoom

Parameters:
width - an int value
height - an int value
zoomx - a double value
zoomy - a double value
Returns:
Throws:
SDLException - if an error occurs