Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between System.Drawing.Point and System.Drawing.PointF

Tags:

What is the difference between System.Drawing.Point and System.Drawing.PointF. Can you give an example between this two.

Thanks in advance.

like image 853
Rye Avatar asked Sep 17 '10 08:09

Rye


People also ask

What is PointF?

The PointF class defines a point in the plane using floating point precision. A point is specified by a x coordinate and an y coordinate which can be accessed using the x() and y() functions. The coordinates of the point are specified using floating point numbers for accuracy.

What is PointF C#?

C# Point, PointF StructsUse the Point type, which is found in the System. Drawing namespace. Point. This C# struct represents an X and a Y coordinate grouped together. Points are useful whenever you need to store coordinates.


1 Answers

Point uses integer coordinates (int for X and Y).

PointF uses floating points (float for X and Y).

like image 163
Jon Skeet Avatar answered Oct 12 '22 16:10

Jon Skeet