Struct SizeF

Struct SizeF

Namespace: Aspose.Page.Drawing
Assembly: Aspose.Page.dll (25.1.2)

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

public struct SizeF

Inherited Members

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

SizeF(SizeF)

Initializes a new instance of the Aspose.Page.Drawing.SizeF structure from the specified existing Aspose.Page.Drawing.SizeF structure.

public SizeF(SizeF size)

Parameters

size SizeF

The Aspose.Page.Drawing.SizeF structure from which to create the new Aspose.Page.Drawing.SizeF structure.

SizeF(#=zWfgi6R$WbIywKCegIXZ99gI=)

public SizeF(#=zWfgi6R$WbIywKCegIXZ99gI= pt)

Parameters

pt #=zWfgi6R$WbIywKCegIXZ99gI=

SizeF(float, float)

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

public SizeF(float width, float height)

Parameters

width float

The width component of the new Aspose.Page.Drawing.SizeF structure.

height float

The height component of the new Aspose.Page.Drawing.SizeF structure.

Fields

Empty

Gets a Aspose.Page.Drawing.SizeF structure that has a Aspose.Page.Drawing.SizeF.Height and Aspose.Page.Drawing.SizeF.Width value of 0.

public static readonly SizeF Empty

Field Value

SizeF

Properties

Height

Gets or sets the vertical component of this Aspose.Page.Drawing.SizeF structure.

public float Height { get; set; }

Property Value

float

IsEmpty

Gets a value that indicates whether this Aspose.Page.Drawing.SizeF structure has zero width and height.

public bool IsEmpty { get; }

Property Value

bool

Width

Gets or sets the horizontal component of this Aspose.Page.Drawing.SizeF structure.

public float Width { get; set; }

Property Value

float

Methods

Clone()

Clones this Aspose.Page.Drawing.SizeF.

public object Clone()

Returns

object

Equals(object)

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

public override bool Equals(object obj)

Parameters

obj object

The System.Object to test.

Returns

bool

This method returns true if obj is a Aspose.Page.Drawing.SizeF and has the same width and height as this Aspose.Page.Drawing.SizeF; otherwise, false.

GetHashCode()

Returns a hash code for this Aspose.Page.Drawing.Size structure.

public override int GetHashCode()

Returns

int

An integer value that specifies a hash value for this Aspose.Page.Drawing.Size structure.

ToString()

Creates a human-readable string that represents this Aspose.Page.Drawing.SizeF structure.

public override string ToString()

Returns

string

A string that represents this Aspose.Page.Drawing.SizeF structure.

Operators

operator ==(SizeF, SizeF)

Tests whether two Aspose.Page.Drawing.SizeF structures are equal.

public static bool operator ==(SizeF left, SizeF right)

Parameters

left SizeF

The Aspose.Page.Drawing.SizeF structure on the left side of the equality operator.

right SizeF

The Aspose.Page.Drawing.SizeF structure on the right of the equality operator.

Returns

bool

This operator returns true if left and right have equal width and height; otherwise, false.

operator !=(SizeF, SizeF)

Tests whether two Aspose.Page.Drawing.SizeF structures are different.

public static bool operator !=(SizeF sz1, SizeF sz2)

Parameters

sz1 SizeF

The Aspose.Page.Drawing.SizeF structure on the left of the inequality operator.

sz2 SizeF

The Aspose.Page.Drawing.SizeF structure on the right of the inequality operator.

Returns

bool

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

 English