|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.game.Juzzle.PuzzlePaint
puzzle paint return the part of the whole image to draw.
Paint,
PaintContext| Field Summary | |
protected java.awt.image.BufferedImage |
bimage
the reference to the whole image |
protected java.awt.Rectangle |
userBounds
help variable |
protected java.awt.Rectangle |
viewRect
the part of the image rectangle |
| Fields inherited from interface java.awt.Transparency |
BITMASK, OPAQUE, TRANSLUCENT |
| Constructor Summary | |
PuzzlePaint(java.awt.image.BufferedImage textur,
java.awt.Rectangle viewRect)
simply constructor. |
|
| Method Summary | |
java.awt.PaintContext |
createContext(java.awt.image.ColorModel cm,
java.awt.Rectangle deviceBounds,
java.awt.geom.Rectangle2D userBounds,
java.awt.geom.AffineTransform xform,
java.awt.RenderingHints hints)
get the PaintContext of this Paint |
void |
dispose()
destroy the Paint, not needed in Juzzle |
java.awt.image.ColorModel |
getColorModel()
the ColorModel of this Paint, it's the same the puzzle image |
java.awt.image.Raster |
getRaster(int x,
int y,
int w,
int h)
return the part of the image to draw |
int |
getTransparency()
has this Paint transparent parts or not |
void |
setViewRect(java.awt.Rectangle viewRect)
set a new rectangle for this piece, needed if two pieces comes together |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.awt.image.BufferedImage bimage
protected java.awt.Rectangle viewRect
protected java.awt.Rectangle userBounds
| Constructor Detail |
public PuzzlePaint(java.awt.image.BufferedImage textur,
java.awt.Rectangle viewRect)
textur - the puzzle imageviewRect - the rectangle for this piece| Method Detail |
public void setViewRect(java.awt.Rectangle viewRect)
viewRect - the new rectangle for this piece
public java.awt.PaintContext createContext(java.awt.image.ColorModel cm,
java.awt.Rectangle deviceBounds,
java.awt.geom.Rectangle2D userBounds,
java.awt.geom.AffineTransform xform,
java.awt.RenderingHints hints)
createContext in interface java.awt.PaintPaint,
PaintContextpublic int getTransparency()
getTransparency in interface java.awt.TransparencyPaintpublic void dispose()
dispose in interface java.awt.PaintContextPaintContextpublic java.awt.image.ColorModel getColorModel()
getColorModel in interface java.awt.PaintContextPaintContext
public java.awt.image.Raster getRaster(int x,
int y,
int w,
int h)
getRaster in interface java.awt.PaintContextPaintContext
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||