sdl.test.gui
Class GUIGraphics

java.lang.Object
  |
  +--sdl.test.gui.GUIGraphics

public class GUIGraphics
extends java.lang.Object

for gui demo - unfinished, Rudimentary prototype for SDL implementation of a java.awt.Graphics object. The immediate goal is SDLComponent, SDLContainer, SDLFont, etc. The ultimate goal is an SDL port of awt and swing. (Estimated time frame is 2 months.) discovered 2 issues - something funny going on with color in different video modes - native JNI fillRect doesn't work Scott Straw 08/02/02


Constructor Summary
GUIGraphics()
           
 
Method Summary
 void blitSurface(sdl.video.SDLSurface sourceSurface, sdl.video.SDLRect srcRect, sdl.video.SDLRect destRect)
          blits src surface onto the current video surface.
 GUIGraphics create()
           
 void drawLine(int x1, int y1, int x2, int y2)
           
 void drawRect(int x, int y, int width, int height)
           
 void drawString(java.lang.String str, int x, int y)
           
 void fill3DRect(int x, int y, int width, int height, boolean raised)
           
 void fill3DRect(java.awt.Rectangle r)
           
 void fillRect(int x1, int y1, int width, int height)
           
 void fillRectNative(int x1, int y1, int width, int height)
           
 java.awt.Color getColor()
           
 sdl.video.SDLSurface getSDLSurface()
           
 void setColor(java.awt.Color c)
           
 void setSDLSurface(sdl.video.SDLSurface sdlVideoSurface)
          END basic java.awt.Graphics methods
 java.lang.String toString()
           
 void translate(int x, int y)
          begin basic java.awt.Graphics methods
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GUIGraphics

public GUIGraphics()
Method Detail

translate

public void translate(int x,
                      int y)
begin basic java.awt.Graphics methods


drawString

public void drawString(java.lang.String str,
                       int x,
                       int y)

getColor

public java.awt.Color getColor()

setColor

public void setColor(java.awt.Color c)

drawLine

public void drawLine(int x1,
                     int y1,
                     int x2,
                     int y2)

drawRect

public void drawRect(int x,
                     int y,
                     int width,
                     int height)

fillRect

public void fillRect(int x1,
                     int y1,
                     int width,
                     int height)

fillRectNative

public void fillRectNative(int x1,
                           int y1,
                           int width,
                           int height)

fill3DRect

public void fill3DRect(java.awt.Rectangle r)

fill3DRect

public void fill3DRect(int x,
                       int y,
                       int width,
                       int height,
                       boolean raised)

create

public GUIGraphics create()

setSDLSurface

public void setSDLSurface(sdl.video.SDLSurface sdlVideoSurface)
END basic java.awt.Graphics methods


getSDLSurface

public sdl.video.SDLSurface getSDLSurface()

blitSurface

public void blitSurface(sdl.video.SDLSurface sourceSurface,
                        sdl.video.SDLRect srcRect,
                        sdl.video.SDLRect destRect)
blits src surface onto the current video surface. This is useful in working with offscreen images TO DO: clipping rects


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object