org.xwt.plat
Class X11.X11PixelBuffer

java.lang.Object
  extended byorg.xwt.PixelBuffer
      extended byorg.xwt.plat.X11.X11PixelBuffer
Enclosing class:
X11

public static class X11.X11PixelBuffer
extends PixelBuffer

An X11PixelBuffer is implemented as an X11 pixmap. "Normal" PixelBuffers will use XShm shared pixmaps if available. X11PixelBuffers created to accelerate Pictures with all-or-nothing alpha will not use shared pixmaps, however (since they are only written to once.


Constructor Summary
X11.X11PixelBuffer(int w, int h)
          PixelBuffer mode
X11.X11PixelBuffer(int w, int h, boolean shared_pixmap)
           
 
Method Summary
 void createStipple(X11.X11Picture xpi)
          Sets the PixelBuffer's internal stipple to the alpha==0x00 regions of xpi
 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 rgb)
          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 fastDrawPicture(Picture source, int dx, int dy, int cx1, int cy1, int cx2, int cy2)
          fast path for image drawing (no scaling, all-or-nothing alpha)
 void fillRect(int x, int y, int x2, int y2, int color)
           
 void fillTrapezoid(int x1, int x2, int y1, int x3, int x4, int y2, int argb)
          fill a trapezoid whose top and bottom edges are horizontal
 void finalize()
           
 int getHeight()
           
 int getWidth()
           
 void natInit()
           
 void slowDrawPicture(Picture source, int dx, int dy, int cx1, int cy1, int cx2, int cy2, int rgb, boolean alphaOnly)
          slow path for image drawing
 
Methods inherited from class org.xwt.PixelBuffer
drawLine
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

X11.X11PixelBuffer

public X11.X11PixelBuffer(int w,
                          int h)
PixelBuffer mode


X11.X11PixelBuffer

public X11.X11PixelBuffer(int w,
                          int h,
                          boolean shared_pixmap)
Method Detail

createStipple

public void createStipple(X11.X11Picture xpi)
Sets the PixelBuffer's internal stipple to the alpha==0x00 regions of xpi


drawPictureAlphaOnly

public void drawPictureAlphaOnly(Picture source,
                                 int dx,
                                 int dy,
                                 int cx1,
                                 int cy1,
                                 int cx2,
                                 int cy2,
                                 int rgb)
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

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

fastDrawPicture

public void fastDrawPicture(Picture source,
                            int dx,
                            int dy,
                            int cx1,
                            int cy1,
                            int cx2,
                            int cy2)
fast path for image drawing (no scaling, all-or-nothing alpha)


slowDrawPicture

public void slowDrawPicture(Picture source,
                            int dx,
                            int dy,
                            int cx1,
                            int cy1,
                            int cx2,
                            int cy2,
                            int rgb,
                            boolean alphaOnly)
slow path for image drawing


getWidth

public int getWidth()

getHeight

public int getHeight()

natInit

public void natInit()

fillRect

public void fillRect(int x,
                     int y,
                     int x2,
                     int y2,
                     int color)

finalize

public void finalize()

fillTrapezoid

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

Specified by:
fillTrapezoid in class PixelBuffer