public class NinePatch extends Object
| Constructor and Description |
|---|
NinePatch(BufferedImage img)
Builds a NinePatch based on the given image.
|
NinePatch(BufferedImage img,
Rectangle center,
Rectangle content)
Builds a NinePatch based on the given image.
|
| Modifier and Type | Method and Description |
|---|---|
Rectangle |
getBoundsSurrounding(Rectangle content)
Returns a rectangle describing the bounds of this NinePatch when drawn such that it frames
the given content rectangle.
|
void |
paint(Graphics2D gfx,
Rectangle location) |
public NinePatch(BufferedImage img)
public NinePatch(BufferedImage img, Rectangle center, Rectangle content)
center - specifies the stretchable center of the image.content - if non-null, specifies the usable content area of the imagepublic void paint(Graphics2D gfx, Rectangle location)
Copyright © 2015. All rights reserved.