public class SizeF extends
Stores an ordered pair of floating-point numbers, typically the width and height of a rectangle.
| Constructor and Description |
|---|
SizeF() |
SizeF(float width,
float height)
Initializes a new instance of the
Aspose.Imaging.SizeF structure from the specified dimensions. |
SizeF(PointF point)
Initializes a new instance of the
Aspose.Imaging.SizeF structure from the specified Aspose.Imaging.PointF. |
SizeF(SizeF size)
Initializes a new instance of the
Aspose.Imaging.SizeF structure from the specified Aspose.Imaging.SizeF. |
| Modifier and Type | Method and Description |
|---|---|
static SizeF |
add(SizeF size1,
SizeF size2)
Adds the width and height of one
Aspose.Imaging.SizeF structure to the width and height of another Aspose.Imaging.SizeF structure. |
java.lang.Object |
clone() |
SizeF |
Clone() |
void |
CloneTo(SizeF that) |
boolean |
equals(java.lang.Object obj)
Tests to see whether the specified object is a
Aspose.Imaging.SizeF with the same dimensions as this Aspose.Imaging.SizeF. |
static boolean |
equals(SizeF obj1,
SizeF obj2) |
static SizeF |
getEmpty()
Gets a new instance of the
Aspose.Imaging.SizeF structure that has Aspose.Imaging.SizeF.Width and Aspose.Imaging.SizeF.Height values set to zero. |
float |
getHeight()
Gets the vertical component of this
Aspose.Imaging.SizeF. |
float |
getWidth()
Gets the horizontal component of this
Aspose.Imaging.SizeF. |
int |
hashCode()
Returns a hash code for this
Aspose.Imaging.Size structure. |
boolean |
isEmpty()
Gets a value indicating whether this
Aspose.Imaging.SizeF has zero width and height. |
static SizeF |
op_Addition(SizeF size1,
SizeF size2)
Adds the width and height of one
Aspose.Imaging.SizeF structure to the width and height of another Aspose.Imaging.SizeF structure. |
static boolean |
op_Equality(SizeF size1,
SizeF size2)
Tests whether two
Aspose.Imaging.SizeF structures are equal. |
static boolean |
op_Inequality(SizeF size1,
SizeF size2)
Tests whether two
Aspose.Imaging.SizeF structures are different. |
static SizeF |
op_Subtraction(SizeF size1,
SizeF size2)
Subtracts the width and height of one
Aspose.Imaging.SizeF structure from the width and height of another Aspose.Imaging.SizeF structure. |
void |
setHeight(float value)
Sets the vertical component of this
Aspose.Imaging.SizeF. |
void |
setWidth(float value)
Sets the horizontal component of this
Aspose.Imaging.SizeF. |
static SizeF |
subtract(SizeF size1,
SizeF size2)
Subtracts the width and height of one
Aspose.Imaging.SizeF structure from the width and height of another Aspose.Imaging.SizeF structure. |
static PointF |
to_PointF(SizeF size)
Converts the specified
Aspose.Imaging.SizeF to a Aspose.Imaging.PointF. |
PointF |
toPointF()
Converts a
Aspose.Imaging.SizeF to a Aspose.Imaging.PointF. |
Size |
toSize()
Converts a
Aspose.Imaging.SizeF to a Aspose.Imaging.Size structure with truncated size values. |
java.lang.String |
toString()
Creates a human-readable string that represents this
Aspose.Imaging.SizeF. |
public SizeF()
public SizeF(float width,
float height)
Initializes a new instance of the Aspose.Imaging.SizeF structure from the specified dimensions.
width - The width component of the new Aspose.Imaging.SizeF.height - The height component of the new Aspose.Imaging.SizeF.public SizeF(PointF point)
Initializes a new instance of the Aspose.Imaging.SizeF structure from the specified Aspose.Imaging.PointF.
point - The Aspose.Imaging.PointF from which to initialize this Aspose.Imaging.SizeF.public SizeF(SizeF size)
Initializes a new instance of the Aspose.Imaging.SizeF structure from the specified Aspose.Imaging.SizeF.
size - The Aspose.Imaging.SizeF from which to create the new Aspose.Imaging.SizeF.public static SizeF add(SizeF size1, SizeF size2)
Adds the width and height of one Aspose.Imaging.SizeF structure to the width and height of another Aspose.Imaging.SizeF structure.
size1 - The first Aspose.Imaging.SizeF to add.size2 - The second Aspose.Imaging.SizeF to add.Aspose.Imaging.SizeF structure that is the result of the addition operation.public java.lang.Object clone()
public SizeF Clone()
public void CloneTo(SizeF that)
public boolean equals(java.lang.Object obj)
Tests to see whether the specified object is a Aspose.Imaging.SizeF with the same dimensions as this Aspose.Imaging.SizeF.
obj - The System.Object to test.obj is a Aspose.Imaging.SizeF and has the same width and height as this Aspose.Imaging.SizeF; otherwise, false.public static SizeF getEmpty()
Gets a new instance of the Aspose.Imaging.SizeF structure that has Aspose.Imaging.SizeF.Width and Aspose.Imaging.SizeF.Height values set to zero.
public float getHeight()
Gets the vertical component of this Aspose.Imaging.SizeF.
Aspose.Imaging.SizeF, typically measured in pixels.public float getWidth()
Gets the horizontal component of this Aspose.Imaging.SizeF.
Aspose.Imaging.SizeF, typically measured in pixels.public int hashCode()
Returns a hash code for this Aspose.Imaging.Size structure.
Aspose.Imaging.Size structure.public boolean isEmpty()
Gets a value indicating whether this Aspose.Imaging.SizeF has zero width and height.
Aspose.Imaging.SizeF has both a width and height of zero; otherwise, false.public static SizeF op_Addition(SizeF size1, SizeF size2)
Adds the width and height of one Aspose.Imaging.SizeF structure to the width and height of another Aspose.Imaging.SizeF structure.
size1 - The first Aspose.Imaging.SizeF to add.size2 - The second Aspose.Imaging.SizeF to add.Aspose.Imaging.SizeF structure that is the result of the addition operation.public static boolean op_Equality(SizeF size1, SizeF size2)
Tests whether two Aspose.Imaging.SizeF structures are equal.
size1 - The Aspose.Imaging.SizeF structure on the left side of the equality operator.size2 - The Aspose.Imaging.SizeF structure on the right of the equality operator.size1 and size2 have equal width and height; otherwise, false.public static boolean op_Inequality(SizeF size1, SizeF size2)
Tests whether two Aspose.Imaging.SizeF structures are different.
size1 - The Aspose.Imaging.SizeF structure on the left of the inequality operator.size2 - The Aspose.Imaging.SizeF structure on the right of the inequality operator.size1 and size2 differ either in width or height; false if size1 and size2 are equal.public static SizeF op_Subtraction(SizeF size1, SizeF size2)
Subtracts the width and height of one Aspose.Imaging.SizeF structure from the width and height of another Aspose.Imaging.SizeF structure.
size1 - The Aspose.Imaging.SizeF on the left side of the subtraction operator.size2 - The Aspose.Imaging.SizeF on the right side of the subtraction operator.Aspose.Imaging.SizeF that is the result of the subtraction operation.public void setHeight(float value)
Sets the vertical component of this Aspose.Imaging.SizeF.
public void setWidth(float value)
Sets the horizontal component of this Aspose.Imaging.SizeF.
public static SizeF subtract(SizeF size1, SizeF size2)
Subtracts the width and height of one Aspose.Imaging.SizeF structure from the width and height of another Aspose.Imaging.SizeF structure.
size1 - The Aspose.Imaging.SizeF structure on the left side of the subtraction operator.size2 - The Aspose.Imaging.SizeF structure on the right side of the subtraction operator.Aspose.Imaging.SizeF that is a result of the subtraction operation.public static PointF to_PointF(SizeF size)
Converts the specified Aspose.Imaging.SizeF to a Aspose.Imaging.PointF.
size - The Aspose.Imaging.SizeF structure to be convertedAspose.Imaging.PointF structure to which this operator converts.public PointF toPointF()
Converts a Aspose.Imaging.SizeF to a Aspose.Imaging.PointF.
Aspose.Imaging.PointF structure.public Size toSize()
Converts a Aspose.Imaging.SizeF to a Aspose.Imaging.Size structure with truncated size values.
Aspose.Imaging.Size structure.public java.lang.String toString()
Creates a human-readable string that represents this Aspose.Imaging.SizeF.
Aspose.Imaging.SizeF.