Main Page | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Data Fields

sdl4gcj::video::Surface Class Reference

Inheritance diagram for sdl4gcj::video::Surface:

Inheritance graph
[legend]
Collaboration diagram for sdl4gcj::video::Surface:

Collaboration graph
[legend]

Public Member Functions

 Surface (int flags, int width, int height, int bpp, int rmask, int gmask, int bmask, int amask)
native int getFlags ()
 gets video flags.
native int getW ()
 gets width.
native int getH ()
 gets height.
native int getPitch ()
 gets byte per line.
native void saveBMP (String filePath)
 Save an SDL_Surface as a Windows BMP file.
void saveBMP (File file)
 Save an SDL_Surface as a Windows BMP file.
native int blitSurface (Surface surface, int sx, int sy, int sw, int sh, int dx, int dy)
 This performs a fast blit from the surface to the reciever surface.
native int blitSurface (Surface surface, int dx, int dy)
 This performs a fast blit from the surface to the reciever surface.
native int blitSurface (Surface surface)
 This performs a fast blit from the source surface to the destination surface.
int repeatSurface (Surface surface)
 Repeat surface blitting.
native void fillRect (int sx, int sy, int sw, int sh, int color)
 This function performs a fast fill of the given rectangle with some color.
void fillRect (Rect rect, int color)
 This function performs a fast fill of the given rectangle with some color.
native void fillRect (int color)
 This function performs a fast fill of the entire suface with some color.
native void setColorKey (int flags, int colorkey)
 Sets the color key (transparent pixel) in a blittable surface and RLE acceleration.
native void setColorKey (int flags)
 Sets the color key (transparent pixel) in a blittable surface and RLE acceleration.
void setColorKey ()
 Sets the color key (transparent pixel) in a blittable surface and RLE acceleration.
native boolean setClipRect (int x, int y, int w, int h)
 Sets the clipping rectangle for a surface.
native boolean setClipRect ()
 Sets the clipping rectangle to the full size of the surface.
native int[] getClipRect ()
 Gets the clipping rectangle for a surface.
native int setAlpha (int flags, int alpha)
 Adjust the alpha properties of a surface.
native void displayFormat ()
 Convert a surface to the display format.
native void displayForamtAlpha ()
 Convert a surface to the display format.
native void convertSurface (PixelFormat format, int flags)
 Converts a surface to the same format as another surface.
native Surface cloneSurface ()
 Clone surface.
native PixelFormat getPixelFormat ()
 Get pixel format.
native void setPalette (Color[] palette)
 Sets the colors in the palette of an 8-bit surface.
native void setPalette (Palette palette)
 Sets the colors in the palette of an 8-bit surface.
Palette getPalette ()
 Gets palette.
int mapRGB (Color color)
 Map a RGB color value to a pixel format.
int mapRGB (int red, int green, int blue)
 Map a RGB color value to a pixel format.
int mapRGBA (Color color)
 Map a RGBA color value to a pixel format.
int mapRGBA (int red, int green, int blue, int alpha)
 Map a RGBA color value to a pixel format.
int[] getRGB (int pixel)
 Get RGB values from a pixel in the specified pixel format.
int[] getRGBA (int pixel)
 Get RGBA values from a pixel in the specified pixel format.
native byte[] getPixels ()
 Gets pixels.
native void setPixels (byte[] pixels)
 Sets pixels.
native void freeSurface ()
 Free surface.

Static Public Member Functions

static native String getVideoDriverName ()
 Obtain the name of the video driver.
static native Surface loadBMP (String filePath)
 Load a Windows BMP file into an SDL_Surface.
static Surface loadBMP (File file)
 Load a Windows BMP file into an SDL_Surface.
static native Surface loadBMP (byte[] bytes, int offset, int length)
 Load a Windows BMP from byte array into an SDL_Surface.
static Surface loadBMP (byte[] bytes)
 Load a Windows BMP from byte array into an SDL_Surface.
static Surface loadBMP (InputStream inputStream)
 Load a Windows BMP from inputStream array into an SDL_Surface.
static Surface createRGBSurface (int flags, int width, int height, int bpp, int rmask, int gmask, int bmask, int amask)
 Create an empty SDL_Surface.

Protected Member Functions

 Surface ()
void finalize () throws Throwable

Protected Attributes

gnu.gcj.RawData implementation = null
PixelFormat format = null
byte[] pixelArray = null

Private Member Functions

native void initWithRGBSurface (int flags, int width, int height, int bpp, int rmask, int gmask, int bmask, int amask)

