[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.Point2F

Struct Point2F

Namespace
GrapeCity.Documents.DX
Assembly
GcDocs.DX.Windows.dll

Structure specifing a point with float X and Y coordinates.

public struct Point2F : IEquatable<Point2F>
Implements
System.IEquatable<T><Point2F>
Inherited Members
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()

Constructors

Point2F(Point2D)

Initializes a new instance of the Point2F struct.

public Point2F(Point2D p)

Parameters

p Point2D

Point2F(Point2L)

Initializes a new instance of the Point2F struct.

public Point2F(Point2L p)

Parameters

p Point2L

Point2F(PointF)

Initializes a new instance of the Point2F struct.

public Point2F(PointF p)

Parameters

p System.Drawing.PointF

Point2F(float, float)

Initializes a new instance of the Point2F struct.

public Point2F(float x, float y)

Parameters

x float
y float

Fields

Empty

An empty point.

public static readonly Point2F Empty

Field Value

Point2F

SizeInBytes

The size of the Point2F type, in bytes.

public const int SizeInBytes = 8

Field Value

int

X

The X coordinate of the point.

public float X

Field Value

float

Y

The Y coordinate of the point.

public float Y

Field Value

float

Properties

IsEmpty

Determines if all components of Point2F are equal to zero.

public bool IsEmpty { get; }

Property Value

bool

Methods

Distance(Point2F)

Gets the distance to the given point.

public float Distance(Point2F pt)

Parameters

pt Point2F

Returns

float

DistanceSquared(Point2F)

Gets the square of the distance to the given point.

public float DistanceSquared(Point2F pt)

Parameters

pt Point2F

Returns

float

Equals(Point2F)

Indicates whether this instance and a specified object are equal.

public bool Equals(Point2F other)

Parameters

other Point2F

Returns

bool

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

FromDips(Point2F, float, float)

Converts a point from DIPs to pixels.

public static Point2F FromDips(Point2F pt, float dpiX, float dpiY)

Parameters

pt Point2F
dpiX float
dpiY float

Returns

Point2F

FromDips(float, float)

Converts a point from DIPs to pixels.

public void FromDips(float dpiX, float dpiY)

Parameters

dpiX float
dpiY float

GetHashCode()

Returns a hash code for this instance.

public override int GetHashCode()

Returns

int

Offset(Point2F, Point2F)

Offsets the point by the specified amount.

public static Point2F Offset(Point2F point1, Point2F point2)

Parameters

point1 Point2F
point2 Point2F

Returns

Point2F

Offset(Point2F, Size2F)

Offsets the point by the specified amount.

public static Point2F Offset(Point2F pt, Size2F sz)

Parameters

pt Point2F
sz Size2F

Returns

Point2F

Offset(Point2F, Vector2)

Offsets the point by the specified amount.

public static Point2F Offset(Point2F pt, Vector2 offset)

Parameters

pt Point2F
offset Vector2

Returns

Point2F

Offset(Point2F, float, float)

Offsets the point by the specified amount.

public static Point2F Offset(Point2F pt, float dx, float dy)

Parameters

pt Point2F
dx float
dy float

Returns

Point2F

Offset(Point2F)

Offsets the point by the specified amount.

public void Offset(Point2F pt)

Parameters

pt Point2F

Offset(Size2F)

Offsets the point by the specified amount.

public void Offset(Size2F sz)

Parameters

sz Size2F

Offset(Vector2)

Offsets the point by the specified amount.

public void Offset(Vector2 vector)

Parameters

vector Vector2

Offset(float, float)

Offsets the point by the specified amount.

public void Offset(float dx, float dy)

Parameters

dx float
dy float

Round()

Returns a Point2L with rounded X and Y coordinates.

public Point2L Round()

Returns

Point2L

Scale(Point2F, float, float)

Scales X and Y coordinates of a point by the specified scaleX and scaleY.

public static Point2F Scale(Point2F pt, float scaleX, float scaleY)

Parameters

pt Point2F
scaleX float
scaleY float

Returns

Point2F

Scale(Point2F, float)

Scales X and Y coordinates of a point by the specified scaleFactor.

public static Point2F Scale(Point2F pt, float scaleFactor)

Parameters

pt Point2F
scaleFactor float

Returns

Point2F

Scale(float, float)

Scales X and Y coordinates of a point by the specified scaleX and scaleY.

public void Scale(float scaleX, float scaleY)

Parameters

scaleX float
scaleY float

Scale(float)

Scales X and Y coordinates of a point by the specified scaleFactor.

public void Scale(float scaleFactor)

Parameters

scaleFactor float

ToDips(Point2F, float, float)

Converts a point from pixels to DIPs.

public static Point2F ToDips(Point2F pt, float dpiX, float dpiY)

Parameters

pt Point2F
dpiX float
dpiY float

Returns

Point2F

ToDips(float, float)

Converts a point from pixels to DIPs.

public void ToDips(float dpiX, float dpiY)

Parameters

dpiX float
dpiY float

ToPoint2D()

Converts Point2F to Point2D.

public Point2D ToPoint2D()

Returns

Point2D

ToPointF()

Converts Point2F to System.Drawing.PointF.

public PointF ToPointF()

Returns

System.Drawing.PointF

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

Transform(in Matrix3x2)

Transforms a point by the 3x2 matrix.

public void Transform(in Matrix3x2 matrix)

Parameters

matrix Matrix3x2

The matrix to use as a tranformation matrix.

Transform(Point2F, in Matrix3x2)

Transforms a point by the 3x2 matrix.

public static Point2F Transform(Point2F point, in Matrix3x2 matrix)

Parameters

point Point2F

The original point to apply the transformation.

matrix Matrix3x2

The matrix to use as a tranformation matrix.

Returns

Point2F

The result of the transformation for the input point.

Truncate()

Returns a Point2L with truncated X and Y coordinates.

public Point2L Truncate()

Returns

Point2L

Operators

operator +(Point2F, Point2F)

Returns the result of addition of point2 to point1.

public static Point2F operator +(Point2F point1, Point2F point2)

Parameters

point1 Point2F
point2 Point2F

Returns

Point2F

operator +(Point2F, Size2F)

Returns the result of addition of size to point.

public static Point2F operator +(Point2F p, Size2F sz)

Parameters

p Point2F
sz Size2F

Returns

Point2F

operator +(Point2F, Vector2)

Returns the result of addition of the given offset to the specified point.

public static Point2F operator +(Point2F pt, Vector2 offset)

Parameters

pt Point2F
offset Vector2

Returns

Point2F

operator ==(Point2F, Point2F)

Determines if the specified values are equal.

public static bool operator ==(Point2F left, Point2F right)

Parameters

left Point2F
right Point2F

Returns

bool

explicit operator Vector2(Point2F)

Performs an explicit conversion from Point2F to Vector2.

public static explicit operator Vector2(Point2F value)

Parameters

value Point2F

Returns

Vector2

explicit operator PointF(Point2F)

Performs an explicit conversion from Point2F to System.Drawing.PointF.

public static explicit operator PointF(Point2F value)

Parameters

value Point2F

Returns

System.Drawing.PointF

explicit operator Point2F(Vector2)

Performs an explicit conversion from Vector2 to Point2F.

public static explicit operator Point2F(Vector2 v)

Parameters

v Vector2

Returns

Point2F

explicit operator Point2F(PointF)

Performs an explicit conversion from System.Drawing.PointF to Point2F.

public static explicit operator Point2F(PointF p)

Parameters

p System.Drawing.PointF

Returns

Point2F

operator !=(Point2F, Point2F)

Determines if the specified values are not equal.

public static bool operator !=(Point2F left, Point2F right)

Parameters

left Point2F
right Point2F

Returns

bool

operator -(Point2F, Point2F)

Returns the result of substruction of point2 from point1.

public static Point2F operator -(Point2F point1, Point2F point2)

Parameters

point1 Point2F
point2 Point2F

Returns

Point2F

operator -(Point2F, Size2F)

Returns the result of substruction of size from point.

public static Point2F operator -(Point2F point, Size2F sz)

Parameters

point Point2F
sz Size2F

Returns

Point2F

operator -(Point2F, Vector2)

Returns the result of substruction of the given vector from point.

public static Point2F operator -(Point2F point, Vector2 vector)

Parameters

point Point2F
vector Vector2

Returns

Point2F