| |
|
| java.lang.Object java.awt.TexturePaint
TexturePaint | public class TexturePaint implements Paint(Code) | | The TexturePaint class provides a way to fill a
Shape with a texture that is specified as
a
BufferedImage . The size of the BufferedImage
object should be small because the BufferedImage data
is copied by the TexturePaint object.
At construction time, the texture is anchored to the upper
left corner of a
Rectangle2D that is
specified in user space. Texture is computed for
locations in the device space by conceptually replicating the
specified Rectangle2D infinitely in all directions
in user space and mapping the BufferedImage to each
replicated Rectangle2D .
See Also: Paint See Also: Graphics2D.setPaint version: 1.48, 06/05/07 |
TexturePaint | public TexturePaint(BufferedImage txtr, Rectangle2D anchor)(Code) | | Constructs a TexturePaint object.
Parameters: txtr - the BufferedImage object with the textureused for painting Parameters: anchor - the Rectangle2D in user space used toanchor and replicate the texture |
createContext | public PaintContext createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints)(Code) | | Creates and returns a context used to generate the color pattern.
Parameters: cm - the ColorModel that receives thePaint data. This is used only as a hint. Parameters: deviceBounds - the device space bounding box of the graphicsprimitive being rendered Parameters: userBounds - the user space bounding box of the graphicsprimitive being rendered Parameters: xform - the AffineTransform from user spaceinto device space Parameters: hints - a RenderingHints object that can be used tospecify how the pattern is ultimately rendered the PaintContext used for generating colorpatterns. See Also: PaintContext |
getAnchorRect | public Rectangle2D getAnchorRect()(Code) | | Returns a copy of the anchor rectangle which positions and
sizes the textured image.
the Rectangle2D used to anchor andsize this TexturePaint . |
getImage | public BufferedImage getImage()(Code) | | Returns the BufferedImage texture used to
fill the shapes.
a BufferedImage . |
getTransparency | public int getTransparency()(Code) | | Returns the transparency mode for this TexturePaint .
the transparency mode for this TexturePaint as an integer value. See Also: Transparency |
|
|
|