Constructor & Destructor Documentation

sdl4gcj::video::Surface::Surface  )  [inline, protected]
 

sdl4gcj::video::Surface::Surface int  flags,
int  width,
int  height,
int  bpp,
int  rmask,
int  gmask,
int  bmask,
int  amask
[inline]
 


Member Function Documentation

native int sdl4gcj::video::Surface::blitSurface Surface  surface  ) 
 

This performs a fast blit from the source surface to the destination surface.

The entire surface is copied. SDL_BlitSurface() wrapper.

Parameters:
surface source surface

native int sdl4gcj::video::Surface::blitSurface Surface  surface,
int  dx,
int  dy
 

This performs a fast blit from the surface to the reciever surface.

The entire surface is copied. SDL_BlitSurface() wrapper.

Parameters:
surface source surface
dx destination rectangle's x
dy destination rectangle's y

native int sdl4gcj::video::Surface::blitSurface Surface  surface,
int  sx,
int  sy,
int  sw,
int  sh,
int  dx,
int  dy
 

This performs a fast blit from the surface to the reciever surface.

SDL_BlitSurface() wrapper.

Parameters:
surface source surface
sx source rectangle's x
sy source rectangle's y
sw source rectangle's width
sh source rectangle's height
dx destination rectangle's x
dy destination rectangle's y

native Surface sdl4gcj::video::Surface::cloneSurface  ) 
 

Clone surface.

SDL_ConvertSurface() wrapper.

native void sdl4gcj::video::Surface::convertSurface PixelFormat  format,
int  flags
 

Converts a surface to the same format as another surface.

SDL_ConvertSurface() wrapper.

Reimplemented in sdl4gcj::video::Screen.

static Surface sdl4gcj::video::Surface::createRGBSurface int  flags,
int  width,
int  height,
int  bpp,
int  rmask,
int  gmask,
int  bmask,
int  amask
[inline, static]
 

Create an empty SDL_Surface.

SDL_CreateRGBSurface() wrapper.

native void sdl4gcj::video::Surface::displayForamtAlpha  ) 
 

Convert a surface to the display format.

SDL_DisplayFormatAlpha() wrapper.

native void sdl4gcj::video::Surface::displayFormat  ) 
 

Convert a surface to the display format.

SDL_DisplayFormat() wrapper.

native void sdl4gcj::video::Surface::fillRect int  color  ) 
 

This function performs a fast fill of the entire suface with some color.

SDL_FillRect() wrapper.

void sdl4gcj::video::Surface::fillRect Rect  rect,
int  color
[inline]
 

This function performs a fast fill of the given rectangle with some color.

SDL_FillRect() wrapper.

native void sdl4gcj::video::Surface::fillRect int  sx,
int  sy,
int  sw,
int  sh,
int  color
 

This function performs a fast fill of the given rectangle with some color.

SDL_FillRect() wrapper.

void sdl4gcj::video::Surface::finalize  )  throws Throwable [inline, protected]
 

native void sdl4gcj::video::Surface::freeSurface  ) 
 

Free surface.

SDL_FreeSurface() wrapper.

Reimplemented in sdl4gcj::video::Screen.

native int [] sdl4gcj::video::Surface::getClipRect  ) 
 

Gets the clipping rectangle for a surface.

SDL_GetClipRect() wrapper.

native int sdl4gcj::video::Surface::getFlags  ) 
 

gets video flags.

native int sdl4gcj::video::Surface::getH  ) 
 

gets height.

Palette sdl4gcj::video::Surface::getPalette  )  [inline]
 

Gets palette.

native int sdl4gcj::video::Surface::getPitch  ) 
 

gets byte per line.

native PixelFormat sdl4gcj::video::Surface::getPixelFormat  ) 
 

Get pixel format.

native byte [] sdl4gcj::video::Surface::getPixels  ) 
 

Gets pixels.

int [] sdl4gcj::video::Surface::getRGB int  pixel  )  [inline]
 

Get RGB values from a pixel in the specified pixel format.

SDL_GetRGB() wrapper.

int [] sdl4gcj::video::Surface::getRGBA int  pixel  )  [inline]
 

Get RGBA values from a pixel in the specified pixel format.

SDL_GetRGBA() wrapper.

static native String sdl4gcj::video::Surface::getVideoDriverName  )  [static]
 

Obtain the name of the video driver.

SDL_VideoDriverName() wrapper.

native int sdl4gcj::video::Surface::getW  ) 
 

gets width.

