public final class Region
extends java.lang.Object
Describes the interior of a graphics shape composed of rectangles and paths. This class cannot be inherited.
Constructor and Description |
---|
Region()
Initializes a new
T:Aspose.Imaging.Region . |
Region(GraphicsPath path)
Initializes a new
T:Aspose.Imaging.Region with the specified T:Aspose.Imaging.GraphicsPath . |
Region(Rectangle rect)
Initializes a new
T:Aspose.Imaging.Region from the specified T:Aspose.Imaging.Rectangle structure. |
Region(RectangleF rect)
Initializes a new
T:Aspose.Imaging.Region from the specified T:Aspose.Imaging.RectangleF structure. |
Modifier and Type | Method and Description |
---|---|
void |
complement(GraphicsPath path)
Updates this
T:Aspose.Imaging.Region to contain the portion of the specified T:Aspose.Imaging.GraphicsPath that does not intersect with this T:Aspose.Imaging.Region . |
void |
complement(Rectangle rect)
Updates this
T:Aspose.Imaging.Region to contain the portion of the specified T:Aspose.Imaging.Rectangle structure that does not intersect with this T:Aspose.Imaging.Region . |
void |
complement(RectangleF rect)
Updates this
T:Aspose.Imaging.Region to contain the portion of the specified T:Aspose.Imaging.RectangleF structure that does not intersect with this T:Aspose.Imaging.Region . |
void |
complement(Region region)
Updates this
T:Aspose.Imaging.Region to contain the portion of the specified T:Aspose.Imaging.Region that does not intersect with this T:Aspose.Imaging.Region . |
Region |
deepClone()
Creates an exact deep copy of this
T:Aspose.Imaging.Region . |
boolean |
equals(Region region,
Graphics g)
Tests whether the specified
T:Aspose.Imaging.Region is identical to this T:Aspose.Imaging.Region on the specified drawing surface. |
void |
exclude(GraphicsPath path)
Updates this
T:Aspose.Imaging.Region to contain only the portion of its interior that does not intersect with the specified T:Aspose.Imaging.GraphicsPath . |
void |
exclude(Rectangle rect)
Updates this
T:Aspose.Imaging.Region to contain only the portion of its interior that does not intersect with the specified T:Aspose.Imaging.Rectangle structure. |
void |
exclude(RectangleF rect)
Updates this
T:Aspose.Imaging.Region to contain only the portion of its interior that does not intersect with the specified T:Aspose.Imaging.RectangleF structure. |
void |
exclude(Region region)
Updates this
T:Aspose.Imaging.Region to contain only the portion of its interior that does not intersect with the specified T:Aspose.Imaging.Region . |
RegionAction[] |
getActions()
Gets the region actions.
|
void |
intersect(GraphicsPath path)
Updates this
T:Aspose.Imaging.Region to the intersection of itself with the specified T:Aspose.Imaging.GraphicsPath . |
void |
intersect(Rectangle rect)
Updates this
T:Aspose.Imaging.Region to the intersection of itself with the specified T:Aspose.Imaging.Rectangle structure. |
void |
intersect(RectangleF rect)
Updates this
T:Aspose.Imaging.Region to the intersection of itself with the specified T:Aspose.Imaging.RectangleF structure. |
void |
intersect(Region region)
Updates this
T:Aspose.Imaging.Region to the intersection of itself with the specified T:Aspose.Imaging.Region . |
boolean |
isEmpty(Graphics g)
Tests whether this
T:Aspose.Imaging.Region has an empty interior on the specified drawing surface. |
boolean |
isInfinite(Graphics g)
Tests whether this
T:Aspose.Imaging.Region has an infinite interior on the specified drawing surface. |
boolean |
isVisible(float x,
float y)
Tests whether the specified point is contained within this
T:Aspose.Imaging.Region . |
boolean |
isVisible(float x,
float y,
float width,
float height)
Tests whether any portion of the specified rectangle is contained within this
T:Aspose.Imaging.Region . |
boolean |
isVisible(float x,
float y,
float width,
float height,
Graphics g)
Tests whether any portion of the specified rectangle is contained within this
T:Aspose.Imaging.Region when drawn using the specified T:Aspose.Imaging.Graphics . |
boolean |
isVisible(float x,
float y,
Graphics g)
Tests whether the specified point is contained within this
T:Aspose.Imaging.Region when drawn using the specified T:Aspose.Imaging.Graphics . |
boolean |
isVisible(int x,
int y,
Graphics g)
Tests whether the specified point is contained within this
T:Aspose.Imaging.Region object when drawn using the specified T:Aspose.Imaging.Graphics object. |
boolean |
isVisible(int x,
int y,
int width,
int height)
Tests whether any portion of the specified rectangle is contained within this
T:Aspose.Imaging.Region . |
boolean |
isVisible(int x,
int y,
int width,
int height,
Graphics g)
Tests whether any portion of the specified rectangle is contained within this
T:Aspose.Imaging.Region when drawn using the specified T:Aspose.Imaging.Graphics . |
boolean |
isVisible(Point point)
Tests whether the specified
T:Aspose.Imaging.Point structure is contained within this T:Aspose.Imaging.Region . |
boolean |
isVisible(PointF point)
Tests whether the specified
T:Aspose.Imaging.PointF structure is contained within this T:Aspose.Imaging.Region . |
boolean |
isVisible(PointF point,
Graphics g)
Tests whether the specified
T:Aspose.Imaging.PointF structure is contained within this T:Aspose.Imaging.Region when drawn using the specified T:Aspose.Imaging.Graphics . |
boolean |
isVisible(Point point,
Graphics g)
Tests whether the specified
T:Aspose.Imaging.Point structure is contained within this T:Aspose.Imaging.Region when drawn using the specified T:Aspose.Imaging.Graphics . |
boolean |
isVisible(Rectangle rect)
Tests whether any portion of the specified
T:Aspose.Imaging.Rectangle structure is contained within this T:Aspose.Imaging.Region . |
boolean |
isVisible(RectangleF rect)
Tests whether any portion of the specified
T:Aspose.Imaging.RectangleF structure is contained within this T:Aspose.Imaging.Region . |
boolean |
isVisible(RectangleF rect,
Graphics g)
Tests whether any portion of the specified
T:Aspose.Imaging.RectangleF structure is contained within this T:Aspose.Imaging.Region when drawn using the specified T:Aspose.Imaging.Graphics . |
boolean |
isVisible(Rectangle rect,
Graphics g)
Tests whether any portion of the specified
T:Aspose.Imaging.Rectangle structure is contained within this T:Aspose.Imaging.Region when drawn using the specified T:Aspose.Imaging.Graphics . |
void |
makeEmpty()
Initializes this
T:Aspose.Imaging.Region to an empty interior. |
void |
makeInfinite()
Initializes this
T:Aspose.Imaging.Region object to an infinite interior. |
void |
transform(Matrix matrix)
Transforms this
T:Aspose.Imaging.Region by the specified T:Aspose.Imaging.Matrix . |
void |
translate(float dx,
float dy)
Offsets the coordinates of this
T:Aspose.Imaging.Region by the specified amount. |
void |
translate(int dx,
int dy)
Offsets the coordinates of this
T:Aspose.Imaging.Region by the specified amount. |
void |
union(GraphicsPath path)
Updates this
T:Aspose.Imaging.Region to the union of itself and the specified T:Aspose.Imaging.GraphicsPath . |
void |
union(Rectangle rect)
Updates this
T:Aspose.Imaging.Region to the union of itself and the specified T:Aspose.Imaging.Rectangle structure. |
void |
union(RectangleF rect)
Updates this
T:Aspose.Imaging.Region to the union of itself and the specified T:Aspose.Imaging.RectangleF structure. |
void |
union(Region region)
Updates this
T:Aspose.Imaging.Region to the union of itself and the specified T:Aspose.Imaging.Region . |
void |
xor(GraphicsPath path)
Updates this
T:Aspose.Imaging.Region to the union minus the intersection of itself with the specified T:Aspose.Imaging.GraphicsPath . |
void |
xor(Rectangle rect)
Updates this
T:Aspose.Imaging.Region to the union minus the intersection of itself with the specified T:Aspose.Imaging.Rectangle structure. |
void |
xor(RectangleF rect)
Updates this
T:Aspose.Imaging.Region to the union minus the intersection of itself with the specified T:Aspose.Imaging.RectangleF structure. |
void |
xor(Region region)
Updates this
T:Aspose.Imaging.Region to the union minus the intersection of itself with the specified T:Aspose.Imaging.Region . |
public Region()
Initializes a new T:Aspose.Imaging.Region
.
public Region(GraphicsPath path)
Initializes a new T:Aspose.Imaging.Region
with the specified T:Aspose.Imaging.GraphicsPath
.
path
- A T:Aspose.Imaging.GraphicsPath
that defines the new T:Aspose.Imaging.Region
.public Region(Rectangle rect)
Initializes a new T:Aspose.Imaging.Region
from the specified T:Aspose.Imaging.Rectangle
structure.
rect
- A T:Aspose.Imaging.Rectangle
structure that defines the interior of the new T:Aspose.Imaging.Region
.public Region(RectangleF rect)
Initializes a new T:Aspose.Imaging.Region
from the specified T:Aspose.Imaging.RectangleF
structure.
rect
- A T:Aspose.Imaging.RectangleF
structure that defines the interior of the new T:Aspose.Imaging.Region
.public void complement(GraphicsPath path)
Updates this T:Aspose.Imaging.Region
to contain the portion of the specified T:Aspose.Imaging.GraphicsPath
that does not intersect with this T:Aspose.Imaging.Region
.
path
- The T:Aspose.Imaging.GraphicsPath
to complement this T:Aspose.Imaging.Region
.public void complement(Rectangle rect)
Updates this T:Aspose.Imaging.Region
to contain the portion of the specified T:Aspose.Imaging.Rectangle
structure that does not intersect with this T:Aspose.Imaging.Region
.
rect
- The T:Aspose.Imaging.Rectangle
structure to complement this T:Aspose.Imaging.Region
.public void complement(RectangleF rect)
Updates this T:Aspose.Imaging.Region
to contain the portion of the specified T:Aspose.Imaging.RectangleF
structure that does not intersect with this T:Aspose.Imaging.Region
.
rect
- The T:Aspose.Imaging.RectangleF
structure to complement this T:Aspose.Imaging.Region
.public void complement(Region region)
Updates this T:Aspose.Imaging.Region
to contain the portion of the specified T:Aspose.Imaging.Region
that does not intersect with this T:Aspose.Imaging.Region
.
region
- The T:Aspose.Imaging.Region
object to complement this T:Aspose.Imaging.Region
object.public Region deepClone()
Creates an exact deep copy of this T:Aspose.Imaging.Region
.
T:Aspose.Imaging.Region
that this method creates.public boolean equals(Region region, Graphics g)
Tests whether the specified T:Aspose.Imaging.Region
is identical to this T:Aspose.Imaging.Region
on the specified drawing surface.
region
- The T:Aspose.Imaging.Region
to test.g
- A T:Aspose.Imaging.Graphics
that represents a drawing surface.g
parameter is applied; otherwise, false.public void exclude(GraphicsPath path)
Updates this T:Aspose.Imaging.Region
to contain only the portion of its interior that does not intersect with the specified T:Aspose.Imaging.GraphicsPath
.
path
- The T:Aspose.Imaging.GraphicsPath
to exclude from this T:Aspose.Imaging.Region
.public void exclude(Rectangle rect)
Updates this T:Aspose.Imaging.Region
to contain only the portion of its interior that does not intersect with the specified T:Aspose.Imaging.Rectangle
structure.
rect
- The T:Aspose.Imaging.Rectangle
structure to exclude from this T:Aspose.Imaging.Region
.public void exclude(RectangleF rect)
Updates this T:Aspose.Imaging.Region
to contain only the portion of its interior that does not intersect with the specified T:Aspose.Imaging.RectangleF
structure.
rect
- The T:Aspose.Imaging.RectangleF
structure to exclude from this T:Aspose.Imaging.Region
.public void exclude(Region region)
Updates this T:Aspose.Imaging.Region
to contain only the portion of its interior that does not intersect with the specified T:Aspose.Imaging.Region
.
region
- The T:Aspose.Imaging.Region
to exclude from this T:Aspose.Imaging.Region
.public RegionAction[] getActions()
Gets the region actions.
Value: The region actions.public void intersect(GraphicsPath path)
Updates this T:Aspose.Imaging.Region
to the intersection of itself with the specified T:Aspose.Imaging.GraphicsPath
.
path
- The T:Aspose.Imaging.GraphicsPath
to intersect with this T:Aspose.Imaging.Region
.public void intersect(Rectangle rect)
Updates this T:Aspose.Imaging.Region
to the intersection of itself with the specified T:Aspose.Imaging.Rectangle
structure.
rect
- The T:Aspose.Imaging.Rectangle
structure to intersect with this T:Aspose.Imaging.Region
.public void intersect(RectangleF rect)
Updates this T:Aspose.Imaging.Region
to the intersection of itself with the specified T:Aspose.Imaging.RectangleF
structure.
rect
- The T:Aspose.Imaging.RectangleF
structure to intersect with this T:Aspose.Imaging.Region
.public void intersect(Region region)
Updates this T:Aspose.Imaging.Region
to the intersection of itself with the specified T:Aspose.Imaging.Region
.
region
- The T:Aspose.Imaging.Region
to intersect with this T:Aspose.Imaging.Region
.public boolean isEmpty(Graphics g)
Tests whether this T:Aspose.Imaging.Region
has an empty interior on the specified drawing surface.
g
- A T:Aspose.Imaging.Graphics
that represents a drawing surface.T:Aspose.Imaging.Region
is empty when the transformation associated with g
is applied; otherwise, false.public boolean isInfinite(Graphics g)
Tests whether this T:Aspose.Imaging.Region
has an infinite interior on the specified drawing surface.
g
- A T:Aspose.Imaging.Graphics
that represents a drawing surface.T:Aspose.Imaging.Region
is infinite when the transformation associated with g
is applied; otherwise, false.public boolean isVisible(float x, float y)
Tests whether the specified point is contained within this T:Aspose.Imaging.Region
.
x
- The x-coordinate of the point to test.y
- The y-coordinate of the point to test.T:Aspose.Imaging.Region
; otherwise, false.public boolean isVisible(float x, float y, float width, float height)
Tests whether any portion of the specified rectangle is contained within this T:Aspose.Imaging.Region
.
x
- The x-coordinate of the upper-left corner of the rectangle to test.y
- The y-coordinate of the upper-left corner of the rectangle to test.width
- The width of the rectangle to test.height
- The height of the rectangle to test.T:Aspose.Imaging.Region
object; otherwise, false.public boolean isVisible(float x, float y, float width, float height, Graphics g)
Tests whether any portion of the specified rectangle is contained within this T:Aspose.Imaging.Region
when drawn using the specified T:Aspose.Imaging.Graphics
.
x
- The x-coordinate of the upper-left corner of the rectangle to test.y
- The y-coordinate of the upper-left corner of the rectangle to test.width
- The width of the rectangle to test.height
- The height of the rectangle to test.g
- A T:Aspose.Imaging.Graphics
that represents a graphics context.T:Aspose.Imaging.Region
; otherwise, false.public boolean isVisible(float x, float y, Graphics g)
Tests whether the specified point is contained within this T:Aspose.Imaging.Region
when drawn using the specified T:Aspose.Imaging.Graphics
.
x
- The x-coordinate of the point to test.y
- The y-coordinate of the point to test.g
- A T:Aspose.Imaging.Graphics
that represents a graphics context.T:Aspose.Imaging.Region
; otherwise, false.public boolean isVisible(int x, int y, Graphics g)
Tests whether the specified point is contained within this T:Aspose.Imaging.Region
object when drawn using the specified T:Aspose.Imaging.Graphics
object.
x
- The x-coordinate of the point to test.y
- The y-coordinate of the point to test.g
- A T:Aspose.Imaging.Graphics
that represents a graphics context.T:Aspose.Imaging.Region
; otherwise, false.public boolean isVisible(int x, int y, int width, int height)
Tests whether any portion of the specified rectangle is contained within this T:Aspose.Imaging.Region
.
x
- The x-coordinate of the upper-left corner of the rectangle to test.y
- The y-coordinate of the upper-left corner of the rectangle to test.width
- The width of the rectangle to test.height
- The height of the rectangle to test.T:Aspose.Imaging.Region
; otherwise, false.public boolean isVisible(int x, int y, int width, int height, Graphics g)
Tests whether any portion of the specified rectangle is contained within this T:Aspose.Imaging.Region
when drawn using the specified T:Aspose.Imaging.Graphics
.
x
- The x-coordinate of the upper-left corner of the rectangle to test.y
- The y-coordinate of the upper-left corner of the rectangle to test.width
- The width of the rectangle to test.height
- The height of the rectangle to test.g
- A T:Aspose.Imaging.Graphics
that represents a graphics context.T:Aspose.Imaging.Region
; otherwise, false.public boolean isVisible(Point point)
Tests whether the specified T:Aspose.Imaging.Point
structure is contained within this T:Aspose.Imaging.Region
.
point
- The T:Aspose.Imaging.Point
structure to test.point
is contained within this T:Aspose.Imaging.Region
; otherwise, false.public boolean isVisible(PointF point)
Tests whether the specified T:Aspose.Imaging.PointF
structure is contained within this T:Aspose.Imaging.Region
.
point
- The T:Aspose.Imaging.PointF
structure to test.point
is contained within this T:Aspose.Imaging.Region
; otherwise, false.public boolean isVisible(PointF point, Graphics g)
Tests whether the specified T:Aspose.Imaging.PointF
structure is contained within this T:Aspose.Imaging.Region
when drawn using the specified T:Aspose.Imaging.Graphics
.
point
- The T:Aspose.Imaging.PointF
structure to test.g
- A T:Aspose.Imaging.Graphics
that represents a graphics context.point
is contained within this T:Aspose.Imaging.Region
; otherwise, false.public boolean isVisible(Point point, Graphics g)
Tests whether the specified T:Aspose.Imaging.Point
structure is contained within this T:Aspose.Imaging.Region
when drawn using the specified T:Aspose.Imaging.Graphics
.
point
- The T:Aspose.Imaging.Point
structure to test.g
- A T:Aspose.Imaging.Graphics
that represents a graphics context.point
is contained within this T:Aspose.Imaging.Region
; otherwise, false.public boolean isVisible(Rectangle rect)
Tests whether any portion of the specified T:Aspose.Imaging.Rectangle
structure is contained within this T:Aspose.Imaging.Region
.
rect
- The T:Aspose.Imaging.Rectangle
structure to test.rect
is contained within this T:Aspose.Imaging.Region
; otherwise, false.public boolean isVisible(RectangleF rect)
Tests whether any portion of the specified T:Aspose.Imaging.RectangleF
structure is contained within this T:Aspose.Imaging.Region
.
rect
- The T:Aspose.Imaging.RectangleF
structure to test.rect
is contained within this T:Aspose.Imaging.Region
; otherwise, false.public boolean isVisible(RectangleF rect, Graphics g)
Tests whether any portion of the specified T:Aspose.Imaging.RectangleF
structure is contained within this T:Aspose.Imaging.Region
when drawn using the specified T:Aspose.Imaging.Graphics
.
rect
- The T:Aspose.Imaging.RectangleF
structure to test.g
- A T:Aspose.Imaging.Graphics
that represents a graphics context.rect
is contained within this T:Aspose.Imaging.Region
; otherwise, false.public boolean isVisible(Rectangle rect, Graphics g)
Tests whether any portion of the specified T:Aspose.Imaging.Rectangle
structure is contained within this T:Aspose.Imaging.Region
when drawn using the specified T:Aspose.Imaging.Graphics
.
rect
- The T:Aspose.Imaging.Rectangle
structure to test.g
- A T:Aspose.Imaging.Graphics
that represents a graphics context.rect
is contained within this T:Aspose.Imaging.Region
; otherwise, false.public void makeEmpty()
Initializes this T:Aspose.Imaging.Region
to an empty interior.
public void makeInfinite()
Initializes this T:Aspose.Imaging.Region
object to an infinite interior.
public void transform(Matrix matrix)
Transforms this T:Aspose.Imaging.Region
by the specified T:Aspose.Imaging.Matrix
.
matrix
- The T:Aspose.Imaging.Matrix
by which to transform this T:Aspose.Imaging.Region
.public void translate(float dx, float dy)
Offsets the coordinates of this T:Aspose.Imaging.Region
by the specified amount.
dx
- The amount to offset this T:Aspose.Imaging.Region
horizontally.dy
- The amount to offset this T:Aspose.Imaging.Region
vertically.public void translate(int dx, int dy)
Offsets the coordinates of this T:Aspose.Imaging.Region
by the specified amount.
dx
- The amount to offset this T:Aspose.Imaging.Region
horizontally.dy
- The amount to offset this T:Aspose.Imaging.Region
vertically.public void union(GraphicsPath path)
Updates this T:Aspose.Imaging.Region
to the union of itself and the specified T:Aspose.Imaging.GraphicsPath
.
path
- The T:Aspose.Imaging.GraphicsPath
to unite with this T:Aspose.Imaging.Region
.public void union(Rectangle rect)
Updates this T:Aspose.Imaging.Region
to the union of itself and the specified T:Aspose.Imaging.Rectangle
structure.
rect
- The T:Aspose.Imaging.Rectangle
structure to unite with this T:Aspose.Imaging.Region
.public void union(RectangleF rect)
Updates this T:Aspose.Imaging.Region
to the union of itself and the specified T:Aspose.Imaging.RectangleF
structure.
rect
- The T:Aspose.Imaging.RectangleF
structure to unite with this T:Aspose.Imaging.Region
.public void union(Region region)
Updates this T:Aspose.Imaging.Region
to the union of itself and the specified T:Aspose.Imaging.Region
.
region
- The T:Aspose.Imaging.Region
to unite with this T:Aspose.Imaging.Region
.public void xor(GraphicsPath path)
Updates this T:Aspose.Imaging.Region
to the union minus the intersection of itself with the specified T:Aspose.Imaging.GraphicsPath
.
path
- The T:Aspose.Imaging.GraphicsPath
to xor with this T:Aspose.Imaging.Region
.public void xor(Rectangle rect)
Updates this T:Aspose.Imaging.Region
to the union minus the intersection of itself with the specified T:Aspose.Imaging.Rectangle
structure.
rect
- The T:Aspose.Imaging.Rectangle
structure to xor with this T:Aspose.Imaging.Region
.public void xor(RectangleF rect)
Updates this T:Aspose.Imaging.Region
to the union minus the intersection of itself with the specified T:Aspose.Imaging.RectangleF
structure.
rect
- The T:Aspose.Imaging.RectangleF
structure to xor with this T:Aspose.Imaging.Region
.public void xor(Region region)
Updates this T:Aspose.Imaging.Region
to the union minus the intersection of itself with the specified T:Aspose.Imaging.Region
.
region
- The T:Aspose.Imaging.Region
to xor with this T:Aspose.Imaging.Region
.