Region Class

Summary: Describes the interior of a graphics shape composed of rectangles and paths. This class cannot be inherited.

Module: aspose.psd

Full Name: aspose.psd.Region

Aspose.PSD Version: 24.9.0

Constructors

NameDescription
Region()Initializes a new Region.
Region(path)Initializes a new Region with the specified GraphicsPath.
Region(rect)Initializes a new Region from the specified RectangleF structure.
Region(rect)Initializes a new Region from the specified RectangleF structure.

Methods

NameDescription
complement(path)Updates this Region to contain the portion of the specified GraphicsPath that does not intersect with this Region.
complement(rect)Updates this Region to contain the portion of the specified RectangleF structure that does not intersect with this Region.
complement(rect)Updates this Region to contain the portion of the specified RectangleF structure that does not intersect with this Region.
complement(region)Updates this Region to contain the portion of the specified Region that does not intersect with this Region.
deep_clone()Creates an exact deep copy of this Region.
exclude(path)Updates this Region to contain only the portion of its interior that does not intersect with the specified GraphicsPath.
exclude(rect)Updates this Region to contain only the portion of its interior that does not intersect with the specified RectangleF structure.
exclude(rect)Updates this Region to contain only the portion of its interior that does not intersect with the specified RectangleF structure.
exclude(region)Updates this Region to contain only the portion of its interior that does not intersect with the specified Region.
intersect(path)Updates this Region to the intersection of itself with the specified GraphicsPath.
intersect(rect)Updates this Region to the intersection of itself with the specified RectangleF structure.
intersect(rect)Updates this Region to the intersection of itself with the specified RectangleF structure.
intersect(region)Updates this Region to the intersection of itself with the specified Region.
is_empty(g)Tests whether this Region has an empty interior on the specified drawing surface.
is_infinite(g)Tests whether this Region has an infinite interior on the specified drawing surface.
is_visible(point)Tests whether the specified PointF structure is contained within this Region.
is_visible(point)Tests whether the specified PointF structure is contained within this Region.
is_visible(point, g)Tests whether the specified PointF structure is contained within this Region when drawn using the specified Graphics.
is_visible(point, g)Tests whether the specified PointF structure is contained within this Region when drawn using the specified Graphics.
is_visible(rect)Tests whether any portion of the specified RectangleF structure is contained within this Region.
is_visible(rect)Tests whether any portion of the specified RectangleF structure is contained within this Region.
is_visible(rect, g)Tests whether any portion of the specified RectangleF structure is contained within this Region when drawn using the specified Graphics.
is_visible(rect, g)Tests whether any portion of the specified RectangleF structure is contained within this Region when drawn using the specified Graphics.
is_visible(x, y)Tests whether the specified point is contained within this Region.
is_visible(x, y, g)Tests whether the specified point is contained within this Region when drawn using the specified Graphics.
is_visible(x, y, g)Tests whether the specified point is contained within this Region when drawn using the specified Graphics.
is_visible(x, y, width, height)Tests whether any portion of the specified rectangle is contained within this Region.
is_visible(x, y, width, height)Tests whether any portion of the specified rectangle is contained within this Region.
is_visible(x, y, width, height, g)Tests whether any portion of the specified rectangle is contained within this Region when drawn using the specified Graphics.
is_visible(x, y, width, height, g)Tests whether any portion of the specified rectangle is contained within this Region when drawn using the specified Graphics.
make_empty()Initializes this Region to an empty interior.
make_infinite()Initializes this Region object to an infinite interior.
transform(matrix)Transforms this Region by the specified Matrix.
translate(dx, dy)Offsets the coordinates of this Region by the specified amount.
translate(dx, dy)Offsets the coordinates of this Region by the specified amount.
union(path)Updates this Region to the union of itself and the specified GraphicsPath.
union(rect)Updates this Region to the union of itself and the specified RectangleF structure.
union(rect)Updates this Region to the union of itself and the specified RectangleF structure.
union(region)Updates this Region to the union of itself and the specified Region.
xor(path)Updates this Region to the union minus the intersection of itself with the specified GraphicsPath.
xor(rect)Updates this Region to the union minus the intersection of itself with the specified RectangleF structure.
xor(rect)Updates this Region to the union minus the intersection of itself with the specified RectangleF structure.
xor(region)Updates this Region to the union minus the intersection of itself with the specified Region.

