RectangleF

Inheritance: java.lang.Object, com.aspose.ms.System.ValueType, com.aspose.ms.lang.Struct

public class RectangleF extends Struct<RectangleF>

Stores a set of four floating-point numbers that represent the location and size of a rectangle.

Constructors

ConstructorDescription
RectangleF()
RectangleF(float x, float y, float width, float height)Initializes a new instance of the com.aspose.psd.RectangleF structure with the specified location and size.
RectangleF(PointF location, SizeF size)Initializes a new instance of the com.aspose.psd.RectangleF structure with the specified location and size.

Methods

MethodDescription
Clone()
CloneTo(T arg0)
CloneTo(RectangleF that)
contains(PointF point)Determines if the specified point is contained within this com.aspose.psd.RectangleF structure.
contains(RectangleF rect)Determines if the rectangular region represented by rect is entirely contained within this com.aspose.psd.RectangleF structure.
contains(float x, float y)Determines if the specified point is contained within this com.aspose.psd.RectangleF structure.
equals(Object obj)Tests whether obj is a com.aspose.psd.RectangleF with the same location and size of this com.aspose.psd.RectangleF .
fromLeftTopRightBottom(float left, float top, float right, float bottom)Creates a com.aspose.psd.RectangleF structure with upper-left corner and lower-right corner at the specified locations.
fromPoints(PointF point1, PointF point2)Creates a new Rectangle from two points specified.
getBottom()Gets or sets the y-coordinate that is the sum of com.aspose.psd.RectangleF.Y and com.aspose.psd.RectangleF.Height of this com.aspose.psd.RectangleF structure.
getClass()
getEmpty()Gets a new instance of the com.aspose.psd.RectangleF structure that has com.aspose.psd.RectangleF.X , com.aspose.psd.RectangleF.Y , com.aspose.psd.RectangleF.Width and com.aspose.psd.RectangleF.Height values set to zero.
getHeight()Gets or sets the height of this com.aspose.psd.RectangleF structure.
getLeft()Gets or sets the x-coordinate of the left edge of this com.aspose.psd.RectangleF structure.
getLocation()Gets or sets the coordinates of the upper-left corner of this com.aspose.psd.RectangleF structure.
getRight()Gets or sets the x-coordinate that is the sum of com.aspose.psd.RectangleF.X and com.aspose.psd.RectangleF.Width of this com.aspose.psd.RectangleF structure.
getSize()Gets or sets the size of this com.aspose.psd.RectangleF .
getTop()Gets or sets the y-coordinate of the top edge of this com.aspose.psd.RectangleF structure.
getWidth()Gets or sets the width of this com.aspose.psd.RectangleF structure.
getX()Gets or sets the x-coordinate of the upper-left corner of this com.aspose.psd.RectangleF structure.
getY()Gets or sets the y-coordinate of the upper-left corner of this com.aspose.psd.RectangleF structure.
hashCode()Gets the hash code for this com.aspose.psd.RectangleF structure.
inflate(RectangleF rect, float x, float y)Creates and returns an inflated copy of the specified com.aspose.psd.RectangleF structure.
inflate(SizeF size)Inflates this com.aspose.psd.RectangleF by the specified amount.
inflate(float x, float y)Inflates this com.aspose.psd.RectangleF structure by the specified amount.
intersect(RectangleF rect)Replaces this com.aspose.psd.RectangleF structure with the intersection of itself and the specified com.aspose.psd.RectangleF structure.
intersect(RectangleF a, RectangleF b)Returns a com.aspose.psd.RectangleF structure that represents the intersection of two rectangles.
intersectsWith(RectangleF rect)Determines if this rectangle intersects with rect .
isEmpty()Gets a value indicating whether the com.aspose.psd.RectangleF.Width or com.aspose.psd.RectangleF.Height property of this com.aspose.psd.RectangleF has a value of zero.
isEquals(RectangleF obj1, RectangleF obj2)
normalize()Normalizes the rectangle by making it’s width and height positive, left less than right and top less than bottom.
notify()
notifyAll()
offset(PointF pos)Adjusts the location of this rectangle by the specified amount.
offset(float x, float y)Adjusts the location of this rectangle by the specified amount.
op_Division(RectangleF rectangle, float divider)Implements the operator /.
op_Equality(RectangleF left, RectangleF right)Tests whether two com.aspose.psd.RectangleF structures have equal location and size.
op_Inequality(RectangleF left, RectangleF right)Tests whether two com.aspose.psd.RectangleF structures differ in location or size.
op_Multiply(RectangleF rectangle, float multiplier)Implements the operator *.
setBottom(float value)Gets or sets the y-coordinate that is the sum of com.aspose.psd.RectangleF.Y and com.aspose.psd.RectangleF.Height of this com.aspose.psd.RectangleF structure.
setHeight(float value)Gets or sets the height of this com.aspose.psd.RectangleF structure.
setLeft(float value)Gets or sets the x-coordinate of the left edge of this com.aspose.psd.RectangleF structure.
setLocation(PointF value)Gets or sets the coordinates of the upper-left corner of this com.aspose.psd.RectangleF structure.
setRight(float value)Gets or sets the x-coordinate that is the sum of com.aspose.psd.RectangleF.X and com.aspose.psd.RectangleF.Width of this com.aspose.psd.RectangleF structure.
setSize(SizeF value)Gets or sets the size of this com.aspose.psd.RectangleF .
setTop(float value)Gets or sets the y-coordinate of the top edge of this com.aspose.psd.RectangleF structure.
setWidth(float value)Gets or sets the width of this com.aspose.psd.RectangleF structure.
setX(float value)Gets or sets the x-coordinate of the upper-left corner of this com.aspose.psd.RectangleF structure.
setY(float value)Gets or sets the y-coordinate of the upper-left corner of this com.aspose.psd.RectangleF structure.
toString()Converts the attributes of this com.aspose.psd.RectangleF to a human-readable string.
to_RectangleF(Rectangle rect)Converts the specified com.aspose.psd.Rectangle structure to a com.aspose.psd.RectangleF structure.
union(RectangleF a, RectangleF b)Creates the smallest possible third rectangle that can contain both of two rectangles that form a union.
wait()
wait(long arg0)
wait(long arg0, int arg1)

