本文整理匯總了VB.NET中System.Drawing.Graphics.TransformPoints方法的典型用法代碼示例。如果您正苦於以下問題:VB.NET Graphics.TransformPoints方法的具體用法?VB.NET Graphics.TransformPoints怎麽用?VB.NET Graphics.TransformPoints使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Drawing.Graphics
的用法示例。
在下文中一共展示了Graphics.TransformPoints方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: TransformPointsPoint
Private Sub TransformPointsPoint(ByVal e As PaintEventArgs)
' Create array of two points.
Dim points As Point() = {New Point(0, 0), New Point(100, 50)}
' Draw line connecting two untransformed points.
e.Graphics.DrawLine(New Pen(Color.Blue, 3), points(0), points(1))
' Set world transformation of Graphics object to translate.
e.Graphics.TranslateTransform(40, 30)
' Transform points in array from world to page coordinates.
e.Graphics.TransformPoints(CoordinateSpace.Page, _
CoordinateSpace.World, points)
' Reset world transformation.
e.Graphics.ResetTransform()
' Draw line that connects transformed points.
e.Graphics.DrawLine(New Pen(Color.Red, 3), points(0), points(1))
End Sub
示例2: TransformPointsPointF
Private Sub TransformPointsPointF(ByVal e As PaintEventArgs)
' Create array of two points.
Dim points As PointF() = {New PointF(0.0F, 0.0F), New PointF(100.0F, _
50.0F)}
' Draw line connecting two untransformed points.
e.Graphics.DrawLine(New Pen(Color.Blue, 3), points(0), points(1))
' Set world transformation of Graphics object to translate.
e.Graphics.TranslateTransform(40.0F, 30.0F)
' Transform points in array from world to page coordinates.
e.Graphics.TransformPoints(CoordinateSpace.Page, _
CoordinateSpace.World, points)
' Reset world transformation.
e.Graphics.ResetTransform()
' Draw line that connects transformed points.
e.Graphics.DrawLine(New Pen(Color.Red, 3), points(0), points(1))
End Sub