Summary
Represents a size in device pixels.
Syntax
public readonly struct PixelSize : ValueType, IEquatable<PixelSize>
Constructors
Name | Summary |
---|---|
PixelSize |
Initializes a new instance of the PixelSize structure.
|
Fields
Name | Constant Value | Summary |
---|---|---|
Empty |
A size representing zero
static
|
Properties
Name | Value | Summary |
---|---|---|
AspectRatio | double |
Gets the aspect ratio of the size.
|
Height | int |
Gets the height.
|
Width | int |
Gets the width.
|
Methods
Name | Value | Summary |
---|---|---|
Equals |
bool |
Checks for equality between a size and an object.
|
Equals |
bool |
Returns a boolean indicating whether the size is equal to the other given size.
|
FromSize |
PixelSize |
Converts a
Size to device pixels using the specified scaling factor.
static
|
FromSize |
PixelSize |
Converts a
Size to device pixels using the specified scaling factor.
static
|
FromSizeWithDpi |
PixelSize |
Converts a
Size to device pixels using the specified dots per inch (DPI).
static
|
FromSizeWithDpi |
PixelSize |
Converts a
Size to device pixels using the specified dots per inch (DPI).
static
|
GetHashCode |
int |
Returns a hash code for a
PixelSize .
|
Parse |
PixelSize |
Parses a
PixelSize string.
static
|
ToSize |
Size | |
ToSize |
Size | |
ToSizeWithDpi |
Size | |
ToSizeWithDpi |
Size | |
ToString |
string |
Returns the string representation of the size.
|
WithHeight |
PixelSize |
Returns a new
PixelSize with the same width and the specified height.
|
WithWidth |
PixelSize |
Returns a new
PixelSize with the same height and the specified width.
|
Operators
Name | Value | Summary |
---|---|---|
operator != |
bool | |
operator == |
bool |