PointExtensionMethods
Extension methods for Eto.Drawing.Point and Eto.Drawing.PointF
Methods
Gets the angle (in degrees, measured anti-clockwise) of a size, assuming it represents a vector.
Create a plane halfway this plane and another.
Returns: Average plane.
Measure the distance between this point and another.
Returns: Distance between points.
Measure the distance between this point and a line.
Returns: Distance to finite line segment.
Measure the distance between this point and a rectangle.
Returns: Distance to finite line segment.
Measure the distance between this point and a disc.
Returns: Distance to circle.
Measure the distance between this point and another.
public static double DistanceTo()
this PointF
point,
Point to measure distance from.
PointF
other
Point to measure distance to.
Returns: Distance between points.
Measure the distance between this point and a line.
public static double DistanceTo()
this PointF
point,
Point to measure distance to.
PointF
segmentA,
Tier start point.
PointF
segmentB,
Tier end point.
extent
Line treatment.
Returns: Distance to finite line segment.
Measure the distance between this point and a rectangle.
public static double DistanceTo()
this PointF
point,
Point to measure distance to.
RectangleF
rectangle
Rectangle for distance measurement.
Returns: Distance to finite line segment.
Find the tangent lines from this point to a circle.
Returns: True if tangents could be found.
Find the incidence points between two circles.
Find the incidence point between a line and a circle. The incidence is the average of all intersections, or the point in the circle closest to the line.
Test two points for standard coincidence. Points that are very close together are considered to be coincident.
Returns: Coincidence.
Test two points for standard coincidence. Points that are very close together are considered to be coincident.
Returns: Coincidence.
Tests whether the coordinates are valid numbers.
Returns: True if both the x and y coordinates are valid numbers.
Tests whether the dimensions are valid numbers.
Returns: True if both the Width and Height dimensions are valid numbers.
Gets the length of a size, assuming the size represents a vector.
Returns: Length of size.
Move a point in x and y.
Returns: Moved point.
Move a point in x and y.
Returns: Moved point.
Move a point in x and y.
public static PointF Move()
this PointF
point,
Point to move.
SizeF
motion
Motion in X and Y.
Returns: Moved point.
Move a point in x and y.
public static PointF MoveTo()
Returns: Moved point.
Create a perpendicular size, assuming the size represents a vector.
public static SizeF Perpendicular()
this SizeF
size
Size to rotate.
Returns: Perpendicular to size.
Create an array of unit perpendicular vectors.
public static SizeF[] Perpendiculars()
this PointF[]
points
Points to operate on.
Returns: Array of perpendicular vectors (one per input point).
Project this point onto a finite line segment.
Returns: Projected point.
Project this point onto a finite line segment.
public static PointF ProjectTo()
this PointF
point,
Point to project.
PointF
segmentA,
Tier start point.
PointF
segmentB,
Tier end point.
extent
Line treatment.
Returns: Projected point.
Compute the quadrance between two points.
Returns: Quadrance (or distance squared).
Compute the quadrance between two points.
Returns: Quadrance (or distance squared).
Compute the quadrance between two points.
Returns: Quadrance (or distance squared).
Rotate a SizeF assuming it represents a vector.
public static SizeF Rotate()
Returns: Rotated size.
Round the coordinates in a point to a number of decimal places.
Returns: Rounded point.
Round the coordinates of a point.
Returns: Point with coordinates rounded to a specific number of decimal places.
Round a point to integer coordinates.
public static PointF Round()
this PointF
point
Point to modify.
Returns: Point with coordinates rounded to nearest integers.
Round the components in a vector to a number of decimal places.
Returns: Rounded vector.
Gets the scaling factor of a graphics object as implied by its transform matrix.
Returns: Implied scaling factor.
Gets the scaling factor implied by a matrix.
Returns: Implied scaling factor.
Create a size structure between two points.
Create a size structure between two points.
public static SizeF SizeTo()
this PointF
point,
Start point.
PointF
other
end point.
Convert a Point3d into a Point2d.
Returns: Point.
Convert a PointF into a Point2d.
Returns: Point.
Convert an array of Point3d instances to Point2d instances by removing the z-coordinates.
Returns: Two-dimensional points.
Convert a Point2d into a Point3d.
Returns: Point.
Convert a PointF into a Point3d.
Returns: Point.
Convert an array of Point2d instances to Point3d instances.
Returns: Three-dimensional points.
Convert an array of Point2d instances to Point3d instances.
Returns: Three-dimensional points.
Convert an array of Point2d instances to Point3d instances.
Returns: Three-dimensional points.
Convert a Point3d into a Point3f.
Returns: Point.
Convert an Eto point to a GDI point.
public static PointF ToGdiPoint()
this PointF
point
Convert a PointF into a Point.
Returns: Point.
Convert a Point2d to a PointF.
Returns: XY projection of point.
Convert a Point3d to a PointF.
Returns: XY projection of point.
Convert a collection of points into a PointF array.
Convert an array of consecutive (x,y) coordinates into a PointF array.
Unitize a size structure, assuming the size represents a vector.
public static SizeF Unitize()
this SizeF
size
Size to unitize.
Returns: Unitized size.
Thicken a polyline curve.
public static void Widen()
this PointF[]
points,
Polyline points.
out PointF[]
side0,
Points along the left side of the widened path will be returned here.
out PointF[]
side1,
Points along the right side of the widened path will be returned here.
profiles
Sorted array of profiles. Collection may not contain two or more profiles with the same index, but this is not checked for.