native void sdl4gcj::video::Surface::initWithRGBSurface int  flags,
int  width,
int  height,
int  bpp,
int  rmask,
int  gmask,
int  bmask,
int  amask
[private]
 

static Surface sdl4gcj::video::Surface::loadBMP InputStream  inputStream  )  [inline, static]
 

Load a Windows BMP from inputStream array into an SDL_Surface.

SDL_LoadBMP_RW() wrapper.

static Surface sdl4gcj::video::Surface::loadBMP byte[]  bytes  )  [inline, static]
 

Load a Windows BMP from byte array into an SDL_Surface.

This is same as loadBMP(bytes, 0, bytes.length); SDL_LoadBMP_RW() wrapper.

static native Surface sdl4gcj::video::Surface::loadBMP byte[]  bytes,
int  offset,
int  length
[static]
 

Load a Windows BMP from byte array into an SDL_Surface.

SDL_LoadBMP_RW() wrapper.

static Surface sdl4gcj::video::Surface::loadBMP File  file  )  [inline, static]
 

Load a Windows BMP file into an SDL_Surface.

SDL_LoadBMP(const char* filePath) wrapper.

static native Surface sdl4gcj::video::Surface::loadBMP String  filePath  )  [static]
 

Load a Windows BMP file into an SDL_Surface.

SDL_LoadBMP(const char* filePath) wrapper.

int sdl4gcj::video::Surface::mapRGB int  red,
int  green,
int  blue
[inline]
 

Map a RGB color value to a pixel format.

SDL_MapRGB()

int sdl4gcj::video::Surface::mapRGB Color  color  )  [inline]
 

Map a RGB color value to a pixel format.

SDL_MapRGB()

int sdl4gcj::video::Surface::mapRGBA int  red,
int  green,
int  blue,
int  alpha
[inline]
 

Map a RGBA color value to a pixel format.

SDL_MapRGBA() wrapper.

int sdl4gcj::video::Surface::mapRGBA Color  color  )  [inline]
 

Map a RGBA color value to a pixel format.

SDL_MapRGBA() wrapper.

int sdl4gcj::video::Surface::repeatSurface Surface  surface  )  [inline]
 

Repeat surface blitting.

SDL_BlitSurface() wrapper.

void sdl4gcj::video::Surface::saveBMP File  file  )  [inline]
 

Save an SDL_Surface as a Windows BMP file.

SDL_SaveBMP() wrapper.

native void sdl4gcj::video::Surface::saveBMP String  filePath  ) 
 

Save an SDL_Surface as a Windows BMP file.

SDL_SaveBMP() wrapper.

native int sdl4gcj::video::Surface::setAlpha int  flags,
int  alpha
 

Adjust the alpha properties of a surface.

SDL_SetAlpha() wrapper.

native boolean sdl4gcj::video::Surface::setClipRect  ) 
 

Sets the clipping rectangle to the full size of the surface.

SDL_SetClipRect() wrapper.

native boolean sdl4gcj::video::Surface::setClipRect int  x,
int  y,
int  w,
int  h
 

Sets the clipping rectangle for a surface.

SDL_SetClipRect() wrapper.

void sdl4gcj::video::Surface::setColorKey  )  [inline]
 

Sets the color key (transparent pixel) in a blittable surface and RLE acceleration.

SDL_SetColorKey() wrapper.

native void sdl4gcj::video::Surface::setColorKey int  flags  ) 
 

Sets the color key (transparent pixel) in a blittable surface and RLE acceleration.

SDL_SetColorKey() wrapper.

native void sdl4gcj::video::Surface::setColorKey int  flags,
int  colorkey
 

Sets the color key (transparent pixel) in a blittable surface and RLE acceleration.

SDL_SetColorKey() wrapper.

native void sdl4gcj::video::Surface::setPalette Palette  palette  ) 
 

Sets the colors in the palette of an 8-bit surface.

SDL_SetPalette() wrapper.

native void sdl4gcj::video::Surface::setPalette Color[]  palette  ) 
 

Sets the colors in the palette of an 8-bit surface.

SDL_SetPalette() wrapper.

native void sdl4gcj::video::Surface::setPixels byte[]  pixels  ) 
 

Sets pixels.


Field Documentation

PixelFormat sdl4gcj::video::Surface::format = null [protected]
 

gnu.gcj.RawData sdl4gcj::video::Surface::implementation = null [protected]
 

byte [] sdl4gcj::video::Surface::pixelArray = null [protected]
 


The documentation for this class was generated from the following file:
Generated on Sat Sep 10 20:28:36 2005 for sdl4gcj by  doxygen 1.4.3