- Enclosing interface:
GraphicsUtils
Allows to permanently install a rectangular maximum clip that
cannot be extended with setClip.
This is similar to
sun.awt.ConstrainableGraphics
,
but allows floating-point coordinates.-
Method Summary
Modifier and TypeMethodDescriptionvoid
constrain
(int x, int y, int w, int h) Constrain this graphics object to have a permanent device space origin of (x, y) and a permanent maximum clip of (x,y,w,h).void
constrain
(Rectangle2D region) Constrain this graphics object to have a permanent device space origin of (x, y) and a permanent maximum clip of (x,y,w,h).Destination that this Graphics renders to.
-
Method Details
-
getDestination
Object getDestination()Destination that this Graphics renders to. Similar tosun.java2d.SunGraphics2D#getDestination()
.- Returns:
- rendering destination
-
constrain
Constrain this graphics object to have a permanent device space origin of (x, y) and a permanent maximum clip of (x,y,w,h). This overload allows floating-point coordinates.- Parameters:
region
- constraint rectangle- See Also:
-
constrain
void constrain(int x, int y, int w, int h) Constrain this graphics object to have a permanent device space origin of (x, y) and a permanent maximum clip of (x,y,w,h). Similar tosun.awt.ConstrainableGraphics#constrain(int, int, int, int)
.- Parameters:
x
- x coordinate of the constraint rectangley
- y coordinate of the constraint rectanglew
- width of the constraint rectangleh
- height of the constraint rectangle
-