RectangleF()

public RectangleF()

RectangleF(float x, float y, float width, float height)

public RectangleF(float x, float y, float width, float height)

Initializes a new instance of the com.aspose.psd.RectangleF structure with the specified location and size.

Parameters:

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

RectangleF(PointF location, SizeF size)

public RectangleF(PointF location, SizeF size)

Initializes a new instance of the com.aspose.psd.RectangleF structure with the specified location and size.

Parameters:

ParameterTypeDescription
locationPointFA com.aspose.psd.PointF that represents the upper-left corner of the rectangular region.
sizeSizeFA com.aspose.psd.SizeF that represents the width and height of the rectangular region.

Clone()

public RectangleF Clone()

Returns: RectangleF

CloneTo(T arg0)

public abstract void CloneTo(T arg0)

Parameters:

ParameterTypeDescription
arg0T

CloneTo(RectangleF that)

public void CloneTo(RectangleF that)

Parameters:

ParameterTypeDescription
thatRectangleF

contains(PointF point)

public boolean contains(PointF point)

Determines if the specified point is contained within this com.aspose.psd.RectangleF structure.

Parameters:

ParameterTypeDescription
pointPointFThe com.aspose.psd.PointF to test.

Returns: boolean - This method returns true if the point represented by the point parameter is contained within this com.aspose.psd.RectangleF structure; otherwise false.

contains(RectangleF rect)

public boolean contains(RectangleF rect)

Determines if the rectangular region represented by rect is entirely contained within this com.aspose.psd.RectangleF structure.

Parameters:

ParameterTypeDescription
rectRectangleFThe com.aspose.psd.RectangleF to test.

Returns: boolean - This method returns true if the rectangular region represented by rect is entirely contained within the rectangular region represented by this com.aspose.psd.RectangleF ; otherwise false.

contains(float x, float y)

public boolean contains(float x, float y)

Determines if the specified point is contained within this com.aspose.psd.RectangleF structure.

Parameters:

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

Returns: boolean - This method returns true if the point defined by x and y is contained within this com.aspose.psd.RectangleF structure; otherwise false.

equals(Object obj)

public boolean equals(Object obj)

Tests whether obj is a com.aspose.psd.RectangleF with the same location and size of this com.aspose.psd.RectangleF .

Parameters:

ParameterTypeDescription
objjava.lang.ObjectThe System.Object to test.

Returns: boolean - This method returns true if obj is a com.aspose.psd.RectangleF and its X, Y, Width, and Height properties are equal to the corresponding properties of this com.aspose.psd.RectangleF ; otherwise, false.