Constructor: Region()

 Region() 

Initializes a new Region.

Constructor: Region(path)

 Region(path) 

Initializes a new Region with the specified GraphicsPath.

Parameters:

ParameterTypeDescription
pathGraphicsPathA GraphicsPath that defines the new Region.

Constructor: Region(rect)

 Region(rect) 

Initializes a new Region from the specified RectangleF structure.

Parameters:

ParameterTypeDescription
rectRectangleFA RectangleF structure that defines the interior of the new Region.

Constructor: Region(rect)

 Region(rect) 

Initializes a new Region from the specified RectangleF structure.

Parameters:

ParameterTypeDescription
rectRectangleA RectangleF structure that defines the interior of the new Region.

Method: complement(path)

 complement(path) 

Updates this Region to contain the portion of the specified GraphicsPath that does not intersect with this Region.

Parameters:

ParameterTypeDescription
pathGraphicsPathThe GraphicsPath to complement this Region.

Method: complement(rect)

 complement(rect) 

Updates this Region to contain the portion of the specified RectangleF structure that does not intersect with this Region.

Parameters:

ParameterTypeDescription
rectRectangleFThe RectangleF structure to complement this Region.

Method: complement(rect)

 complement(rect) 

Updates this Region to contain the portion of the specified RectangleF structure that does not intersect with this Region.

Parameters:

ParameterTypeDescription
rectRectangleThe RectangleF structure to complement this Region.

Method: complement(region)

 complement(region) 

Updates this Region to contain the portion of the specified Region that does not intersect with this Region.

Parameters:

ParameterTypeDescription
regionRegionThe Region object to complement this Region object.

Method: deep_clone()

 deep_clone() 

Creates an exact deep copy of this Region.

Returns

TypeDescription
RegionThe Region that this method creates.

Method: exclude(path)

 exclude(path) 

Updates this Region to contain only the portion of its interior that does not intersect with the specified GraphicsPath.

Parameters:

ParameterTypeDescription
pathGraphicsPathThe GraphicsPath to exclude from this Region.

Method: exclude(rect)

 exclude(rect) 

Updates this Region to contain only the portion of its interior that does not intersect with the specified RectangleF structure.

Parameters:

ParameterTypeDescription
rectRectangleFThe RectangleF structure to exclude from this Region.

Method: exclude(rect)

 exclude(rect) 

Updates this Region to contain only the portion of its interior that does not intersect with the specified RectangleF structure.

Parameters:

ParameterTypeDescription
rectRectangleThe RectangleF structure to exclude from this Region.

Method: exclude(region)

 exclude(region) 

Updates this Region to contain only the portion of its interior that does not intersect with the specified Region.

Parameters:

ParameterTypeDescription
regionRegionThe Region to exclude from this Region.

Method: intersect(path)

 intersect(path) 

Updates this Region to the intersection of itself with the specified GraphicsPath.

Parameters:

ParameterTypeDescription
pathGraphicsPathThe GraphicsPath to intersect with this Region.

Method: intersect(rect)

 intersect(rect) 

Updates this Region to the intersection of itself with the specified RectangleF structure.

Parameters:

ParameterTypeDescription
rectRectangleFThe RectangleF structure to intersect with this Region.

Method: intersect(rect)

 intersect(rect) 

Updates this Region to the intersection of itself with the specified RectangleF structure.

Parameters:

ParameterTypeDescription
rectRectangleThe RectangleF structure to intersect with this Region.

Method: intersect(region)

 intersect(region) 

Updates this Region to the intersection of itself with the specified Region.

Parameters:

ParameterTypeDescription
regionRegionThe Region to intersect with this Region.

Method: is_empty(g)

 is_empty(g) 

Tests whether this Region has an empty interior on the specified drawing surface.

Parameters:

ParameterTypeDescription
gGraphicsA Graphics that represents a drawing surface.

Returns

TypeDescription
booltrue if the interior of this Region is empty when the transformation associated with is applied; otherwise, false.

Method: is_infinite(g)

 is_infinite(g) 

Tests whether this Region has an infinite interior on the specified drawing surface.

Parameters:

ParameterTypeDescription
gGraphicsA Graphics that represents a drawing surface.

Returns

TypeDescription
booltrue if the interior of this Region is infinite when the transformation associated with is applied; otherwise, false.

