|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.gnu.glib.Struct
org.gnu.glib.MemStruct
org.gnu.gdk.Region
public class Region
Represents a set of pixels on the Screen.
| Constructor Summary | |
|---|---|
Region()
Create a new empty Region. |
|
Region(Point[] points,
FillRule rule)
Create a new Region using the poligon defined by a number of points. |
|
Region(Rectangle rectangle)
Create a new Region containing the area of the Rectangle. |
|
Region(Region regionToCopy)
Create a new Region that is a copy of the provided Region |
|
| Method Summary | |
|---|---|
boolean |
containsPoint(int x,
int y)
Returns true if the provided point is in the Region. |
OverlapType |
containsRectangle(Rectangle rect)
Tests whether a Rectangle is within the Region. |
Rectangle |
getClipbox()
Return the smallest rectangle which includes the entire Region. |
Rectangle[] |
getRectangles()
Obtain the area covered by this Region as a list of Rectangles. |
void |
intersect(Region region)
Sets the area to the intersection of areas for this Region and the provided Region. |
boolean |
isEmpty()
Returns true if the Region is empty. |
boolean |
isEqual(Region other)
Returns true if the provided Region is the same as this one. |
void |
offset(int x,
int y)
Move the specified distance. |
void |
shrink(int x,
int y)
Resizes this Regions by the specified amount. |
void |
subtract(Region region)
Subtracts the area of the provided Region from this Region. |
void |
union(Region region)
Sets the area to the union of areas for this Region and the provided Region. |
void |
unionWithRect(Rectangle rect)
Sets the area to the union of this Region and the provided Rectangle. |
void |
xor(Region region)
Sets the area of this Region to the exclusive-OR of the areas of this Region and the provided Region. |
| Methods inherited from class org.gnu.glib.MemStruct |
|---|
getMemStructFromHandle |
| Methods inherited from class org.gnu.glib.Struct |
|---|
equals, getHandle, getNullHandle, hashCode |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Region()
public Region(Point[] points,
FillRule rule)
points - rule - public Region(Region regionToCopy)
regionToCopy - public Region(Rectangle rectangle)
rectangle - | Method Detail |
|---|
public Rectangle getClipbox()
public Rectangle[] getRectangles()
public boolean isEmpty()
public boolean isEqual(Region other)
other -
public boolean containsPoint(int x,
int y)
x - y - public OverlapType containsRectangle(Rectangle rect)
rect -
public void offset(int x,
int y)
x - y -
public void shrink(int x,
int y)
x - y - public void unionWithRect(Rectangle rect)
rect - public void intersect(Region region)
region - public void union(Region region)
region - public void subtract(Region region)
region - public void xor(Region region)
region -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||