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
doubleThe width component of the new RSize structure.
height
doubleThe height component of the new RSize structure.
RSize(RPoint)
public RSize(RPoint pt)
Parameters
RSize(RSize)
public RSize(RSize size)
Parameters
Fields
Empty
public static readonly RSize Empty
Field Value
Properties
Height
Gets or sets the vertical component of this RSize structure.
public double Height { get; set; }
Property Value
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
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
Returns
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
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
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
RSizeThe RSize structure on the left side of the subtraction operator.
sz2
RSizeThe RSize structure on the right side of the subtraction operator.
Returns
ToPointF()
public RPoint ToPointF()
Returns
ToString()
Creates a human-readable string that represents this RSize structure.
public override string ToString()
Returns
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
Returns
operator ==(RSize, RSize)
Tests whether two RSize structures are equal.
public static bool operator ==(RSize sz1, RSize sz2)
Parameters
sz1
RSizeThe RSize structure on the left side of the equality operator.
sz2
RSizeThe RSize structure on the right of the equality operator.
Returns
- bool
This operator returns true if
sz1
andsz2
have equal width and height; otherwise, false.
explicit operator RPoint(RSize)
public static explicit operator RPoint(RSize size)
Parameters
Returns
operator !=(RSize, RSize)
Tests whether two RSize structures are different.
public static bool operator !=(RSize sz1, RSize sz2)
Parameters
sz1
RSizeThe RSize structure on the left of the inequality operator.
sz2
RSizeThe RSize structure on the right of the inequality operator.
Returns
- bool
This operator returns true if
sz1
andsz2
differ either in width or height; false ifsz1
andsz2
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
RSizeThe RSize structure on the left side of the subtraction operator.
sz2
RSizeThe RSize structure on the right side of the subtraction operator.