Table of Contents

Struct RSize

Namespace
TheArtOfDev.HtmlRenderer.Adapters.Entities
Assembly
StockSharp.Xaml.dll

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

public struct RSize
Inherited Members
Extension Methods

Constructors

RSize(double, double)

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

public RSize(double width, double height)

Parameters

width double

The width component of the new RSize structure.

height double

The height component of the new RSize structure.

RSize(RPoint)

Initializes a new instance of the RSize structure from the specified RPoint structure.

public RSize(RPoint pt)

Parameters

pt RPoint

The RPoint structure from which to initialize this RSize structure.

RSize(RSize)

Initializes a new instance of the RSize structure from the specified existing RSize structure.

public RSize(RSize size)

Parameters

size RSize

The RSize structure from which to create the new RSize structure.

Fields

Empty

Gets a RSize structure that has a Height and Width value of 0.

public static readonly RSize Empty

Field Value

RSize

A RSize structure that has a Height and Width value of 0.

Properties

Height

Gets or sets the vertical component of this RSize structure.

public double Height { get; set; }

Property Value

double

The vertical component of this RSize structure, typically measured in pixels.

IsEmpty

Gets a value that indicates whether this RSize structure has zero width and height.

public bool IsEmpty { get; }

Property Value

bool

This property returns true when this RSize structure has both a width and height of zero; otherwise, false.

Width

Gets or sets the horizontal component of this RSize structure.

public double Width { get; set; }

Property Value

double

The horizontal component of this RSize structure, typically measured in pixels.

Methods

Add(RSize, RSize)

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

public static RSize Add(RSize sz1, RSize sz2)

Parameters

sz1 RSize

The first RSize structure to add.

sz2 RSize

The second RSize structure to add.

Returns

RSize

A RSize structure that is the result of the addition operation.

Equals(object)

Tests to see whether the specified object is a RSize structure with the same dimensions as this RSize structure.

public override bool Equals(object obj)

Parameters

obj object

The object to test.

Returns

bool

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

GetHashCode()

Returns a hash code for this RSize structure.

public override int GetHashCode()

Returns

int

An integer value that specifies a hash value for this RSize structure.

Subtract(RSize, RSize)

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

public static RSize Subtract(RSize sz1, RSize sz2)

Parameters

sz1 RSize

The RSize structure on the left side of the subtraction operator.

sz2 RSize

The RSize structure on the right side of the subtraction operator.

Returns

RSize

A RSize structure that is a result of the subtraction operation.

ToPointF()

Converts a RSize structure to a RPoint structure.

public RPoint ToPointF()

Returns

RPoint

Returns a RPoint structure.

ToString()

Creates a human-readable string that represents this RSize structure.

public override string ToString()

Returns

string

A string that represents this RSize structure.

Operators

operator +(RSize, RSize)

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

public static RSize operator +(RSize sz1, RSize sz2)

Parameters

sz1 RSize

The first RSize structure to add.

sz2 RSize

The second RSize structure to add.

Returns

RSize

A RSize structure that is the result of the addition operation.

operator ==(RSize, RSize)

Tests whether two RSize structures are equal.

public static bool operator ==(RSize sz1, RSize sz2)

Parameters

sz1 RSize

The RSize structure on the left side of the equality operator.

sz2 RSize

The RSize structure on the right of the equality operator.

Returns

bool

This operator returns true if sz1 and sz2 have equal width and height; otherwise, false.

explicit operator RPoint(RSize)

Converts the specified RSize structure to a RPoint structure.

public static explicit operator RPoint(RSize size)

Parameters

size RSize

The RSize structure to be converted

Returns

RPoint

The RPoint structure to which this operator converts.

operator !=(RSize, RSize)

Tests whether two RSize structures are different.

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

Parameters

sz1 RSize

The RSize structure on the left of the inequality operator.

sz2 RSize

The RSize 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.

operator -(RSize, RSize)

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

public static RSize operator -(RSize sz1, RSize sz2)

Parameters

sz1 RSize

The RSize structure on the left side of the subtraction operator.

sz2 RSize

The RSize structure on the right side of the subtraction operator.

Returns

RSize

A RSize that is the result of the subtraction operation.