本文整理汇总了VB.NET中System.Drawing.Drawing2D.LinearGradientBrush.ResetTransform方法的典型用法代码示例。如果您正苦于以下问题:VB.NET LinearGradientBrush.ResetTransform方法的具体用法?VB.NET LinearGradientBrush.ResetTransform怎么用?VB.NET LinearGradientBrush.ResetTransform使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Drawing.Drawing2D.LinearGradientBrush
的用法示例。
在下文中一共展示了LinearGradientBrush.ResetTransform方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: ResetTransformExample
Public Sub ResetTransformExample(ByVal e As PaintEventArgs)
' Create a LinearGradientBrush.
Dim myRect As New Rectangle(20, 20, 200, 100)
Dim myLGBrush As New LinearGradientBrush(myRect, Color.Blue, _
Color.Red, 0.0F, True)
' Draw an ellipse to the screen using the LinearGradientBrush.
e.Graphics.FillEllipse(myLGBrush, myRect)
' Transform the LinearGradientBrush.
Dim transformArray As Point() = {New Point(20, 150), _
New Point(400, 150), New Point(20, 200)}
Dim myMatrix As New Matrix(myRect, transformArray)
myLGBrush.MultiplyTransform(myMatrix, MatrixOrder.Prepend)
' Draw a second ellipse to the screen using the transformed brush.
e.Graphics.FillEllipse(myLGBrush, 20, 150, 380, 50)
' Reset the brush transform.
myLGBrush.ResetTransform()
' Draw a third ellipse to the screen using the reset brush.
e.Graphics.FillEllipse(myLGBrush, 20, 250, 200, 100)
End Sub