|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.TexturePaint
public class TexturePaint
This class provides a way to fill a Shape with a texture that is specified by a BufferedImage.
Field Summary |
---|
Fields inherited from interface java.awt.Transparency |
---|
BITMASK, OPAQUE, TRANSLUCENT |
Constructor Summary | |
---|---|
TexturePaint(BufferedImage texture,
Rectangle2D anchor)
Constructor. |
Method Summary | |
---|---|
PaintContext |
createContext(ColorModel cm,
Rectangle deviceBounds,
Rectangle2D userBounds,
AffineTransform xform,
RenderingHints hints)
Creates the context used to paint the texture. |
Rectangle2D |
getAnchorRect()
Gets the shape anchor. |
BufferedImage |
getImage()
Gets the texture image. |
int |
getTransparency()
Returns the transparency mode. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TexturePaint(BufferedImage texture, Rectangle2D anchor)
texture
- - the textureanchor
- - the shapeMethod Detail |
---|
public BufferedImage getImage()
public Rectangle2D getAnchorRect()
public PaintContext createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints)
createContext
in interface Paint
cm
- - the ColorModel that receives the Paint data. Used only as a hint.deviceBounds
- - the device space being rendered.userBounds
- - the user space being renderedxform
- - the AffineTransform from user space into device spacehints
- - a RenderingHints object that is used to specify how the
pattern is rendered
public int getTransparency()
getTransparency
in interface Transparency
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |