1. system. Drawing. Point
It indicates the ordered pairs of point, integer x, and Y coordinates defined in the two-dimensional plane. X and Y are integers;. NET 2.0 is mainly used in Windows form to indicate a point of GDI +.
2. system. Windows. Point
X and Y coordinate pairs in two-dimensional space. X and Y are of the double type. Net 3.0, mainly used in WPF, while WPF does not use GDI +.
3. Comparison:
System. Windows. point can be converted to system. Drawing. Point, but it may cause loss of precision.
System. Drawing. Point can also be converted to system. Windows. Point without loss of precision.
The area of system. Windows. Point is larger than that of system. Drawing. Point, but the two are not comparable because they represent different objects.
We recommend that you override the equals Method for point comparison.
4. Conversion Method:
System. Windows. Point wpoint = new system. Windows. Point (1.1, 2.33434 );
System. Drawing. Point dpoint = new system. Drawing. Point (1, 2 );
Dpoint. x = (INT) wpoint. X;
Dpoint. Y = (INT) wpoint. Y;
// Wpoint. x = dpoint. X;
// Wpoint. Y = dpoint. Y;