org.xwt
Class Surface.DoubleBufferedSurface

java.lang.Object
  extended byorg.xwt.PixelBuffer
      extended byorg.xwt.Surface
          extended byorg.xwt.Surface.DoubleBufferedSurface
Direct Known Subclasses:
AWT.AWTSurface, Win32.Win32Surface, X11.X11Surface
Enclosing class:
Surface

public abstract static class Surface.DoubleBufferedSurface
extends Surface


Nested Class Summary
 
Nested classes inherited from class org.xwt.Surface
Surface.DoubleBufferedSurface, Surface.SimpleMessage
 
Field Summary
 
Fields inherited from class org.xwt.Surface
allSurfaces, alt, button1, button2, button3, control, cursor, maximized, minimized, mousex, mousey, root, shift
 
Constructor Summary
Surface.DoubleBufferedSurface(Box root)
           
 
Method Summary
abstract  void blit(PixelBuffer source, int sx, int sy, int dx, int dy, int dx2, int dy2)
          copies a region from the doublebuffer to this surface
 void Dirty(int x, int y, int w, int h)
          This is how subclasses signal a 'shallow dirty', indicating that although the backbuffer is valid, the screen is not
 void drawPicture(Picture source, int dx, int dy, int cx1, int cy1, int cx2, int cy2)
          draw the picture at (dx1, dy1), cropping to (cx1, cy1, cx2, cy2)
 void drawPictureAlphaOnly(Picture source, int dx, int dy, int cx1, int cy1, int cx2, int cy2, int argb)
          Same as drawPicture, but only uses the alpha channel of the Picture, and is allowed to destructively modify the RGB channels of the Picture in the process.
 void fillTrapezoid(int x1, int x2, int y1, int x3, int x4, int y2, int color)
          fill a trapezoid whose top and bottom edges are horizontal
 void render_()
           
 void render()
          runs the prerender() and render() pipelines in the root Box to regenerate the backbuffer, then blits it to the screen
 
Methods inherited from class org.xwt.Surface
_dispose, _setMaximized, _setMinimized, _setSize, Click, Close, dirty, dispose, DoubleClick, Focused, getHeight, getWidth, KeyPressed, KeyReleased, Maximized, Minimized, Move, PosChange, Press, Refresh, Release, setIcon, setInvisible, setLimits, setLocation, setMaximized, setMinimized, setSize, setTitleBarText, SizeChange, syncCursor, toBack, toFront
 
Methods inherited from class org.xwt.PixelBuffer
drawLine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Surface.DoubleBufferedSurface

public Surface.DoubleBufferedSurface(Box root)
Method Detail

drawPicture

public void drawPicture(Picture source,
                        int dx,
                        int dy,
                        int cx1,
                        int cy1,
                        int cx2,
                        int cy2)
Description copied from class: PixelBuffer
draw the picture at (dx1, dy1), cropping to (cx1, cy1, cx2, cy2)

Specified by:
drawPicture in class PixelBuffer

drawPictureAlphaOnly

public void drawPictureAlphaOnly(Picture source,
                                 int dx,
                                 int dy,
                                 int cx1,
                                 int cy1,
                                 int cx2,
                                 int cy2,
                                 int argb)
Description copied from class: PixelBuffer
Same as drawPicture, but only uses the alpha channel of the Picture, and is allowed to destructively modify the RGB channels of the Picture in the process. This method may assume that the RGB channels of the image are all zero IFF it restores this invariant before returning.

Specified by:
drawPictureAlphaOnly in class PixelBuffer

fillTrapezoid

public void fillTrapezoid(int x1,
                          int x2,
                          int y1,
                          int x3,
                          int x4,
                          int y2,
                          int color)
Description copied from class: PixelBuffer
fill a trapezoid whose top and bottom edges are horizontal

Specified by:
fillTrapezoid in class PixelBuffer

render

public void render()
Description copied from class: Surface
runs the prerender() and render() pipelines in the root Box to regenerate the backbuffer, then blits it to the screen

Overrides:
render in class Surface

render_

public void render_()

Dirty

public final void Dirty(int x,
                        int y,
                        int w,
                        int h)
This is how subclasses signal a 'shallow dirty', indicating that although the backbuffer is valid, the screen is not


blit

public abstract void blit(PixelBuffer source,
                          int sx,
                          int sy,
                          int dx,
                          int dy,
                          int dx2,
                          int dy2)
copies a region from the doublebuffer to this surface