Point Ceiling, Round, Truncate : Point « 2D « C# / CSharp Tutorial






using System;
using System.Drawing;
using System.Windows.Forms;
class PaintHello
{
     public static void Main()
     {
   
            PointF pt1 = new PointF(30.6f, 30.8f);
            PointF pt2 = new PointF(50.3f, 60.7f);
            PointF pt3 = new PointF(110.3f, 80.5f);
            Point pt4 = Point.Ceiling(pt1);
            Point pt5 = Point.Round(pt2);
            Point pt6 = Point.Truncate(pt3);
            MessageBox.Show("Value of pt4: " +pt4.ToString());
            MessageBox.Show("Value of pt5: " +pt5.ToString());
            MessageBox.Show("Value of pt6: " +pt6.ToString());


     }
}








27.4.Point
27.4.1.Create and offset a point
27.4.2.Overloaded Point operators: ==
27.4.3.Add point and size and copy to point
27.4.4.Concert Point to Size
27.4.5.Create a PointF from Point
27.4.6.Createing Point
27.4.7.Createing PointF
27.4.8.Point Ceiling, Round, Truncate
27.4.9.Subtract point and size