[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.Size2F

Struct Size2F

Namespace
GrapeCity.Documents.DX
Assembly
GcDocs.DX.Windows.dll

Structure specifing a size with float Width and Height.

public struct Size2F : IEquatable<Size2F>
Implements
System.IEquatable<T><Size2F>
Inherited Members
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()

Constructors

Size2F(Size2D)

Initializes a new instance of the Size2F struct.

public Size2F(Size2D sz)

Parameters

sz Size2D

Size2F(Size2L)

Initializes a new instance of the Size2F struct.

public Size2F(Size2L sz)

Parameters

sz Size2L

Size2F(SizeF)

Initializes a new instance of the Size2F struct.

public Size2F(SizeF sz)

Parameters

sz System.Drawing.SizeF

Size2F(float, float)

Initializes a new instance of the Size2F struct.

public Size2F(float width, float height)

Parameters

width float
height float

Fields

Empty

An empty size.

public static readonly Size2F Empty

Field Value

Size2F

Height

The vertical component of this Size2F structure.

public float Height

Field Value

float

Infinite

A size with infinite Width and Height.

public static readonly Size2F Infinite

Field Value

Size2F

SizeInBytes

The size of the Size2F type, in bytes.

public const int SizeInBytes = 8

Field Value

int

Width

The horizontal component of this Size2F structure.

public float Width

Field Value

float

Properties

IsEmpty

Determines if all components of Size2F are equal to zero.

public bool IsEmpty { get; }

Property Value

bool

Methods

Add(Size2F, Size2F)

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

public static Size2F Add(Size2F sz1, Size2F sz2)

Parameters

sz1 Size2F
sz2 Size2F

Returns

Size2F

Equals(Size2F)

Indicates whether this instance and a specified object are equal.

public bool Equals(Size2F other)

Parameters

other Size2F

Returns

bool

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

Returns a hash code for this instance.

public override int GetHashCode()

Returns

int

Round()

Returns a Size2L with rounded width and height.

public Size2L Round()

Returns

Size2L

Scale(Size2F, float, float)

Scales the width and height by the specified scaleX and scaleY.

public static Size2F Scale(Size2F sz, float scaleX, float scaleY)

Parameters

sz Size2F
scaleX float
scaleY float

Returns

Size2F

Scale(Size2F, float)

Scales the width and height by the specified scaleFactor.

public static Size2F Scale(Size2F sz, float scaleFactor)

Parameters

sz Size2F
scaleFactor float

Returns

Size2F

Scale(float, float)

Scales the width and height by the specified scaleX and scaleY.

public void Scale(float scaleX, float scaleY)

Parameters

scaleX float
scaleY float

Scale(float)

Scales the width and height by the specified scaleFactor.

public void Scale(float scaleFactor)

Parameters

scaleFactor float

Subtract(Size2F, Size2F)

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

public static Size2F Subtract(Size2F sz1, Size2F sz2)

Parameters

sz1 Size2F
sz2 Size2F

Returns

Size2F

ToSize2D()

Converts Size2F to Size2D.

public Size2D ToSize2D()

Returns

Size2D

ToSizeF()

Converts Size2F to System.Drawing.SizeF.

public SizeF ToSizeF()

Returns

System.Drawing.SizeF

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

Truncate()

Returns a Size2L with truncated width and height.

public Size2L Truncate()

Returns

Size2L

Operators

operator ==(Size2F, Size2F)

Determines if the specified values are equal.

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

Parameters

left Size2F
right Size2F

Returns

bool

explicit operator Vector2(Size2F)

Performs an explicit conversion from Size2F to Vector2.

public static explicit operator Vector2(Size2F value)

Parameters

value Size2F

Returns

Vector2

explicit operator SizeF(Size2F)

Performs an explicit conversion from Size2F to System.Drawing.SizeF.

public static explicit operator SizeF(Size2F value)

Parameters

value Size2F

Returns

System.Drawing.SizeF

explicit operator Size2F(Vector2)

Performs an explicit conversion from Vector2 to Size2F.

public static explicit operator Size2F(Vector2 v)

Parameters

v Vector2

Returns

Size2F

explicit operator Size2F(SizeF)

Performs an explicit conversion from System.Drawing.SizeF to Size2F.

public static explicit operator Size2F(SizeF sz)

Parameters

sz System.Drawing.SizeF

Returns

Size2F

operator !=(Size2F, Size2F)

Determines if the specified values are not equal.

public static bool operator !=(Size2F left, Size2F right)

Parameters

left Size2F
right Size2F

Returns

bool