Method: is_visible(point)

 is_visible(point) 

Tests whether the specified PointF structure is contained within this Region.

Parameters:

ParameterTypeDescription
pointPointFThe PointF structure to test.

Returns

TypeDescription
booltrue when is contained within this Region; otherwise, false.

Method: is_visible(point)

 is_visible(point) 

Tests whether the specified PointF structure is contained within this Region.

Parameters:

ParameterTypeDescription
pointPointThe PointF structure to test.

Returns

TypeDescription
booltrue when is contained within this Region; otherwise, false.

Method: is_visible(point, g)

 is_visible(point, g) 

Tests whether the specified PointF structure is contained within this Region when drawn using the specified Graphics.

Parameters:

ParameterTypeDescription
pointPointFThe PointF structure to test.
gGraphicsA Graphics that represents a graphics context.

Returns

TypeDescription
booltrue when is contained within this Region; otherwise, false.

Method: is_visible(point, g)

 is_visible(point, g) 

Tests whether the specified PointF structure is contained within this Region when drawn using the specified Graphics.

Parameters:

ParameterTypeDescription
pointPointThe PointF structure to test.
gGraphicsA Graphics that represents a graphics context.

Returns

TypeDescription
booltrue when is contained within this Region; otherwise, false.

Method: is_visible(rect)

 is_visible(rect) 

Tests whether any portion of the specified RectangleF structure is contained within this Region.

Parameters:

ParameterTypeDescription
rectRectangleFThe RectangleF structure to test.

Returns

TypeDescription
booltrue when any portion of is contained within this Region; otherwise, false.

Method: is_visible(rect)

 is_visible(rect) 

Tests whether any portion of the specified RectangleF structure is contained within this Region.

Parameters:

ParameterTypeDescription
rectRectangleThe RectangleF structure to test.

Returns

TypeDescription
booltrue when any portion of is contained within this Region; otherwise, false.

Method: is_visible(rect, g)

 is_visible(rect, g) 

Tests whether any portion of the specified RectangleF structure is contained within this Region when drawn using the specified Graphics.

Parameters:

ParameterTypeDescription
rectRectangleFThe RectangleF structure to test.
gGraphicsA Graphics that represents a graphics context.

Returns

TypeDescription
booltrue when is contained within this Region; otherwise, false.

Method: is_visible(rect, g)

 is_visible(rect, g) 

Tests whether any portion of the specified RectangleF structure is contained within this Region when drawn using the specified Graphics.

Parameters:

ParameterTypeDescription
rectRectangleThe RectangleF structure to test.
gGraphicsA Graphics that represents a graphics context.

Returns

TypeDescription
booltrue when is contained within this Region; otherwise, false.

Method: is_visible(x, y)

 is_visible(x, y) 

Tests whether the specified point is contained within this Region.

Parameters:

ParameterTypeDescription
xfloatThe x-coordinate of the point to test.
yfloatThe y-coordinate of the point to test.

Returns

TypeDescription
boolTrue when the specified point is contained within this Region; otherwise, false.

Method: is_visible(x, y, g)

 is_visible(x, y, g) 

Tests whether the specified point is contained within this Region when drawn using the specified Graphics.

Parameters:

ParameterTypeDescription
xfloatThe x-coordinate of the point to test.
yfloatThe y-coordinate of the point to test.
gGraphicsA Graphics that represents a graphics context.

Returns

TypeDescription
boolTrue when the specified point is contained within this Region; otherwise, false.

Method: is_visible(x, y, g)

 is_visible(x, y, g) 

Tests whether the specified point is contained within this Region when drawn using the specified Graphics.

Parameters:

ParameterTypeDescription
xintThe x-coordinate of the point to test.
yintThe y-coordinate of the point to test.
gGraphicsA Graphics that represents a graphics context.

Returns

TypeDescription
boolTrue when the specified point is contained within this Region; otherwise, false.

Method: is_visible(x, y, width, height)

 is_visible(x, y, width, height) 

Tests whether any portion of the specified rectangle is contained within this Region.

Parameters:

ParameterTypeDescription
xfloatThe x-coordinate of the upper-left corner of the rectangle to test.
yfloatThe y-coordinate of the upper-left corner of the rectangle to test.
widthfloatThe width of the rectangle to test.
heightfloatThe height of the rectangle to test.

