Skip to main content

PixelVector Structure

Defines a vector.

Definition​

Namespace: Avalonia
Assembly: Avalonia.Base (in Avalonia.Base.dll)

public readonly struct PixelVector
View Source
InheritanceObject → ValueType → PixelVector

Constructors​

PixelVector(Int32, Int32)Initializes a new instance of the PixelVector structure.

Properties​

LengthLength of the vector
XGets the X vector.
YGets the Y vector.

Methods​

Equals(Object)
(Overrides ValueType.Equals(Object))
Equals(PixelVector)Check if two vectors are equal (bitwise).
GetHashCode()
(Overrides ValueType.GetHashCode())
GetType()Gets the Type of the current instance.
(Inherited from Object)
NearlyEquals(PixelVector)Check if two vectors are nearly equal (numerically).
ToString()Returns the string representation of the point.
(Overrides ValueType.ToString())
WithX(Int32)Returns a new vector with the specified X coordinate.
WithY(Int32)Returns a new vector with the specified Y coordinate.

Operators​

Addition(PixelVector, PixelVector)Adds two vectors.
Division(PixelVector, Int32)Scales a vector.
Equality(PixelVector, PixelVector) 
Explicit(PixelVector to PixelPoint)Converts the PixelVector to a PixelPoint.
Inequality(PixelVector, PixelVector) 
Multiply(PixelVector, PixelVector)Calculates the dot product of two vectors
Multiply(PixelVector, Int32)Scales a vector.
Subtraction(PixelVector, PixelVector)Subtracts two vectors.
UnaryNegation(PixelVector)Negates a vector.

See Also​

Reference​

Avalonia Namespace