SizeF

SizeF class

Represents a pair of single-precision floating point values that represent width and height of an image. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type.

class SizeF

Methods

MethodDescription
static SizeF Add(const SizeF&, const SizeF&)Returns a new SizeF object that is a sum of the specified SizeF objects, i.e. whose width value is equal to the sum of width values of the specified objects and height value is equal to the sum of height values of the specified objects.
bool Equals(const SizeF&) constDetermines if the current object and the specified object are equal, i.e. represent the same pair of width and hegiht values.
float get_Height() constReturns the value of height represented by the current object.
bool get_IsEmpty() constDetermines if both width and hegiht values are equal to 0.
float get_Width() constReturns the value of width represented by the current object.
int32_t GetHashCode() constReturns a hash code for the current object.
operator PointF() constConverts the current object to an instance of Point object by initializing its X and Y coordinate with the current object’s width and height values correspondingly.
SizeF& operator+=(const SizeF&)Adds the specified SizeF object’s width and height values to the width and height values of the current SizeF object correspondingly.
void set_Height(float)Sets the value of height represented by the current object.
void set_Width(float)Sets the value of width represented by the current object.
SizeF()Constructs a new SizeF object and initializes its width and height values with 0.
SizeF(const PointF&)Constructs a new SizeF object and initializes its width and height values with the values of X and Y coordinates of the specifide point correspondingly.
SizeF(float, float)Constructs a new SizeF object and initializes it with the specified value.
static SizeF Subtract(const SizeF&, const SizeF&)Returns a new SizeF object that is the results of subctraction of size2 from size1, i.e. whose width value is the result of subtraction of size2’s width value from size1’s width value and height value is the result of subtraction of size2’s height value from size1’s height value.
PointF ToPointF() constConverts the current object to an instance of Point object by initializing its X and Y coordinate with the current object’s width and height values correspondingly.
Size ToSize() constConstructs a Size object from the current SizeF object by truncating the SizeF object’s width and height values to the next lower integer values.
System::String ToString() constReturns the string representation of the pair of width and hegiht values represented by the current object.

Fields

FieldDescription
static EmptyAn empty instance of SizeF class whose width and height values are 0.

See Also