Returns

TypeDescription
booltrue when any portion of the specified rectangle is contained within this Region object; otherwise, false.

Method: is_visible(x, y, width, height)

 is_visible(x, y, width, height) 

Tests whether any portion of the specified rectangle is contained within this Region.

Parameters:

ParameterTypeDescription
xintThe x-coordinate of the upper-left corner of the rectangle to test.
yintThe y-coordinate of the upper-left corner of the rectangle to test.
widthintThe width of the rectangle to test.
heightintThe height of the rectangle to test.

Returns

TypeDescription
booltrue when any portion of the specified rectangle is contained within this Region object; otherwise, false.

Method: is_visible(x, y, width, height, g)

 is_visible(x, y, width, height, g) 

Tests whether any portion of the specified rectangle is contained within this Region when drawn using the specified Graphics.

Parameters:

ParameterTypeDescription
xfloatThe x-coordinate of the upper-left corner of the rectangle to test.
yfloatThe y-coordinate of the upper-left corner of the rectangle to test.
widthfloatThe width of the rectangle to test.
heightfloatThe height of the rectangle to test.
gGraphicsA Graphics that represents a graphics context.

Returns

TypeDescription
booltrue when any portion of the specified rectangle is contained within this Region; otherwise, false.

Method: is_visible(x, y, width, height, g)

 is_visible(x, y, width, height, g) 

Tests whether any portion of the specified rectangle is contained within this Region when drawn using the specified Graphics.

Parameters:

ParameterTypeDescription
xintThe x-coordinate of the upper-left corner of the rectangle to test.
yintThe y-coordinate of the upper-left corner of the rectangle to test.
widthintThe width of the rectangle to test.
heightintThe height of the rectangle to test.
gGraphicsA Graphics that represents a graphics context.

Returns

TypeDescription
booltrue when any portion of the specified rectangle is contained within this Region; otherwise, false.

Method: transform(matrix)

 transform(matrix) 

Transforms this Region by the specified Matrix.

Parameters:

ParameterTypeDescription
matrixMatrixThe Matrix by which to transform this Region.

Method: translate(dx, dy)

 translate(dx, dy) 

Offsets the coordinates of this Region by the specified amount.

Parameters:

ParameterTypeDescription
dxfloatThe amount to offset this Region horizontally.
dyfloatThe amount to offset this Region vertically.

Method: translate(dx, dy)

 translate(dx, dy) 

Offsets the coordinates of this Region by the specified amount.

Parameters:

ParameterTypeDescription
dxintThe amount to offset this Region horizontally.
dyintThe amount to offset this Region vertically.

Method: union(path)

 union(path) 

Updates this Region to the union of itself and the specified GraphicsPath.

Parameters:

ParameterTypeDescription
pathGraphicsPathThe GraphicsPath to unite with this Region.

Method: union(rect)

 union(rect) 

Updates this Region to the union of itself and the specified RectangleF structure.

Parameters:

ParameterTypeDescription
rectRectangleFThe RectangleF structure to unite with this Region.

Method: union(rect)

 union(rect) 

Updates this Region to the union of itself and the specified RectangleF structure.

Parameters:

ParameterTypeDescription
rectRectangleThe RectangleF structure to unite with this Region.

Method: union(region)

 union(region) 

Updates this Region to the union of itself and the specified Region.

Parameters:

ParameterTypeDescription
regionRegionThe Region to unite with this Region.

Method: xor(path)

 xor(path) 

Updates this Region to the union minus the intersection of itself with the specified GraphicsPath.

Parameters:

ParameterTypeDescription
pathGraphicsPathThe GraphicsPath to xor with this Region.

Method: xor(rect)

 xor(rect) 

Updates this Region to the union minus the intersection of itself with the specified RectangleF structure.

Parameters:

ParameterTypeDescription
rectRectangleFThe RectangleF structure to xor with this Region.

Method: xor(rect)

 xor(rect) 

Updates this Region to the union minus the intersection of itself with the specified RectangleF structure.

Parameters:

ParameterTypeDescription
rectRectangleThe RectangleF structure to xor with this Region.

Method: xor(region)

 xor(region) 

Updates this Region to the union minus the intersection of itself with the specified Region.

Parameters:

ParameterTypeDescription
regionRegionThe Region to xor with this Region.