com.aspose.imaging
Class SizeF

java.lang.Object
  extended by 
      extended by com.aspose.imaging.SizeF

public class SizeF
extends

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


Constructor Summary
SizeF()
           
SizeF(float width, float height)
           Initializes a new instance of the SizeF structure from the specified dimensions.
SizeF(PointF point)
           Initializes a new instance of the SizeF structure from the specified PointF.
SizeF(SizeF size)
           Initializes a new instance of the SizeF structure from the specified SizeF.
 
Method Summary
static SizeF add(SizeF size1, SizeF size2)
           Adds the width and height of one SizeF structure to the width and height of another SizeF structure.
 java.lang.Object clone()
           
 SizeF Clone()
           
 void CloneTo(SizeF that)
           
 boolean equals(java.lang.Object obj)
           
static boolean equals(SizeF obj1, SizeF obj2)
           
static SizeF getEmpty()
           Gets a new instance of the SizeF structure that has SizeF.Width and SizeF.Height values set to zero.
 float getHeight()
           Gets or sets the vertical component of this SizeF.
 float getWidth()
           Gets or sets the horizontal component of this SizeF.
 int hashCode()
           Returns a hash code for this Size structure.
 boolean isEmpty()
           Gets a value indicating whether this SizeF has zero width and height.
static SizeF op_Addition(SizeF size1, SizeF size2)
           Adds the width and height of one SizeF structure to the width and height of another SizeF structure.
static boolean op_Equality(SizeF size1, SizeF size2)
           Tests whether two SizeF structures are equal.
static boolean op_Inequality(SizeF size1, SizeF size2)
           Tests whether two SizeF structures are different.
static SizeF op_Subtraction(SizeF size1, SizeF size2)
           Subtracts the width and height of one SizeF structure from the width and height of another SizeF structure.
 void setHeight(float value)
           Sets or sets the vertical component of this SizeF.
 void setWidth(float value)
           Sets or sets the horizontal component of this SizeF.
static SizeF subtract(SizeF size1, SizeF size2)
           Subtracts the width and height of one SizeF structure from the width and height of another SizeF structure.
 PointF toPointF()
           Converts a SizeF to a PointF.
static PointF toPointF(SizeF size)
           Converts the specified SizeF to a PointF.
 Size toSize()
           Converts a SizeF to a Size structure with truncated size values.
 java.lang.String toString()
           Creates a human-readable string that represents this SizeF.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SizeF

public SizeF()

SizeF

public SizeF(float width,
             float height)

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

Parameters:
width - The width component of the new SizeF.
height - The height component of the new SizeF.

SizeF

public SizeF(PointF point)

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

Parameters:
point - The PointF from which to initialize this SizeF.

SizeF

public SizeF(SizeF size)

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

Parameters:
size - The SizeF from which to create the new SizeF.
Method Detail

add

public static SizeF add(SizeF size1,
                        SizeF size2)

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

Parameters:
size1 - The first SizeF to add.
size2 - The second SizeF to add.
Returns:
A SizeF structure that is the result of the addition operation.

clone

public java.lang.Object clone()

Clone

public SizeF Clone()

CloneTo

public void CloneTo(SizeF that)

equals

public boolean equals(java.lang.Object obj)

equals

public static boolean equals(SizeF obj1,
                             SizeF obj2)

getEmpty

public static SizeF getEmpty()

Gets a new instance of the SizeF structure that has SizeF.Width and SizeF.Height values set to zero.


getHeight

public float getHeight()

Gets or sets the vertical component of this SizeF.

Returns:
The vertical component of this SizeF, typically measured in pixels.

getWidth

public float getWidth()

Gets or sets the horizontal component of this SizeF.

Returns:
The horizontal component of this SizeF, typically measured in pixels.

hashCode

public int hashCode()

Returns a hash code for this Size structure.

Returns:
An integer value that specifies a hash value for this Size structure.

isEmpty

public boolean isEmpty()

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

Returns:
This property returns true when this SizeF has both a width and height of zero; otherwise, false.

op_Addition

public static SizeF op_Addition(SizeF size1,
                                SizeF size2)

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

Parameters:
size1 - The first SizeF to add.
size2 - The second SizeF to add.
Returns:
A SizeF structure that is the result of the addition operation.

op_Equality

public static boolean op_Equality(SizeF size1,
                                  SizeF size2)

Tests whether two SizeF structures are equal.

Parameters:
size1 - The SizeF structure on the left side of the equality operator.
size2 - The SizeF structure on the right of the equality operator.
Returns:
This operator returns true if size1 and size2 have equal width and height; otherwise, false.

op_Inequality

public static boolean op_Inequality(SizeF size1,
                                    SizeF size2)

Tests whether two SizeF structures are different.

Parameters:
size1 - The SizeF structure on the left of the inequality operator.
size2 - The SizeF structure on the right of the inequality operator.
Returns:
This operator returns true if size1 and size2 differ either in width or height; false if size1 and size2 are equal.

op_Subtraction

public static SizeF op_Subtraction(SizeF size1,
                                   SizeF size2)

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

Parameters:
size1 - The SizeF on the left side of the subtraction operator.
size2 - The SizeF on the right side of the subtraction operator.
Returns:
A SizeF that is the result of the subtraction operation.

setHeight

public void setHeight(float value)

Sets or sets the vertical component of this SizeF.


setWidth

public void setWidth(float value)

Sets or sets the horizontal component of this SizeF.


subtract

public static SizeF subtract(SizeF size1,
                             SizeF size2)

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

Parameters:
size1 - The SizeF structure on the left side of the subtraction operator.
size2 - The SizeF structure on the right side of the subtraction operator.
Returns:
The SizeF that is a result of the subtraction operation.

toPointF

public PointF toPointF()

Converts a SizeF to a PointF.

Returns:
Returns a PointF structure.

toPointF

public static PointF toPointF(SizeF size)

Converts the specified SizeF to a PointF.

Parameters:
size - The SizeF structure to be converted
Returns:
The PointF structure to which this operator converts.

toSize

public Size toSize()

Converts a SizeF to a Size structure with truncated size values.

Returns:
Returns a Size structure.

toString

public java.lang.String toString()

Creates a human-readable string that represents this SizeF.

Returns:
A string that represents this SizeF.