Package com.dkt.graphics.extras
Class GClip
java.lang.Object
com.dkt.graphics.elements.GraphicE
com.dkt.graphics.extras.GClip
- All Implemented Interfaces:
Cloneable
- Author:
- Federico Vera <[email protected]>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(GFillableE e) Adds the given element to the clipping areaclone()
void
draw
(Graphics2D g) Draws the component on the given graphicsvoid
Subtracts the given element from the clipping areavoid
traslate
(int x, int y) Traslates this element on X and Y
-
Constructor Details
-
GClip
Copy constructor- Parameters:
e
-GClip
to copy- Throws:
IllegalArgumentException
- ife
isnull
-
GClip
public GClip()BasicGClip
constructor -
GClip
Constructs aGClip
from a given area. Please note that when this constructor is used, thentraslate(int, int)
won't work.
If you really need to traslate aGClip
, then you should previously add aGTransform
to the graphic- Parameters:
area
-Area
object to be used as clip- Throws:
IllegalArgumentException
- ifarea
isnull
-
-
Method Details
-
traslate
public void traslate(int x, int y) Description copied from class:GraphicE
Traslates this element on X and Y -
add
Adds the given element to the clipping area- Parameters:
e
- element to add
-
subtract
Subtracts the given element from the clipping area- Parameters:
e
- element to subtract
-
draw
Description copied from class:GraphicE
Draws the component on the given graphics -
clone
-