public struct SizeD : IEquatable<SizeD>
Used for representing dimensions of rectangular areas with high precision. Suitable for calculations requiring decimal precision and gradual transformations.
用于表示需要高精度的矩形区域尺寸。 适合需要小数精度和渐变变换的计算。
var preciseSize = new SizeD(1920.5678, 1080.1234);
Size intSize = preciseSize.ToSize(); // Explicit conversion
SizeD fromFloat = new SizeF(100.5f, 200.5f); // Implicit conversion
SizeD | Represents a size with double-precision floating-point dimensions 表示具有双精度浮点尺寸的大小结构体 |
GetType | Gets the Type of the current instance. (继承自 Object。) |
ToSize | Converts to integer-based Size (truncates decimal portion) 转换为整数Size(截断小数部分) |
ToSizeF | Converts to single-precision SizeF (may lose precision) 转换为单精度SizeF(可能丢失精度) |
ToString |
Returns a string representation of the size
返回大小的字符串表示形式
(重写 ValueTypeToString) |
(Size to SizeD) | Implicit conversion from integer-based Size 从整数Size的隐式转换 |
(SizeF to SizeD) | Implicit conversion from single-precision SizeF 从单精度SizeF的隐式转换 |
Height | Gets or sets the vertical dimension 获取或设置垂直尺寸 |
Width | Gets or sets the horizontal dimension 获取或设置水平尺寸 |