[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.Size2D

Struct Size2D

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

Structure specifing a size with double Width and Height.

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

Constructors

Size2D(Size2F)

Initializes a new instance of the Size2D struct.

public Size2D(Size2F sz)

Parameters

sz Size2F

Size2D(double, double)

Initializes a new instance of the Size2D struct.

public Size2D(double width, double height)

Parameters

width double
height double

Size2D(SizeF)

Initializes a new instance of the Size2D struct.

public Size2D(SizeF sz)

Parameters

sz System.Drawing.SizeF

Fields

Empty

An empty size.

public static readonly Size2D Empty

Field Value

Size2D

Height

The vertical component of this Size2D structure.

public double Height

Field Value

double

Infinite

A size with infinite Width and Height.

public static readonly Size2D Infinite

Field Value

Size2D

SizeInBytes

The size of the Size2D type, in bytes.

public const int SizeInBytes = 16

Field Value

int

Width

The horizontal component of this Size2D structure.

public double Width

Field Value

double

Properties

IsEmpty

Determines if all components of Size2D are equal to zero.

public bool IsEmpty { get; }

Property Value

bool

Methods

Add(Size2D, Size2D)

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

public static Size2D Add(Size2D sz1, Size2D sz2)

Parameters

sz1 Size2D
sz2 Size2D

Returns

Size2D

Equals(Size2D)

Indicates whether this instance and a specified object are equal.

public bool Equals(Size2D other)

Parameters

other Size2D

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(Size2D, double, double)

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

public static Size2D Scale(Size2D sz, double scaleX, double scaleY)

Parameters

sz Size2D
scaleX double
scaleY double

Returns

Size2D

Scale(Size2D, double)

Scales the width and height by the specified scaleFactor.

public static Size2D Scale(Size2D sz, double scaleFactor)

Parameters

sz Size2D
scaleFactor double

Returns

Size2D

Scale(double, double)

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

public void Scale(double scaleX, double scaleY)

Parameters

scaleX double
scaleY double

Scale(double)

Scales the width and height by the specified scaleFactor.

public void Scale(double scaleFactor)

Parameters

scaleFactor double

Subtract(Size2D, Size2D)

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

public static Size2D Subtract(Size2D sz1, Size2D sz2)

Parameters

sz1 Size2D
sz2 Size2D

Returns

Size2D

ToSize2F()

Converts Size2D to Size2F.

public Size2F ToSize2F()

Returns

Size2F

ToSizeF()

Converts Size2D 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 ==(Size2D, Size2D)

Determines if the specified values are equal.

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

Parameters

left Size2D
right Size2D

Returns

bool

operator !=(Size2D, Size2D)

Determines if the specified values are not equal.

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

Parameters

left Size2D
right Size2D

Returns

bool