VB.Net by API/System.Drawing/Size — различия между версиями

Материал из VB Эксперт
Перейти к: навигация, поиск
м (1 версия)
 
м (1 версия)
 
(нет различий)

Текущая версия на 12:49, 26 мая 2010

Size.Ceiling

  
 
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.Ceiling(sz1)
        Console.WriteLine(sz4.ToString())
   End Sub
End class


Size.Round

  
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


Size.Truncate

  
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.Truncate(sz1)
        Console.WriteLine(sz4.ToString())
   End Sub
End class