Size.Round : Size « 2D Graphics « VB.Net Tutorial






Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Windows.Forms

public class Test
   public Shared Sub Main
        Dim pt1 As New PointF(30.6F, 30.8F)
        Dim pt2 As New PointF(50.3F, 60.7F)
        Dim pt3 As New PointF(110.3F, 80.5F)

        Dim sz1 As New SizeF(pt1)
        Dim sz2 As New SizeF(pt2)
        Dim sz3 As New SizeF(pt3)

        Dim sz4 As Size = Size.Round(sz1)

        Console.WriteLine(sz4.ToString())
   End Sub
End class
{Width=31, Height=31}








17.18.Size
17.18.1.Size.Truncate
17.18.2.Size.Round
17.18.3.Size.Ceiling