PixelPoint Struct

Summary

Represents a point in device pixels.
Namespace
Avalonia
Interfaces
Base Types
  • object
  • ValueType
graph BT Type-->Base0["ValueType"] Base0-->Base1["object"] Type-.->Interface0["IEquatable<PixelPoint>"] Type["PixelPoint"] class Type type-node

Syntax

public readonly struct PixelPoint : ValueType, IEquatable<PixelPoint>

Constructors

Name Summary
PixelPoint(int, int) Initializes a new instance of the PixelPoint structure.

Fields

Name Constant Value Summary
Origin
A point representing 0,0.
static

Properties

Name Value Summary
X int
Gets the X co-ordinate.
Y int
Gets the Y co-ordinate.

Methods

Name Value Summary
Equals(object) bool
Checks for equality between a point and an object.
Equals(PixelPoint) bool
Returns a boolean indicating whether the point is equal to the other given point.
FromPoint(Point, double) PixelPoint
Converts a Point to device pixels using the specified scaling factor.
static
FromPoint(Point, Vector) PixelPoint
Converts a Point to device pixels using the specified scaling factor.
static
FromPointWithDpi(Point, double) PixelPoint
Converts a Point to device pixels using the specified dots per inch (DPI).
static
FromPointWithDpi(Point, Vector) PixelPoint
Converts a Point to device pixels using the specified dots per inch (DPI).
static
GetHashCode() int
Returns a hash code for a PixelPoint.
Parse(string) PixelPoint
Parses a PixelPoint string.
static
ToPoint(double) Point
Converts the PixelPoint to a device-independent Point using the specified scaling factor.
ToPoint(Vector) Point
Converts the PixelPoint to a device-independent Point using the specified scaling factor.
ToPointWithDpi(double) Point
Converts the PixelPoint to a device-independent Point using the specified dots per inch (DPI).
ToPointWithDpi(Vector) Point
Converts the PixelPoint to a device-independent Point using the specified dots per inch (DPI).
ToString() string
Returns the string representation of the point.
WithX(int) PixelPoint
Returns a new PixelPoint with the same Y co-ordinate and the specified X co-ordinate.
WithY(int) PixelPoint
Returns a new PixelPoint with the same X co-ordinate and the specified Y co-ordinate.

Operators

Name Value Summary
implicit operator PixelVector(PixelPoint) PixelVector
operator !=(PixelPoint, PixelPoint) bool
operator -(PixelPoint, PixelPoint) PixelPoint
operator -(PixelPoint, PixelVector) PixelPoint
operator +(PixelPoint, PixelPoint) PixelPoint
operator +(PixelPoint, PixelVector) PixelPoint
operator ==(PixelPoint, PixelPoint) bool