3d6e09a0987dd8708e03dcc1df5421ad0c05aa1d
[org.ibex.core.git] / src / org / xwt / PixelBuffer.java
1 // Copyright 2003 Adam Megacz, see the COPYING file for licensing [GPL]
2 package org.xwt;
3
4 /**
5  *  <p>
6  *  A block of pixels which can be drawn on and rapidly copied to the
7  *  screen.
8  *  </p>
9  *
10  *  <p>
11  *  Implementations of the Platform class should return objects
12  *  supporting this interface from the _createPixelBuffer()
13  *  method. These implementations may choose to use off-screen video
14  *  ram for this purpose (for example, a Pixmap on X11).
15  *  </p>
16  */
17 public abstract class PixelBuffer {
18
19     /** Draw the region of source within s onto the region d on this PixelBuffer, scaling as needed */
20     public abstract void drawPicture(Picture source, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2);
21
22     /** Fill the region (x1, y1, x2, y2) with <tt>color</tt> (AARRGGBB format); the alpha channel component is ignored */
23     public abstract void fillRect(int x1, int y1, int x2, int y2, int color);
24
25     /** returns the height of the PixelBuffer */
26     public abstract int getHeight();
27
28     /** returns the width of the PixelBuffer */
29     public abstract int getWidth();
30
31 }