SizeF

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

All Implemented Interfaces: com.aspose.ms.System.IEquatable, java.lang.Cloneable

public class SizeF extends Struct<SizeF> implements System.IEquatable<SizeF>, Cloneable

Stores an ordered pair of floating-point numbers, typically the width and height of a rectangle.

Constructors

ConstructorDescription
SizeF()
SizeF(float width, float height)Initializes a new instance of the SizeF structure from the specified dimensions.
SizeF(PointF pt)Initializes a new instance of the SizeF struct.
SizeF(SizeF size)Initializes a new instance of the SizeF struct.

Methods

MethodDescription
op_Equality(SizeF sz1, SizeF sz2)Tests whether two SizeF structures are equal.
op_Inequality(SizeF sz1, SizeF sz2)Tests whether two SizeF structures are different.
add(SizeF sz1, SizeF sz2)Adds the width and height of one SizeF structure to the width and height of another SizeF structure.
subtract(SizeF sz1, SizeF sz2)Subtracts the width and height of one SizeF structure from the width and height of another SizeF structure.
op_Addition(SizeF sz1, SizeF sz2)Adds the width and height of one SizeF structure to the width and height of another SizeF structure.
op_Subtraction(SizeF sz1, SizeF sz2)Subtracts the width and height of one SizeF structure from the width and height of another SizeF structure.
op_Multiply(float left, SizeF right)Multiplies SizeF by a float producing SizeF.
op_Multiply(SizeF left, float right)Multiplies SizeF by a float producing SizeF.
op_Division(SizeF left, float right)Divides SizeF by a float producing SizeF.
to_PointF(SizeF size)
isEquals(SizeF obj1, SizeF obj2)
getEmpty()
isEmpty()Gets a value indicating whether this SizeF structure has zero width and height.
getWidth()Gets the horizontal component of this SizeF structure.
setWidth(float value)Sets the horizontal component of this SizeF structure.
getHeight()Gets the vertical component of this SizeF structure.
setHeight(float value)Sets the vertical component of this SizeF structure.
hashCode()Returns a hash code for this SizeF structure.
toString()
equals(Object obj)Tests to see whether the specified object is a SizeF structure with the same dimensions as this SizeF structure.
toSize()Converts a SizeF structure to a Size structure.
toPointF()Converts a SizeF structure to a PointF structure.
equals(SizeF other)Tests whether other SizeF structure has the same size of this SizeF structure.
CloneTo(SizeF that)
Clone()
clone()

SizeF()

public SizeF()

SizeF(float width, float height)

public SizeF(float width, float height)

Initializes a new instance of the SizeF structure from the specified dimensions.

Parameters:

ParameterTypeDescription
widthfloatThe width component of the new SizeF structure.
heightfloatThe height component of the new SizeF structure.

SizeF(PointF pt)

public SizeF(PointF pt)

Initializes a new instance of the SizeF struct.

Parameters:

ParameterTypeDescription
ptPointFThe PointF structure from which to initialize this SizeF structure.

SizeF(SizeF size)

public SizeF(SizeF size)

Initializes a new instance of the SizeF struct.

Parameters:

ParameterTypeDescription
sizeSizeFThe SizeF structure from which to create the new SizeF structure.

op_Equality(SizeF sz1, SizeF sz2)

public static boolean op_Equality(SizeF sz1, SizeF sz2)

Tests whether two SizeF structures are equal.

Parameters:

ParameterTypeDescription
sz1SizeFThe SizeF structure on the left side of the equality operator.
sz2SizeFThe SizeF structure on the right of the equality operator.

Returns: boolean - This operator returns true if sz1 and sz2 have equal width and height; otherwise, false.

op_Inequality(SizeF sz1, SizeF sz2)

public static boolean op_Inequality(SizeF sz1, SizeF sz2)

Tests whether two SizeF structures are different.

Parameters:

ParameterTypeDescription
sz1SizeFThe SizeF structure on the left of the inequality operator.
sz2SizeFThe SizeF structure on the right of the inequality operator.

Returns: boolean - This operator returns true if sz1 and sz2 differ either in width or height; false if sz1 and sz2 are equal.

add(SizeF sz1, SizeF sz2)

public static SizeF add(SizeF sz1, SizeF sz2)

Adds the width and height of one SizeF structure to the width and height of another SizeF structure.

Parameters:

ParameterTypeDescription
sz1SizeFThe first SizeF structure to add.
sz2SizeFThe second SizeF structure to add.

Returns: SizeF - A SizeF structure that is the result of the addition operation.

subtract(SizeF sz1, SizeF sz2)

public static SizeF subtract(SizeF sz1, SizeF sz2)

Subtracts the width and height of one SizeF structure from the width and height of another SizeF structure.

Parameters:

