java.awt
public class TexturePaint extends Object implements Paint
BITMASK, OPAQUE, TRANSLUCENT
Constructor and Description |
---|
TexturePaint(BufferedImage texture,
Rectangle2D anchor)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public TexturePaint(BufferedImage texture, Rectangle2D anchor)
texture
- - the textureanchor
- - the shapepublic 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 renderedpublic int getTransparency()
getTransparency
in interface Transparency