public final class Region extends 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
com.aspose.imaging.Region to contain the portion of the specified com.aspose.imaging.GraphicsPath that does not intersect with this com.aspose.imaging.region . |
void |
complement(Rectangle rect)
Updates this
com.aspose.imaging.Region to contain the portion of the specified com.aspose.imaging.Rectangle structure that does not intersect with this com.aspose.imaging.region . |
void |
complement(RectangleF rect)
Updates this
com.aspose.imaging.Region to contain the portion of the specified com.aspose.imaging.RectangleF structure that does not intersect with this com.aspose.imaging.region . |
void |
complement(Region region)
Updates this
com.aspose.imaging.Region to contain the portion of the specified com.aspose.imaging.Region that does not intersect with this com.aspose.imaging.region . |
Region |
deepClone()
Creates an exact deep copy of this
com.aspose.imaging.region . |
void |
exclude(GraphicsPath path)
Updates this
com.aspose.imaging.Region to contain only the portion of its interior that does not intersect with the specified com.aspose.imaging.graphicsPath . |
void |
exclude(Rectangle rect)
Updates this
com.aspose.imaging.Region to contain only the portion of its interior that does not intersect with the specified com.aspose.imaging.Rectangle structure. |
void |
exclude(RectangleF rect)
Updates this
com.aspose.imaging.Region to contain only the portion of its interior that does not intersect with the specified com.aspose.imaging.RectangleF structure. |
void |
exclude(Region region)
Updates this
com.aspose.imaging.Region to contain only the portion of its interior that does not intersect with the specified com.aspose.imaging.region . |
void |
intersect(GraphicsPath path)
Updates this
com.aspose.imaging.Region to the intersection of itself with the specified com.aspose.imaging.graphicsPath . |
void |
intersect(Rectangle rect)
Updates this
com.aspose.imaging.Region to the intersection of itself with the specified com.aspose.imaging.Rectangle structure. |
void |
intersect(RectangleF rect)
Updates this
com.aspose.imaging.Region to the intersection of itself with the specified com.aspose.imaging.RectangleF structure. |
void |
intersect(Region region)
Updates this
com.aspose.imaging.Region to the intersection of itself with the specified com.aspose.imaging.region . |
boolean |
isEmpty(Graphics g)
Tests whether this
com.aspose.imaging.Region has an empty interior on the specified drawing surface. |
boolean |
isEquals(Region region,
Graphics g)
Tests whether the specified
com.aspose.imaging.Region is identical to this com.aspose.imaging.Region on the specified drawing surface. |
boolean |
isInfinite(Graphics g)
Tests whether this
com.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
com.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
com.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
com.aspose.imaging.Region when drawn using the specified com.aspose.imaging.graphics . |
boolean |
isVisible(float x,
float y,
Graphics g)
Tests whether the specified point is contained within this
com.aspose.imaging.Region when drawn using the specified com.aspose.imaging.graphics . |
boolean |
isVisible(int x,
int y,
Graphics g)
Tests whether the specified point is contained within this
com.aspose.imaging.Region object when drawn using the specified com.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
com.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
com.aspose.imaging.Region when drawn using the specified com.aspose.imaging.graphics . |
boolean |
isVisible(Point point)
Tests whether the specified
com.aspose.imaging.Point structure is contained within this com.aspose.imaging.region . |
boolean |
isVisible(PointF point)
Tests whether the specified
com.aspose.imaging.PointF structure is contained within this com.aspose.imaging.region . |
boolean |
isVisible(PointF point,
Graphics g)
Tests whether the specified
com.aspose.imaging.PointF structure is contained within this com.aspose.imaging.Region when drawn using the specified com.aspose.imaging.graphics . |
boolean |
isVisible(Point point,
Graphics g)
Tests whether the specified
com.aspose.imaging.Point structure is contained within this com.aspose.imaging.Region when drawn using the specified com.aspose.imaging.graphics . |
boolean |
isVisible(Rectangle rect)
Tests whether any portion of the specified
com.aspose.imaging.Rectangle structure is contained within this com.aspose.imaging.region . |
boolean |
isVisible(RectangleF rect)
Tests whether any portion of the specified
com.aspose.imaging.RectangleF structure is contained within this com.aspose.imaging.region . |
boolean |
isVisible(RectangleF rect,
Graphics g)
Tests whether any portion of the specified
com.aspose.imaging.RectangleF structure is contained within this com.aspose.imaging.Region when drawn using the specified com.aspose.imaging.graphics . |
boolean |
isVisible(Rectangle rect,
Graphics g)
Tests whether any portion of the specified
com.aspose.imaging.Rectangle structure is contained within this com.aspose.imaging.Region when drawn using the specified com.aspose.imaging.graphics . |
void |
makeEmpty()
Initializes this
com.aspose.imaging.Region to an empty interior. |
void |
makeInfinite()
Initializes this
com.aspose.imaging.Region object to an infinite interior. |
void |
transform(Matrix matrix)
Transforms this
com.aspose.imaging.Region by the specified com.aspose.imaging.matrix . |
void |
translate(float dx,
float dy)
Offsets the coordinates of this
com.aspose.imaging.Region by the specified amount. |
void |
translate(int dx,
int dy)
Offsets the coordinates of this
com.aspose.imaging.Region by the specified amount. |
void |
union(GraphicsPath path)
Updates this
com.aspose.imaging.Region to the union of itself and the specified com.aspose.imaging.graphicsPath . |
void |
union(Rectangle rect)
Updates this
com.aspose.imaging.Region to the union of itself and the specified com.aspose.imaging.Rectangle structure. |
void |
union(RectangleF rect)
Updates this
com.aspose.imaging.Region to the union of itself and the specified com.aspose.imaging.RectangleF structure. |
void |
union(Region region)
Updates this
com.aspose.imaging.Region to the union of itself and the specified com.aspose.imaging.region . |
void |
xor(GraphicsPath path)
Updates this
com.aspose.imaging.Region to the union minus the intersection of itself with the specified com.aspose.imaging.graphicsPath . |
void |
xor(Rectangle rect)
Updates this
com.aspose.imaging.Region to the union minus the intersection of itself with the specified com.aspose.imaging.Rectangle structure. |
void |
xor(RectangleF rect)
Updates this
com.aspose.imaging.Region to the union minus the intersection of itself with the specified com.aspose.imaging.RectangleF structure. |
void |
xor(Region region)
Updates this
com.aspose.imaging.Region to the union minus the intersection of itself with the specified com.aspose.imaging.region . |
public Region()
Initializes a 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 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(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
.com.aspose.ms.System.ArgumentNullException
- path
is null.public Region deepClone()
Creates an exact deep copy of this com.aspose.imaging.region
.
com.aspose.imaging.Region
that this method creates.public void makeInfinite()
Initializes this com.aspose.imaging.Region
object to an infinite interior.
public void makeEmpty()
Initializes this com.aspose.imaging.Region
to an empty interior.
public void intersect(RectangleF rect)
Updates this com.aspose.imaging.Region
to the intersection of itself with the specified com.aspose.imaging.RectangleF
structure.
rect
- The com.aspose.imaging.RectangleF
structure to intersect with this com.aspose.imaging.region
.public void intersect(Rectangle rect)
Updates this com.aspose.imaging.Region
to the intersection of itself with the specified com.aspose.imaging.Rectangle
structure.
rect
- The com.aspose.imaging.Rectangle
structure to intersect with this com.aspose.imaging.region
.public void intersect(GraphicsPath path)
Updates this com.aspose.imaging.Region
to the intersection of itself with the specified com.aspose.imaging.graphicsPath
.
path
- The com.aspose.imaging.GraphicsPath
to intersect with this com.aspose.imaging.region
.public void intersect(Region region)
Updates this com.aspose.imaging.Region
to the intersection of itself with the specified com.aspose.imaging.region
.
region
- The com.aspose.imaging.Region
to intersect with this com.aspose.imaging.region
.public void union(RectangleF rect)
Updates this com.aspose.imaging.Region
to the union of itself and the specified com.aspose.imaging.RectangleF
structure.
rect
- The com.aspose.imaging.RectangleF
structure to unite with this com.aspose.imaging.region
.public void union(Rectangle rect)
Updates this com.aspose.imaging.Region
to the union of itself and the specified com.aspose.imaging.Rectangle
structure.
rect
- The com.aspose.imaging.Rectangle
structure to unite with this com.aspose.imaging.region
.public void union(GraphicsPath path)
Updates this com.aspose.imaging.Region
to the union of itself and the specified com.aspose.imaging.graphicsPath
.
path
- The com.aspose.imaging.GraphicsPath
to unite with this com.aspose.imaging.region
.com.aspose.ms.System.ArgumentNullException
- path
is null.public void union(Region region)
Updates this com.aspose.imaging.Region
to the union of itself and the specified com.aspose.imaging.region
.
region
- The com.aspose.imaging.Region
to unite with this com.aspose.imaging.region
.com.aspose.ms.System.ArgumentNullException
- region
is null.public void xor(RectangleF rect)
Updates this com.aspose.imaging.Region
to the union minus the intersection of itself with the specified com.aspose.imaging.RectangleF
structure.
rect
- The com.aspose.imaging.RectangleF
structure to xor with this com.aspose.imaging.region
.public void xor(Rectangle rect)
Updates this com.aspose.imaging.Region
to the union minus the intersection of itself with the specified com.aspose.imaging.Rectangle
structure.
rect
- The com.aspose.imaging.Rectangle
structure to xor with this com.aspose.imaging.region
.public void xor(GraphicsPath path)
Updates this com.aspose.imaging.Region
to the union minus the intersection of itself with the specified com.aspose.imaging.graphicsPath
.
path
- The com.aspose.imaging.GraphicsPath
to xor with this com.aspose.imaging.region
.com.aspose.ms.System.ArgumentNullException
- path
is null.public void xor(Region region)
Updates this com.aspose.imaging.Region
to the union minus the intersection of itself with the specified com.aspose.imaging.region
.
region
- The com.aspose.imaging.Region
to xor with this com.aspose.imaging.region
.com.aspose.ms.System.ArgumentNullException
- region
is null.public void exclude(RectangleF rect)
Updates this com.aspose.imaging.Region
to contain only the portion of its interior that does not intersect with the specified com.aspose.imaging.RectangleF
structure.
rect
- The com.aspose.imaging.RectangleF
structure to exclude from this com.aspose.imaging.region
.public void exclude(Rectangle rect)
Updates this com.aspose.imaging.Region
to contain only the portion of its interior that does not intersect with the specified com.aspose.imaging.Rectangle
structure.
rect
- The com.aspose.imaging.Rectangle
structure to exclude from this com.aspose.imaging.region
.public void exclude(GraphicsPath path)
Updates this com.aspose.imaging.Region
to contain only the portion of its interior that does not intersect with the specified com.aspose.imaging.graphicsPath
.
path
- The com.aspose.imaging.GraphicsPath
to exclude from this com.aspose.imaging.region
.com.aspose.ms.System.ArgumentNullException
- path
is null.public void exclude(Region region)
Updates this com.aspose.imaging.Region
to contain only the portion of its interior that does not intersect with the specified com.aspose.imaging.region
.
region
- The com.aspose.imaging.Region
to exclude from this com.aspose.imaging.region
.com.aspose.ms.System.ArgumentNullException
- region
is null.public void complement(RectangleF rect)
Updates this com.aspose.imaging.Region
to contain the portion of the specified com.aspose.imaging.RectangleF
structure that does not intersect with this com.aspose.imaging.region
.
rect
- The com.aspose.imaging.RectangleF
structure to complement this com.aspose.imaging.region
.public void complement(Rectangle rect)
Updates this com.aspose.imaging.Region
to contain the portion of the specified com.aspose.imaging.Rectangle
structure that does not intersect with this com.aspose.imaging.region
.
rect
- The com.aspose.imaging.Rectangle
structure to complement this com.aspose.imaging.region
.public void complement(GraphicsPath path)
Updates this com.aspose.imaging.Region
to contain the portion of the specified com.aspose.imaging.GraphicsPath
that does not intersect with this com.aspose.imaging.region
.
path
- The com.aspose.imaging.GraphicsPath
to complement this com.aspose.imaging.region
.com.aspose.ms.System.ArgumentNullException
- path
isnull.public void complement(Region region)
Updates this com.aspose.imaging.Region
to contain the portion of the specified com.aspose.imaging.Region
that does not intersect with this com.aspose.imaging.region
.
region
- The com.aspose.imaging.Region
object to complement this com.aspose.imaging.Region
object.com.aspose.ms.System.ArgumentNullException
- region
isnull.public void translate(float dx, float dy)
Offsets the coordinates of this com.aspose.imaging.Region
by the specified amount.
dx
- The amount to offset this com.aspose.imaging.Region
horizontally.dy
- The amount to offset this com.aspose.imaging.Region
vertically.public void translate(int dx, int dy)
Offsets the coordinates of this com.aspose.imaging.Region
by the specified amount.
dx
- The amount to offset this com.aspose.imaging.Region
horizontally.dy
- The amount to offset this com.aspose.imaging.Region
vertically.public void transform(Matrix matrix)
Transforms this com.aspose.imaging.Region
by the specified com.aspose.imaging.matrix
.
matrix
- The com.aspose.imaging.Matrix
by which to transform this com.aspose.imaging.region
.com.aspose.ms.System.ArgumentNullException
- matrix
is null.public boolean isEmpty(Graphics g)
Tests whether this com.aspose.imaging.Region
has an empty interior on the specified drawing surface.
g
- A com.aspose.imaging.Graphics
that represents a drawing surface.com.aspose.imaging.Region
is empty when the transformation associated with g
is applied; otherwise, false.com.aspose.ms.System.ArgumentNullException
- g
is null.public boolean isInfinite(Graphics g)
Tests whether this com.aspose.imaging.Region
has an infinite interior on the specified drawing surface.
g
- A com.aspose.imaging.Graphics
that represents a drawing surface.com.aspose.imaging.Region
is infinite when the transformation associated with g
is applied; otherwise, false.com.aspose.ms.System.ArgumentNullException
- g
is null.public boolean isEquals(Region region, Graphics g)
Tests whether the specified com.aspose.imaging.Region
is identical to this com.aspose.imaging.Region
on the specified drawing surface.
region
- The com.aspose.imaging.Region
to test.g
- A com.aspose.imaging.Graphics
that represents a drawing surface.g
parameter is applied; otherwise, false.com.aspose.ms.System.ArgumentNullException
- g
orregion
is null.public boolean isVisible(float x, float y)
Tests whether the specified point is contained within this com.aspose.imaging.region
.
x
- The x-coordinate of the point to test.y
- The y-coordinate of the point to test.com.aspose.imaging.Region
; otherwise, false.public boolean isVisible(PointF point)
Tests whether the specified com.aspose.imaging.PointF
structure is contained within this com.aspose.imaging.region
.
point
- The com.aspose.imaging.PointF
structure to test.point
is contained within this com.aspose.imaging.Region
; otherwise, false.public boolean isVisible(float x, float y, Graphics g)
Tests whether the specified point is contained within this com.aspose.imaging.Region
when drawn using the specified com.aspose.imaging.graphics
.
x
- The x-coordinate of the point to test.y
- The y-coordinate of the point to test.g
- A com.aspose.imaging.Graphics
that represents a graphics context.com.aspose.imaging.Region
; otherwise, false.public boolean isVisible(PointF point, Graphics g)
Tests whether the specified com.aspose.imaging.PointF
structure is contained within this com.aspose.imaging.Region
when drawn using the specified com.aspose.imaging.graphics
.
point
- The com.aspose.imaging.PointF
structure to test.g
- A com.aspose.imaging.Graphics
that represents a graphics context.point
is contained within this com.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 com.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.com.aspose.imaging.Region
object; otherwise, false.public boolean isVisible(RectangleF rect)
Tests whether any portion of the specified com.aspose.imaging.RectangleF
structure is contained within this com.aspose.imaging.region
.
rect
- The com.aspose.imaging.RectangleF
structure to test.rect
is contained within this com.aspose.imaging.Region
; 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 com.aspose.imaging.Region
when drawn using the specified com.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 com.aspose.imaging.Graphics
that represents a graphics context.com.aspose.imaging.Region
; otherwise, false.public boolean isVisible(RectangleF rect, Graphics g)
Tests whether any portion of the specified com.aspose.imaging.RectangleF
structure is contained within this com.aspose.imaging.Region
when drawn using the specified com.aspose.imaging.graphics
.
rect
- The com.aspose.imaging.RectangleF
structure to test.g
- A com.aspose.imaging.Graphics
that represents a graphics context.rect
is contained within this com.aspose.imaging.Region
; otherwise, false.public boolean isVisible(int x, int y, Graphics g)
Tests whether the specified point is contained within this com.aspose.imaging.Region
object when drawn using the specified com.aspose.imaging.Graphics
object.
x
- The x-coordinate of the point to test.y
- The y-coordinate of the point to test.g
- A com.aspose.imaging.Graphics
that represents a graphics context.com.aspose.imaging.Region
; otherwise, false.public boolean isVisible(Point point)
Tests whether the specified com.aspose.imaging.Point
structure is contained within this com.aspose.imaging.region
.
point
- The com.aspose.imaging.Point
structure to test.point
is contained within this com.aspose.imaging.Region
; otherwise, false.public boolean isVisible(Point point, Graphics g)
Tests whether the specified com.aspose.imaging.Point
structure is contained within this com.aspose.imaging.Region
when drawn using the specified com.aspose.imaging.graphics
.
point
- The com.aspose.imaging.Point
structure to test.g
- A com.aspose.imaging.Graphics
that represents a graphics context.point
is contained within this com.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 com.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.com.aspose.imaging.Region
; otherwise, false.public boolean isVisible(Rectangle rect)
Tests whether any portion of the specified com.aspose.imaging.Rectangle
structure is contained within this com.aspose.imaging.region
.
rect
- The com.aspose.imaging.Rectangle
structure to test.rect
is contained within this com.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 com.aspose.imaging.Region
when drawn using the specified com.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 com.aspose.imaging.Graphics
that represents a graphics context.com.aspose.imaging.Region
; otherwise, false.public boolean isVisible(Rectangle rect, Graphics g)
Tests whether any portion of the specified com.aspose.imaging.Rectangle
structure is contained within this com.aspose.imaging.Region
when drawn using the specified com.aspose.imaging.graphics
.
rect
- The com.aspose.imaging.Rectangle
structure to test.g
- A com.aspose.imaging.Graphics
that represents a graphics context.rect
is contained within this com.aspose.imaging.Region
; otherwise, false.