ParameterTypeDescription
sz1SizeFThe SizeF structure on the left side of the subtraction operator.
sz2SizeFThe SizeF structure on the right side of the subtraction operator.

Returns: SizeF - A SizeF structure that is a result of the subtraction operation.

op_Addition(SizeF sz1, SizeF sz2)

public static SizeF op_Addition(SizeF sz1, SizeF sz2)

Adds the width and height of one SizeF structure to the width and height of another SizeF structure.

Parameters:

ParameterTypeDescription
sz1SizeFThe first SizeF structure to add.
sz2SizeFThe second SizeF structure to add.

Returns: SizeF - A Size structure that is the result of the addition operation.

op_Subtraction(SizeF sz1, SizeF sz2)

public static SizeF op_Subtraction(SizeF sz1, SizeF sz2)

Subtracts the width and height of one SizeF structure from the width and height of another SizeF structure.

Parameters:

ParameterTypeDescription
sz1SizeFThe SizeF structure on the left side of the subtraction operator.
sz2SizeFThe SizeF structure on the right side of the subtraction operator.

Returns: SizeF - A SizeF that is the result of the subtraction operation.

op_Multiply(float left, SizeF right)

public static SizeF op_Multiply(float left, SizeF right)

Multiplies SizeF by a float producing SizeF.

Parameters:

ParameterTypeDescription
leftfloatMultiplier of type float.
rightSizeFMultiplicand of type SizeF.

Returns: SizeF - Product of type SizeF.

op_Multiply(SizeF left, float right)

public static SizeF op_Multiply(SizeF left, float right)

Multiplies SizeF by a float producing SizeF.

Parameters:

ParameterTypeDescription
leftSizeFMultiplicand of type SizeF.
rightfloatMultiplier of type float.

Returns: SizeF - Product of type SizeF.

op_Division(SizeF left, float right)

public static SizeF op_Division(SizeF left, float right)

Divides SizeF by a float producing SizeF.

Parameters:

ParameterTypeDescription
leftSizeFDividend of type SizeF.
rightfloatDivisor of type int.

Returns: SizeF - Result of type SizeF.

to_PointF(SizeF size)

public static PointF to_PointF(SizeF size)

Parameters:

ParameterTypeDescription
sizeSizeF

Returns: PointF

isEquals(SizeF obj1, SizeF obj2)

public static boolean isEquals(SizeF obj1, SizeF obj2)

Parameters:

ParameterTypeDescription
obj1SizeF
obj2SizeF

Returns: boolean

getEmpty()

public static SizeF getEmpty()

Returns: SizeF

isEmpty()

public final boolean isEmpty()

Gets a value indicating whether this SizeF structure has zero width and height.

Returns: boolean - a value indicating whether this SizeF structure has zero width and height.

getWidth()

public final float getWidth()

Gets the horizontal component of this SizeF structure.

Returns: float - the horizontal component of this SizeF structure.

setWidth(float value)

public final void setWidth(float value)

Sets the horizontal component of this SizeF structure.

Parameters:

ParameterTypeDescription
valuefloatthe horizontal component of this SizeF structure.

getHeight()

public final float getHeight()

Gets the vertical component of this SizeF structure.

Returns: float - the vertical component of this SizeF structure.

setHeight(float value)

public final void setHeight(float value)

Sets the vertical component of this SizeF structure.

Parameters:

ParameterTypeDescription
valuefloatthe vertical component of this SizeF structure.

hashCode()

public int hashCode()

Returns a hash code for this SizeF structure.

Returns: int - An integer value that specifies a hash value for this SizeF structure.

toString()

public String toString()

Returns: java.lang.String

equals(Object obj)

public boolean equals(Object obj)

Tests to see whether the specified object is a SizeF structure with the same dimensions as this SizeF structure.

Parameters:

ParameterTypeDescription
objjava.lang.ObjectThe Object to test.

Returns: boolean - This method returns true if obj is a SizeF and has the same width and height as this SizeF; otherwise, false.

toSize()

public final Size toSize()

Converts a SizeF structure to a Size structure.

Returns: Size - Returns a Size structure.

toPointF()

public final PointF toPointF()

Converts a SizeF structure to a PointF structure.

Returns: PointF - Returns a PointF structure.

equals(SizeF other)

public final boolean equals(SizeF other)

Tests whether other SizeF structure has the same size of this SizeF structure.

Parameters:

ParameterTypeDescription
otherSizeFOther size to test

Returns: boolean - This method returns true if other SizeF structure and its Width and Height properties are equal to the corresponding properties of this SizeF structure; otherwise, false.

CloneTo(SizeF that)

public void CloneTo(SizeF that)

Parameters:

ParameterTypeDescription
thatSizeF

Clone()

public SizeF Clone()

Returns: SizeF

clone()

public Object clone()

Returns: java.lang.Object