Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.libsdl.video: Javadoc index of package org.libsdl.video.


Package Samples:

org.libsdl.video

Classes:

SDLPixelFormat: The SDLPixelFormat class represents an SDL_PixelFormat C struct. The class extends SDLStruct and thus represents a native C structure. The SDLPixelFormat class typically represents the properties of an SDLSurface , such as bit depth, palette, masks, and shifts (to name a few). A SDLPixelFormat cannot be instantiated directly. It must be created by the surface that it represents. ------ EXAMPLE ------ SDL sdl = SDL.getInstance(); SDLVideo video = sdl.getVideo(); SDLVideoInfo vidinfo = video.getVideoInfo(); SDLPixelFormat format = vidinfo.getPixelFormat(); short bpp = format.bitsPerPixel(); // etc... ...
SDLSurface: The SDLSurface class represents an SDL_Surface C struct. The class extends SDLStruct and thus represents a native C structure. A surface can be created in many ways in SDL. For example, rendering TrueType fonts will create a surface. Loading an image from a file with create a surface. Surfaces can be modified directly by manipulating the pixel data. In addition they can be modified by blitting other surfaces onto them. ------ EXAMPLE ------ TTFFont font = ... // create a font SDLColor color = ... // create a color SDLSurface fontSurface = font.renderTextBlended("Hello World", color); ------ EXAMPLE ...
SDLScreen: The SDLScreen class extends SDLSurface which extends SDLStruct and thus it represents a native C structure. In particular, the SDLScreen class represents the visible SDL surface. A SDLScreen cannot be instantiated directly. It is created and returned by the SDLVideo object. ------ EXAMPLE ------ SDL sdl = SDL.getInstance(); SDLVideo video = sdl.getVideo(); // Create a screen that is 640x480 at 32 bpp fullscreen SDLScreen screen = video.setVideoMode(640, 480, 32, SDLVideo.SDL_FULLSCREEN); ... // do some drawing and stuff screen.flip(); // would probably be in a loop normally
SDLRGBA: The SDLColor class represents an RGB color. The class encompasses a color that has red, green, and blue short components to it. ------ EXAMPLE ------ // Creates SDLRGBA objects with 50% transparency SDLRGBA red = new SDLRGBA(255, 0, 0, 128); SDLRGBA green = new SDLRGBA(0, 255, 0, 128); SDLRGBA blue = new SDLRGBA(0, 0, 255, 128); ------ EXAMPLE ------ int pixel = ... // get a 32 bit integer pixel value SDLPixelFormat format = ... // get pixel format (from SDLSurface maybe) SDLRGBA rgba = format.getRGBA(pixel);
SDLRGB: The SDLColor class represents an RGB color. The class encompasses a color that has red, green, and blue short components to it. ------ EXAMPLE ------ SDLRGB red = new SDLRGB(255, 0, 0); SDLRGB green = new SDLRGB(0, 255, 0); SDLRGB blue = new SDLRGB(0, 0, 255); ------ EXAMPLE ------ int pixel = ... // get a 32 bit integer pixel value SDLPixelFormat format = ... // get pixel format (from SDLSurface maybe) SDLRGB rgb = format.getRGB(pixel);
SDLVideo: The SDLVideo class is simply a convenient class that bundles together the various video related SDL functions. It contains those functions that aren't directly associated with a specific SDL object. The only way to obtain a SDLVideo object is to ask the SDL singleton for it. ------ EXAMPLE ------ SDL sdl = SDL.getInstance(); sdl.init(SDL.SDL_INIT_VIDEO); SDLVideo video = sdl.getVideo(); ... // do whatever you want with the video object
SDLColor: The SDLColor class represents an RGB color. The class encompasses a color that has red, green, and blue short components to it. ------ EXAMPLE ------ SDLColor red = new SDLColor(255, 0, 0); SDLColor green = new SDLColor(0, 255, 0); SDLColor blue = new SDLColor(0, 0, 255);
SDLVideoInfo: The SDLVideoInfo class represents an SDL_VideoInfo C struct. The class extends SDLStruct and thus represents a native C structure. The video info structure contains information about the capabilities of the video hardware.
SDLPalette: The SDLPalette class represents an SDL_Palette C struct. The class extends SDLStruct and thus represents a native C structure. The C structure is basically an array of colors that make up a palette.
SDLRect: The SDLRect class does not directly represent an SDL_rect C structure. Instead, it is a pure Java object that must be converted to a native representation on the fly when needed.

Home | Contact Us | Privacy Policy | Terms of Service