fromLeftTopRightBottom(float left, float top, float right, float bottom)

public static RectangleF fromLeftTopRightBottom(float left, float top, float right, float bottom)

Creates a com.aspose.psd.RectangleF structure with upper-left corner and lower-right corner at the specified locations.

Parameters:

ParameterTypeDescription
leftfloatThe x-coordinate of the upper-left corner of the rectangular region.
topfloatThe y-coordinate of the upper-left corner of the rectangular region.
rightfloatThe x-coordinate of the lower-right corner of the rectangular region.
bottomfloatThe y-coordinate of the lower-right corner of the rectangular region.

Returns: RectangleF - The new com.aspose.psd.RectangleF that this method creates.

fromPoints(PointF point1, PointF point2)

public static RectangleF fromPoints(PointF point1, PointF point2)

Creates a new Rectangle from two points specified. Two verticles of the created Rectangle will be equal to the passed point1 and point2 . These would be typically the opposite vertices.

Parameters:

ParameterTypeDescription
point1PointFThe first Point for the new rectangle.
point2PointFThe second Point for the new rectangle.

Returns: RectangleF - A newly created Rectangle .

getBottom()

public float getBottom()

Gets or sets the y-coordinate that is the sum of com.aspose.psd.RectangleF.Y and com.aspose.psd.RectangleF.Height of this com.aspose.psd.RectangleF structure.

Returns: float - The y-coordinate that is the sum of com.aspose.psd.RectangleF.Y and com.aspose.psd.RectangleF.Height of this com.aspose.psd.RectangleF structure.

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getEmpty()

public static RectangleF getEmpty()

Gets a new instance of the com.aspose.psd.RectangleF structure that has com.aspose.psd.RectangleF.X , com.aspose.psd.RectangleF.Y , com.aspose.psd.RectangleF.Width and com.aspose.psd.RectangleF.Height values set to zero.

Returns: RectangleF

getHeight()

public float getHeight()

Gets or sets the height of this com.aspose.psd.RectangleF structure.

Returns: float - The height of this com.aspose.psd.RectangleF structure.

getLeft()

public float getLeft()

Gets or sets the x-coordinate of the left edge of this com.aspose.psd.RectangleF structure.

Returns: float - The x-coordinate of the left edge of this com.aspose.psd.RectangleF structure.

getLocation()

public PointF getLocation()

Gets or sets the coordinates of the upper-left corner of this com.aspose.psd.RectangleF structure.

Returns: PointF - A com.aspose.psd.PointF that represents the upper-left corner of this com.aspose.psd.RectangleF structure.

getRight()

public float getRight()

Gets or sets the x-coordinate that is the sum of com.aspose.psd.RectangleF.X and com.aspose.psd.RectangleF.Width of this com.aspose.psd.RectangleF structure.

Returns: float - The x-coordinate that is the sum of com.aspose.psd.RectangleF.X and com.aspose.psd.RectangleF.Width of this com.aspose.psd.RectangleF structure.

getSize()

public SizeF getSize()

Gets or sets the size of this com.aspose.psd.RectangleF .

Returns: SizeF - A com.aspose.psd.SizeF that represents the width and height of this com.aspose.psd.RectangleF structure.

getTop()

public float getTop()

Gets or sets the y-coordinate of the top edge of this com.aspose.psd.RectangleF structure.

Returns: float - The y-coordinate of the top edge of this com.aspose.psd.RectangleF structure.

getWidth()

public float getWidth()

Gets or sets the width of this com.aspose.psd.RectangleF structure.

Returns: float - The width of this com.aspose.psd.RectangleF structure.

getX()

public float getX()

Gets or sets the x-coordinate of the upper-left corner of this com.aspose.psd.RectangleF structure.

Returns: float - The x-coordinate of the upper-left corner of this com.aspose.psd.RectangleF structure.

getY()

public float getY()

Gets or sets the y-coordinate of the upper-left corner of this com.aspose.psd.RectangleF structure.

Returns: float - The y-coordinate of the upper-left corner of this com.aspose.psd.RectangleF structure.

hashCode()

public int hashCode()

Gets the hash code for this com.aspose.psd.RectangleF structure.

Returns: int - The hash code for this com.aspose.psd.RectangleF .

inflate(RectangleF rect, float x, float y)

public static RectangleF inflate(RectangleF rect, float x, float y)

Creates and returns an inflated copy of the specified com.aspose.psd.RectangleF structure. The copy is inflated by the specified amount. The original rectangle remains unmodified.

Parameters:

ParameterTypeDescription
rectRectangleFThe com.aspose.psd.RectangleF to be copied. This rectangle is not modified.
xfloatThe amount to inflate the copy of the rectangle horizontally.
yfloatThe amount to inflate the copy of the rectangle vertically.

Returns: RectangleF - The inflated com.aspose.psd.RectangleF .

inflate(SizeF size)

public void inflate(SizeF size)

Inflates this com.aspose.psd.RectangleF by the specified amount.

Parameters:

ParameterTypeDescription
sizeSizeFThe amount to inflate this rectangle.

inflate(float x, float y)

public void inflate(float x, float y)

Inflates this com.aspose.psd.RectangleF structure by the specified amount.

Parameters:

ParameterTypeDescription
xfloatThe amount to inflate this com.aspose.psd.RectangleF structure horizontally.
yfloatThe amount to inflate this com.aspose.psd.RectangleF structure vertically.

intersect(RectangleF rect)

public void intersect(RectangleF rect)

Replaces this com.aspose.psd.RectangleF structure with the intersection of itself and the specified com.aspose.psd.RectangleF structure.

Parameters:

ParameterTypeDescription
rectRectangleFThe rectangle to intersect.

intersect(RectangleF a, RectangleF b)

public static RectangleF intersect(RectangleF a, RectangleF b)

Returns a com.aspose.psd.RectangleF structure that represents the intersection of two rectangles. If there is no intersection, and empty com.aspose.psd.RectangleF is returned.

Parameters:

ParameterTypeDescription
aRectangleFA first rectangle to intersect.
bRectangleFA second rectangle to intersect.

Returns: RectangleF - A third com.aspose.psd.RectangleF structure the size of which represents the overlapped area of the two specified rectangles.

intersectsWith(RectangleF rect)

public boolean intersectsWith(RectangleF rect)

Determines if this rectangle intersects with rect .

Parameters:

ParameterTypeDescription
rectRectangleFThe rectangle to test.

Returns: boolean - This method returns true if there is any intersection.

isEmpty()

public boolean isEmpty()

Gets a value indicating whether the com.aspose.psd.RectangleF.Width or com.aspose.psd.RectangleF.Height property of this com.aspose.psd.RectangleF has a value of zero.

Returns: boolean - This property returns true if the com.aspose.psd.RectangleF.Width or com.aspose.psd.RectangleF.Height property of this com.aspose.psd.RectangleF has a value of zero; otherwise, false.

isEquals(RectangleF obj1, RectangleF obj2)

public static boolean isEquals(RectangleF obj1, RectangleF obj2)

Parameters:

ParameterTypeDescription
obj1RectangleF
obj2RectangleF

Returns: boolean

normalize()

public void normalize()

Normalizes the rectangle by making it’s width and height positive, left less than right and top less than bottom.

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

offset(PointF pos)

public void offset(PointF pos)

Adjusts the location of this rectangle by the specified amount.

Parameters:

ParameterTypeDescription
posPointFThe amount to offset the location.

offset(float x, float y)

public void offset(float x, float y)

Adjusts the location of this rectangle by the specified amount.

Parameters:

ParameterTypeDescription
xfloatThe amount to offset the location horizontally.
yfloatThe amount to offset the location vertically.

op_Division(RectangleF rectangle, float divider)

public static RectangleF op_Division(RectangleF rectangle, float divider)

Implements the operator /.

Parameters:

ParameterTypeDescription
rectangleRectangleFThe rectangle.
dividerfloatThe divider.

Returns: RectangleF - The result of the operator.

op_Equality(RectangleF left, RectangleF right)

public static boolean op_Equality(RectangleF left, RectangleF right)

Tests whether two com.aspose.psd.RectangleF structures have equal location and size.

Parameters:

ParameterTypeDescription
leftRectangleFThe com.aspose.psd.RectangleF structure that is to the left of the equality operator.
rightRectangleFThe com.aspose.psd.RectangleF structure that is to the right of the equality operator.

Returns: boolean - This operator returns true if the two specified com.aspose.psd.RectangleF structures have equal com.aspose.psd.RectangleF.X , com.aspose.psd.RectangleF.Y , com.aspose.psd.RectangleF.Width , and com.aspose.psd.RectangleF.Height properties.

