|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jniwrapper.Parameter com.jniwrapper.Pointer.Void com.jniwrapper.win32.Handle com.jniwrapper.win32.gdi.GdiObject com.jniwrapper.win32.gdi.Region
public class Region
This class provides operations on region objects.
Nested Class Summary | |
---|---|
static class |
Region.CombineMode
CombineMode class represents EnumItemeration of combined operations. |
Nested classes/interfaces inherited from class com.jniwrapper.win32.gdi.GdiObject |
---|
GdiObject.ImageLoadParameters, GdiObject.ImageType, GdiObject.Type |
Field Summary | |
---|---|
static int |
COMPLEXREGION
The region consists of more than one rectangle. |
static int |
NULLREGION
The region is empty. |
static int |
RGN_ERROR
|
static int |
SIMPLEREGION
The region consists of a single rectangle. |
Fields inherited from class com.jniwrapper.win32.gdi.GdiObject |
---|
GDI_ERROR, HGDI_ERROR |
Fields inherited from class com.jniwrapper.win32.Handle |
---|
INFINITE_TIMEOUT, INVALID_HANDLE_VALUE, STATUS_ABANDONED_WAIT_0, STATUS_TIMEOUT, STATUS_WAIT_0 |
Fields inherited from class com.jniwrapper.Parameter |
---|
LICENSE_TYPE, V |
Constructor Summary | |
---|---|
Region()
|
|
Region(long value)
|
Method Summary | |
---|---|
static Region |
combineRgn(Region srcRgn1,
Region srcRgn2,
Region.CombineMode combineMode)
Creates a combined region from two specified regions. |
static Region |
createElliptic(int left,
int top,
int right,
int bottom)
Factory method for creating elliptic regions. |
static Region |
createElliptic(Rect rect)
Factory method for creating elliptic regions via bounding rectangle. |
static Region |
createFromImage(java.awt.Image image)
Creates a region from the specified image. |
static Region |
createFromImage(java.awt.Image image,
java.awt.Color transparent)
Creates a region from the specified image. |
static Region |
createFromImage(java.awt.Image image,
java.awt.Color transparent,
java.awt.Color tolerance)
Creates a region from specified image. |
static Region |
createPolygonRgn(Point[] points,
int nPoints,
PolyFillMode polyFillMode)
Creates a polygonal region. |
static Region |
createPolyPolygonRgn(Point[] points,
int[] polyCounts,
int count,
PolyFillMode polyFillMode)
Creates a region consisting of a series of polygons. |
static Region |
createRectRegion(int left,
int top,
int right,
int bottom)
Creates a rectangular region. |
static Region |
createRectRegion(Rect rect)
Creates a rectangular region. |
static Region |
createRoundRectRegion(int left,
int top,
int right,
int bottom,
int ellipseWidth,
int ellipseHight)
|
boolean |
equalRegion(Region region)
Checks the two specified regions to determine whether they are identical. |
int |
getRagionData(com.jniwrapper.PrimitiveArray rgnData,
int count)
Fills the specified buffer with data describing a region. |
Rect |
getRegionBox()
Retrieves the bounding rectangle of the region. |
boolean |
isPointInRegion(int x,
int y)
Determines whether the specified point is inside the specified region. |
boolean |
isPointInRegion(Point point)
Determines whether the specified point is inside the specified region. |
boolean |
isRectInRegion(Rect rect)
Determines whether any part of the specified rectangle is within the boundaries of a region. |
void |
offsetRegion(int xOffset,
int yOffset)
Moves a region by the specified offsets. |
void |
setRectRegion(int left,
int top,
int right,
int bottom)
Converts a region into a rectangular region with the specified coordinates. |
Methods inherited from class com.jniwrapper.win32.gdi.GdiObject |
---|
deleteObject, getObject, getObjectType |
Methods inherited from class com.jniwrapper.win32.Handle |
---|
clone, closeHandle, equals, waitFor, waitFor |
Methods inherited from class com.jniwrapper.Pointer.Void |
---|
asFunction, asFunction, asTypedPointer, castTo, castTo, getDebugInfo, getLength, getValue, hashCode, isNull, read, setValue, toString, write |
Methods inherited from class com.jniwrapper.Parameter |
---|
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int RGN_ERROR
public static final int NULLREGION
public static final int SIMPLEREGION
public static final int COMPLEXREGION
Constructor Detail |
---|
public Region()
public Region(long value)
Method Detail |
---|
public static Region createElliptic(int left, int top, int right, int bottom)
NULL
value in case
of error.public static Region createElliptic(Rect rect)
rect
- bounding rectangle for an elliptic region to be created.
NULL
value in case
of error.public static Region createRoundRectRegion(int left, int top, int right, int bottom, int ellipseWidth, int ellipseHight)
public static Region combineRgn(Region srcRgn1, Region srcRgn2, Region.CombineMode combineMode)
srcRgn1
- the first region.srcRgn2
- the second region.combineMode
- combine method.
public static Region createPolygonRgn(Point[] points, int nPoints, PolyFillMode polyFillMode)
points
- polyFillMode
-
public static Region createPolyPolygonRgn(Point[] points, int[] polyCounts, int count, PolyFillMode polyFillMode)
points
- polyCounts
- count
- polyFillMode
-
public static Region createRectRegion(int left, int top, int right, int bottom)
left
- top
- right
- bottom
-
public static Region createRectRegion(Rect rect)
rect
-
public boolean equalRegion(Region region)
region
-
public int getRagionData(com.jniwrapper.PrimitiveArray rgnData, int count)
rgnData
- is a region data buffer.count
- is the size of the region data buffer.
count
if the function succeeds and count specifies
an adequate number of bytes. If count
is too small or the
function fails, the return value is 0.public Rect getRegionBox()
public void offsetRegion(int xOffset, int yOffset)
xOffset
- yOffset
- public boolean isPointInRegion(int x, int y)
x
- y
-
public boolean isPointInRegion(Point point)
point
-
public boolean isRectInRegion(Rect rect)
rect
-
public void setRectRegion(int left, int top, int right, int bottom)
left
- top
- right
- bottom
- public static Region createFromImage(java.awt.Image image, java.awt.Color transparent)
image
- is a source image.transparent
- is a transparent color of the image.
public static Region createFromImage(java.awt.Image image, java.awt.Color transparent, java.awt.Color tolerance)
image
- is a source image.transparent
- is a transparent color of the image.tolerance
- is a color tolerance for the transparent color.
public static Region createFromImage(java.awt.Image image)
image
- is a source image.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |