VB.Net by API/System.Drawing/Size — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Версия 16:40, 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