Table of Contents

Struct XVector

Namespace
PdfSharp.Drawing
Assembly
PdfSharp.dll

Represents a two-dimensional vector specified by x- and y-coordinates. It is a displacement in 2-D space.

[Serializable]
public struct XVector

Constructors

XVector(double, double)

Initializes a new instance of the XVector struct.

Properties

Length

Gets the length of this vector.

LengthSquared

Gets the square of the length of this vector.

X

Gets or sets the X component of this vector.

Y

Gets or sets the Y component of this vector.

Methods

Add(XVector, XPoint)

Translates a point by the specified vector and returns the resulting point.

Add(XVector, XVector)

Adds two vectors and returns the result as a Vector structure.

AngleBetween(XVector, XVector)

Retrieves the angle, expressed in degrees, between the two specified vectors.

CrossProduct(XVector, XVector)

Calculates the cross product of two vectors.

Determinant(XVector, XVector)

Calculates the determinant of two vectors.

Divide(XVector, double)

Divides the specified vector by the specified scalar and returns the result as a Vector.

Equals(XVector)

Compares two vectors for equality.

Equals(XVector, XVector)

Compares two vectors for equality.

Equals(object?)

Determines whether the specified Object is a Vector structure and, if it is, whether it has the same X and Y values as this vector.

GetHashCode()

Returns the hash code for this instance.

Multiply(XVector, XMatrix)

Transforms the coordinate space of the specified vector using the specified Matrix.

Multiply(XVector, XVector)

Calculates the dot product of the two specified vectors and returns the result as a Double.

Multiply(XVector, double)

Multiplies the specified vector by the specified scalar and returns the resulting vector.

Multiply(double, XVector)

Multiplies the specified scalar by the specified vector and returns the resulting Vector.

Negate()

Negates this vector. The vector has the same magnitude as before, but its direction is now opposite.

Normalize()

Normalizes this vector.

Parse(string)

Converts a string representation of a vector into the equivalent Vector structure.

Subtract(XVector, XVector)

Subtracts the specified vector from another specified vector.

ToString()

Returns the string representation of this Vector structure.

ToString(IFormatProvider)

Returns the string representation of this Vector structure with the specified formatting information.

Operators

operator +(XVector, XPoint)

Translates a point by the specified vector and returns the resulting point.

operator +(XVector, XVector)

Adds two vectors and returns the result as a vector.

operator /(XVector, double)

Divides the specified vector by the specified scalar and returns the resulting vector.

operator ==(XVector, XVector)

Compares two vectors for equality.

explicit operator XPoint(XVector)

Creates a Point with the X and Y values of this vector.

explicit operator XSize(XVector)

Creates a Size from the offsets of this vector.

operator !=(XVector, XVector)

Compares two vectors for inequality.

operator *(XVector, XMatrix)

Transforms the coordinate space of the specified vector using the specified Matrix.

operator *(XVector, XVector)

Calculates the dot product of the two specified vector structures and returns the result as a Double.

operator *(XVector, double)

Multiplies the specified vector by the specified scalar and returns the resulting vector.

operator *(double, XVector)

Multiplies the specified scalar by the specified vector and returns the resulting vector.

operator -(XVector, XVector)

Subtracts one specified vector from another.

operator -(XVector)

Negates the specified vector.