op_Inequality(RectangleF left, RectangleF right)

public static boolean op_Inequality(RectangleF left, RectangleF right)

Tests whether two com.aspose.psd.RectangleF structures differ in location or size.

Parameters:

ParameterTypeDescription
leftRectangleFThe com.aspose.psd.RectangleF structure that is to the left of the inequality operator.
rightRectangleFThe com.aspose.psd.RectangleF structure that is to the right of the inequality operator.

Returns: boolean - This operator returns true if any of the com.aspose.psd.RectangleF.X , com.aspose.psd.RectangleF.Y , com.aspose.psd.RectangleF.Width , or com.aspose.psd.RectangleF.Height properties of the two com.aspose.psd.RectangleF structures are unequal; otherwise false.

op_Multiply(RectangleF rectangle, float multiplier)

public static RectangleF op_Multiply(RectangleF rectangle, float multiplier)

Implements the operator *.

Parameters:

ParameterTypeDescription
rectangleRectangleFThe rectangle.
multiplierfloatThe multiplier.

Returns: RectangleF - The result of the operator.

setBottom(float value)

public void setBottom(float value)

Gets or sets the y-coordinate that is the sum of com.aspose.psd.RectangleF.Y and com.aspose.psd.RectangleF.Height of this com.aspose.psd.RectangleF structure.

Parameters:

ParameterTypeDescription
valuefloat

setHeight(float value)

public void setHeight(float value)

Gets or sets the height of this com.aspose.psd.RectangleF structure.

Parameters:

ParameterTypeDescription
valuefloat

setLeft(float value)

public void setLeft(float value)

Gets or sets the x-coordinate of the left edge of this com.aspose.psd.RectangleF structure.

Parameters:

ParameterTypeDescription
valuefloat

setLocation(PointF value)

public void setLocation(PointF value)

Gets or sets the coordinates of the upper-left corner of this com.aspose.psd.RectangleF structure.

Parameters:

ParameterTypeDescription
valuePointF

setRight(float value)

public void setRight(float value)

Gets or sets the x-coordinate that is the sum of com.aspose.psd.RectangleF.X and com.aspose.psd.RectangleF.Width of this com.aspose.psd.RectangleF structure.

Parameters:

ParameterTypeDescription
valuefloat

setSize(SizeF value)

public void setSize(SizeF value)

Gets or sets the size of this com.aspose.psd.RectangleF .

Parameters:

ParameterTypeDescription
valueSizeF

setTop(float value)

public void setTop(float value)

Gets or sets the y-coordinate of the top edge of this com.aspose.psd.RectangleF structure.

Parameters:

ParameterTypeDescription
valuefloat

setWidth(float value)

public void setWidth(float value)

Gets or sets the width of this com.aspose.psd.RectangleF structure.

Parameters:

ParameterTypeDescription
valuefloat

setX(float value)

public void setX(float value)

Gets or sets the x-coordinate of the upper-left corner of this com.aspose.psd.RectangleF structure.

Parameters:

ParameterTypeDescription
valuefloat

setY(float value)

public void setY(float value)

Gets or sets the y-coordinate of the upper-left corner of this com.aspose.psd.RectangleF structure.

Parameters:

ParameterTypeDescription
valuefloat

toString()

public String toString()

Converts the attributes of this com.aspose.psd.RectangleF to a human-readable string.

Returns: java.lang.String - A string that contains the position, width, and height of this com.aspose.psd.RectangleF structure.

to_RectangleF(Rectangle rect)

public static RectangleF to_RectangleF(Rectangle rect)

Converts the specified com.aspose.psd.Rectangle structure to a com.aspose.psd.RectangleF structure.

Parameters:

ParameterTypeDescription
rectRectangleThe com.aspose.psd.Rectangle structure to convert.

Returns: RectangleF - The com.aspose.psd.RectangleF structure that is converted from the specified com.aspose.psd.Rectangle structure.

union(RectangleF a, RectangleF b)

public static RectangleF union(RectangleF a, RectangleF b)

Creates the smallest possible third rectangle that can contain both of two rectangles that form a union.

Parameters:

ParameterTypeDescription
aRectangleFA first rectangle to union.
bRectangleFA second rectangle to union.

Returns: RectangleF - A third com.aspose.psd.RectangleF structure that contains both of the two rectangles that form the union.

wait()

public final void wait()

wait(long arg0)

public final void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int