|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object prefuse.util.display.Clip
public class Clip
Represents a clipping rectangle in a prefuse Display
.
Constructor Summary | |
---|---|
Clip()
|
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
|
void |
expand(double b)
Expand the clip in all directions by the given value. |
void |
expandToIntegerLimits()
Minimally expand the clip such that each coordinate is an integer. |
double |
getHeight()
Get the clip's height |
double |
getMaxX()
Get the maximum x-coordinate. |
double |
getMaxY()
Get the maximum y-coordinate. |
double |
getMinX()
Get the minimum x-coordinate. |
double |
getMinY()
Get the minimum y-coordinate. |
double |
getWidth()
Get the clip's width |
void |
grow(double b)
Grow the clip width and height by the given value. |
void |
intersection(Clip c)
Intersect this clip with another region. |
void |
intersection(double x,
double y,
double w,
double h)
Intersect this clip with another region. |
void |
intersection(java.awt.geom.Rectangle2D r)
Intersect this clip with another region. |
boolean |
intersects(java.awt.geom.Rectangle2D r,
double margin)
Indicates if this Clip intersects the given rectangle expanded by the additional margin pace. |
void |
invalidate()
Invalidate the clip. |
boolean |
isEmpty()
Indicates if the clip is set to an empty status. |
boolean |
isInvalid()
Indicates if the clip is set to an invalid status. |
void |
limit(double x1,
double y1,
double x2,
double y2)
Limit the clip such that it fits within the specified region. |
void |
reset()
Reset the clip to an empty status. |
void |
setClip(Clip c)
Set the clip contents, and set the status to valid and in use. |
void |
setClip(double x,
double y,
double w,
double h)
Set the clip contents, and set the status to valid and in use. |
void |
setClip(java.awt.geom.Rectangle2D r)
Set the clip contents, and set the status to valid and in use. |
java.lang.String |
toString()
|
void |
transform(java.awt.geom.AffineTransform at)
Transform the clip contents. |
void |
union(Clip c)
Union this clip with another clip. |
void |
union(double x,
double y,
double w,
double h)
Union this clip with another region. |
void |
union(java.awt.geom.Rectangle2D r)
Union this clip with another region. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Clip()
Method Detail |
---|
public void reset()
public void invalidate()
public void setClip(Clip c)
c
- the clip whose contents should be copiedpublic void setClip(java.awt.geom.Rectangle2D r)
r
- the clip contents to copypublic void setClip(double x, double y, double w, double h)
x
- the minimum x-coordinatey
- the minimum y-coorindatew
- the clip widthh
- the clip heightpublic void transform(java.awt.geom.AffineTransform at)
at
- the affine transformpublic void limit(double x1, double y1, double x2, double y2)
x1
- the minimum x-coordinatey1
- the minimum y-coorindatex2
- the maximum x-coordinatey2
- the maximum y-coorindatepublic boolean intersects(java.awt.geom.Rectangle2D r, double margin)
r
- the rectangle to test for intersectmargin
- additional margin "bleed" to include in the intersection
public void union(Clip c)
c
- the clip to union withpublic void union(java.awt.geom.Rectangle2D r)
r
- the rectangle to union withpublic void union(double x, double y, double w, double h)
x
- the x-coordinate of the region to union withy
- the y-coordinate of the region to union withw
- the width of the region to union withh
- the height of the region to union withpublic void intersection(Clip c)
c
- the clip to intersect withpublic void intersection(java.awt.geom.Rectangle2D r)
r
- the rectangle to intersect withpublic void intersection(double x, double y, double w, double h)
x
- the x-coordinate of the region to intersect withy
- the y-coordinate of the region to intersect withw
- the width of the region to intersect withh
- the height of the region to intersect withpublic void expandToIntegerLimits()
public void expand(double b)
b
- the value to expand bypublic void grow(double b)
b
- the value to grow the width and height bypublic double getMinX()
public double getMinY()
public double getMaxX()
public double getMaxY()
public double getWidth()
public double getHeight()
public boolean isEmpty()
public boolean isInvalid()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |