|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sdljavax.gfx.SDLGfx
public class SDLGfx
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.
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 |
---|
public SDLGfx()
Method Detail |
---|
public static int pixelColor(SDLSurface dst, int x, int y, long color)
pixelColor
dst
- a SDLSurface
valuex
- an int
valuey
- an int
valuecolor
- a long
value
int
valuepublic static int pixelRGBA(SDLSurface dst, int x, int y, int r, int g, int b, int a)
pixelRGBA
dst
- a SDLSurface
valuex
- a short
valuey
- a short
valuer
- a short
valueg
- a short
valueb
- a short
valuea
- a short
value
int
valuepublic static int hlineColor(SDLSurface dst, int x1, int x2, int y, long color)
hlineColor
dst
- a SDLSurface
valuex1
- a int
valuex2
- a int
valuey
- a int
valuecolor
- a long
value
int
valuepublic static int hlineRGBA(SDLSurface dst, int x1, int x2, int y, int r, int g, int b, int a)
hlineRGBA
dst
- a SDLSurface
valuex1
- a int
valuex2
- a int
valuey
- a int
valuer
- a int
valueg
- a int
valueb
- a int
valuea
- a int
value
int
valuepublic static int vlineColor(SDLSurface dst, int x, int y1, int y2, long color)
vlineColor
dst
- a SDLSurface
valuex
- a int
valuey1
- a int
valuey2
- a int
valuecolor
- a long
value
int
valuepublic static int vlineRGBA(SDLSurface dst, int x, int y1, int y2, int r, int g, int b, int a)
vlineRGBA
dst
- a SDLSurface
valuex
- a int
valuey1
- a int
valuey2
- a int
valuer
- a int
valueg
- a int
valueb
- a int
valuea
- a int
value
int
valuepublic static int rectangleColor(SDLSurface dst, int x1, int y1, int x2, int y2, long color)
rectangleColor
dst
- a SDLSurface
valuex1
- a int
valuey1
- a int
valuex2
- a int
valuey2
- a int
valuecolor
- a long
value
int
valuepublic static int rectangleRGBA(SDLSurface dst, int x1, int y1, int x2, int y2, int r, int g, int b, int a)
rectangleRGBA
dst
- a SDLSurface
valuex1
- a int
valuey1
- a int
valuex2
- a int
valuey2
- a int
valuer
- a int
valueg
- a int
valueb
- a int
valuea
- a int
value
int
valuepublic static int boxColor(SDLSurface dst, int x1, int y1, int x2, int y2, long color)
boxColor
dst
- a SDLSurface
valuex1
- a int
valuey1
- a int
valuex2
- a int
valuey2
- a int
valuecolor
- a long
value
int
valuepublic static int boxRGBA(SDLSurface dst, int x1, int y1, int x2, int y2, int r, int g, int b, int a)
boxRGBA
dst
- a SDLSurface
valuex1
- a int
valuey1
- a int
valuex2
- a int
valuey2
- a int
valuer
- a int
valueg
- a int
valueb
- a int
valuea
- a int
value
int
valuepublic static int lineColor(SDLSurface dst, int x1, int y1, int x2, int y2, long color)
lineColor
dst
- a SDLSurface
valuex1
- a int
valuey1
- a int
valuex2
- a int
valuey2
- a int
valuecolor
- a long
value
int
valuepublic static int lineRGBA(SDLSurface dst, int x1, int y1, int x2, int y2, int r, int g, int b, int a)
lineRGBA
dst
- a SDLSurface
value(short)x1
- a int
value(short)y1
- a int
value(short)x2
- a int
value(short)y2
- a int
valuer
- a int
valueg
- a int
valueb
- a int
valuea
- a int
value
int
valuepublic static int aalineColor(SDLSurface dst, int x1, int y1, int x2, int y2, long color)
aalineColor
dst
- a SDLSurface
value(short)x1
- a int
value(short)y1
- a int
value(short)x2
- a int
value(short)y2
- a int
valuecolor
- a long
value
int
valuepublic static int aalineRGBA(SDLSurface dst, int x1, int y1, int x2, int y2, int r, int g, int b, int a)
aalineRGBA
dst
- a SDLSurface
value(short)x1
- a int
value(short)y1
- a int
value(short)x2
- a int
value(short)y2
- a int
valuer
- a int
valueg
- a int
valueb
- a int
valuea
- a int
value
int
valuepublic static int circleColor(SDLSurface dst, int x, int y, int r, long color)
circleColor
dst
- a SDLSurface
valuex
- a int
valuey
- a int
valuer
- a int
valuecolor
- a long
value
int
valuepublic static int circleRGBA(SDLSurface dst, int x, int y, int rad, int r, int g, int b, int a)
circleRGBA
dst
- a SDLSurface
valuex
- a int
valuey
- a int
valuerad
- a int
valuer
- a int
valueg
- a int
valueb
- a int
valuea
- a int
value
int
valuepublic static int aacircleColor(SDLSurface dst, int x, int y, int r, long color)
aacircleColor
dst
- a SDLSurface
valuex
- a int
valuey
- a int
valuer
- a int
valuecolor
- a long
value
int
valuepublic static int aacircleRGBA(SDLSurface dst, int x, int y, int rad, int r, int g, int b, int a)
aacircleRGBA
dst
- a SDLSurface
valuex
- a int
valuey
- a int
valuerad
- a int
valuer
- a int
valueg
- a int
valueb
- a int
valuea
- a int
value
int
valuepublic static int filledCircleColor(SDLSurface dst, int x, int y, int r, long color)
filledCircleColor
dst
- a SDLSurface
valuex
- a int
valuey
- a int
valuer
- a int
valuecolor
- a long
value
int
valuepublic static int filledCircleRGBA(SDLSurface dst, int x, int y, int rad, int r, int g, int b, int a)
filledCircleRGBA
dst
- a SDLSurface
valuex
- a int
valuey
- a int
valuerad
- a int
valuer
- a int
valueg
- a int
valueb
- a int
valuea
- a int
value
int
valuepublic static int ellipseColor(SDLSurface dst, int x, int y, int rx, int ry, long color)
ellipseColor
dst
- a SDLSurface
valuex
- a int
valuey
- a int
valuerx
- a int
valuery
- a int
valuecolor
- a long
value
int
valuepublic static int ellipseRGBA(SDLSurface dst, int x, int y, int rx, int ry, int r, int g, int b, int a)
ellipseRGBA
dst
- a SDLSurface
valuex
- a int
valuey
- a int
valuerx
- a int
valuery
- a int
valuer
- a int
valueg
- a int
valueb
- a int
valuea
- a int
value
int
valuepublic static int aaellipseColor(SDLSurface dst, int xc, int yc, int rx, int ry, long color)
aaellipseColor
dst
- a SDLSurface
valuexc
- a int
valueyc
- a int
valuerx
- a int
valuery
- a int
valuecolor
- a long
value
int
valuepublic static int aaellipseRGBA(SDLSurface dst, int x, int y, int rx, int ry, int r, int g, int b, int a)
aaellipseRGBA
dst
- a SDLSurface
valuex
- a int
valuey
- a int
valuerx
- a int
valuery
- a int
valuer
- a int
valueg
- a int
valueb
- a int
valuea
- a int
value
int
valuepublic static int filledEllipseColor(SDLSurface dst, int x, int y, int rx, int ry, long color)
filledEllipseColor
dst
- a SDLSurface
valuex
- a int
valuey
- a int
valuerx
- a int
valuery
- a int
valuecolor
- a long
value
int
valuepublic static int filledEllipseRGBA(SDLSurface dst, int x, int y, int rx, int ry, int r, int g, int b, int a)
filledEllipseRGBA
dst
- a SDLSurface
valuex
- a int
valuey
- a int
valuerx
- a int
valuery
- a int
valuer
- a int
valueg
- a int
valueb
- a int
valuea
- a int
value
int
valuepublic static int filledpieColor(SDLSurface dst, int x, int y, int rad, int start, int end, long color)
filledpieColor
dst
- a SDLSurface
valuex
- a int
valuey
- a int
valuerad
- a int
valuestart
- a int
valueend
- a int
valuecolor
- a long
value
int
valuepublic static int filledpieRGBA(SDLSurface dst, int x, int y, int rad, int start, int end, int r, int g, int b, int a)
filledpieRGBA
dst
- a SDLSurface
valuex
- a int
valuey
- a int
valuerad
- a int
valuestart
- a int
valueend
- a int
valuer
- a int
valueg
- a int
valueb
- a int
valuea
- a int
value
int
valuepublic static int trigonColor(SDLSurface dst, int x1, int y1, int x2, int y2, int x3, int y3, long color)
trigonColor
dst
- a SDLSurface
value(short)x1
- a int
value(short)y1
- a int
value(short)x2
- a int
value(short)y2
- a int
valuex3
- a int
valuey3
- a int
valuecolor
- a long
value
int
valuepublic 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
dst
- a SDLSurface
value(short)x1
- a int
value(short)y1
- a int
value(short)x2
- a int
value(short)y2
- a int
valuex3
- a int
valuey3
- a int
valuer
- a int
valueg
- a int
valueb
- a int
valuea
- a int
value
int
valuepublic static int aatrigonColor(SDLSurface dst, int x1, int y1, int x2, int y2, int x3, int y3, long color)
aatrigonColor
dst
- a SDLSurface
value(short)x1
- a int
value(short)y1
- a int
value(short)x2
- a int
value(short)y2
- a int
valuex3
- a int
valuey3
- a int
valuecolor
- a long
value
int
valuepublic 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
dst
- a SDLSurface
value(short)x1
- a int
value(short)y1
- a int
value(short)x2
- a int
value(short)y2
- a int
valuex3
- a int
valuey3
- a int
valuer
- a int
valueg
- a int
valueb
- a int
valuea
- a int
value
int
valuepublic static int filledTrigonColor(SDLSurface dst, int x1, int y1, int x2, int y2, int x3, int y3, int color)
filledTrigonColor
dst
- a SDLSurface
value(short)x1
- a int
value(short)y1
- a int
value(short)x2
- a int
value(short)y2
- a int
valuex3
- a int
valuey3
- a int
valuecolor
- an int
value
int
valuepublic 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
dst
- a SDLSurface
value(short)x1
- a int
value(short)y1
- a int
value(short)x2
- a int
value(short)y2
- a int
valuex3
- a int
valuey3
- a int
valuer
- a int
valueg
- a int
valueb
- a int
valuea
- a int
value
int
valuepublic static int polygonColor(SDLSurface dst, java.nio.ShortBuffer vx, java.nio.ShortBuffer vy, long color)
polygonColor
dst
- a SDLSurface
valuevx
- a ShortBuffer
valuevy
- a ShortBuffer
valuecolor
- a long
value
int
valuepublic static int polygonRGBA(SDLSurface dst, java.nio.ShortBuffer vx, java.nio.ShortBuffer vy, short r, short g, short b, short a)
polygonRGBA
dst
- a SDLSurface
valuevx
- a ShortBuffer
valuevy
- a ShortBuffer
valuer
- a int
valueg
- a int
valueb
- a int
valuea
- a int
value
int
valuepublic static int aapolygonColor(SDLSurface dst, java.nio.ShortBuffer vx, java.nio.ShortBuffer vy, long color)
aapolygonColor
dst
- a SDLSurface
valuevx
- a int[]
valuevy
- a int[]
valuen
- an int
valuecolor
- a long
value
int
valuepublic static int aapolygonRGBA(SDLSurface dst, java.nio.ShortBuffer vx, java.nio.ShortBuffer vy, short r, short g, short b, short a)
aapolygonRGBA
dst
- a SDLSurface
valuevx
- a ShortBuffer
valuevy
- a ShortBuffer
valuer
- a int
valueg
- a int
valueb
- a int
valuea
- a int
value
int
valuepublic static int filledPolygonColor(SDLSurface dst, java.nio.ShortBuffer vx, java.nio.ShortBuffer vy, short color)
filledPolygonColor
dst
- a SDLSurface
valuevx
- a ShortBuffer
valuevy
- a ShortBuffer
valuecolor
- an int
value
int
valuepublic static int filledPolygonRGBA(SDLSurface dst, java.nio.ShortBuffer vx, java.nio.ShortBuffer vy, short r, short g, short b, short a)
filledPolygonRGBA
dst
- a SDLSurface
valuevx
- a ShortBuffer
valuevy
- a ShortBuffer
valuer
- a int
valueg
- a int
valueb
- a int
valuea
- a int
value
int
valuepublic static int bezierColor(SDLSurface dst, java.nio.ShortBuffer vx, java.nio.ShortBuffer vy, short s, long color) throws SDLException
bezierColor
dst
- a SDLSurface
valuevx
- a ShortBuffer
valuevy
- a ShortBuffer
values
- an int
valuecolor
- a long
value
int
value
SDLException
- if an error occurspublic static int bezierRGBA(SDLSurface dst, java.nio.ShortBuffer vx, java.nio.ShortBuffer vy, short s, short r, short g, short b, short a)
bezierRGBA
dst
- a SDLSurface
valuevx
- a ShortBuffer
valuevy
- a ShortBuffer
values
- an int
valuer
- a int
valueg
- a int
valueb
- a int
valuea
- a int
value
int
valuepublic static int characterColor(SDLSurface dst, int x, int y, char c, long color)
characterColor
dst
- a SDLSurface
valuex
- a int
valuey
- a int
valuec
- a char
valuecolor
- a long
value
int
valuepublic static int characterRGBA(SDLSurface dst, int x, int y, char c, int r, int g, int b, int a)
characterRGBA
dst
- a SDLSurface
valuex
- a int
valuey
- a int
valuec
- a char
valuer
- a int
valueg
- a int
valueb
- a int
valuea
- a int
value
int
valuepublic static int stringColor(SDLSurface dst, int x, int y, java.lang.String c, long color)
stringColor
dst
- a SDLSurface
valuex
- a int
valuey
- a int
valuec
- a String
valuecolor
- a long
value
int
valuepublic static int stringRGBA(SDLSurface dst, int x, int y, java.lang.String c, int r, int g, int b, int a)
stringRGBA
dst
- a SDLSurface
valuex
- a int
valuey
- a int
valuec
- a String
valuer
- a int
valueg
- a int
valueb
- a int
valuea
- a int
value
int
valuepublic static SDLSurface rotozoomSurface(SDLSurface src, double angle, double zoom, boolean smooth) throws SDLException
src
- a SDLSurface
valueangle
- a double
valuezoom
- a double
valuesmooth
- an int
value
SDLSurface
value
SDLException
- if an error occurspublic static java.awt.Dimension rotozoomSurfaceSize(int width, int height, double angle, double zoom) throws SDLException
width
- an int
valueheight
- an int
valueangle
- a double
valuezoom
- a double
value
Dimension
value
SDLException
- if an error occurspublic static SDLSurface zoomSurface(SDLSurface src, double zoomx, double zoomy, boolean smooth) throws SDLException
src
- a SDLSurface
valuezoomx
- a double
valuezoomy
- a double
valuesmooth
- an int
value
SDLSurface
value
SDLException
- if an error occurspublic static java.awt.Dimension zoomSurfaceSize(int width, int height, double zoomx, double zoomy) throws SDLException
width
- an int
valueheight
- an int
valuezoomx
- a double
valuezoomy
- a double
value
SDLException
- if an error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |