本文整理汇总了VB.NET中System.Drawing.Drawing2D.LinearGradientBrush.Clone方法的典型用法代码示例。如果您正苦于以下问题:VB.NET LinearGradientBrush.Clone方法的具体用法?VB.NET LinearGradientBrush.Clone怎么用?VB.NET LinearGradientBrush.Clone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Drawing.Drawing2D.LinearGradientBrush
的用法示例。
在下文中一共展示了LinearGradientBrush.Clone方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: CloneExample
Public Sub CloneExample(ByVal e As PaintEventArgs)
' Create a LinearGradientBrush.
Dim x As Integer = 20
Dim y As Integer = 20
Dim h As Integer = 100
Dim w As Integer = 200
Dim myRect As New Rectangle(x, y, w, h)
Dim myLGBrush As New LinearGradientBrush(myRect, Color.Blue, _
Color.Aquamarine, 45.0F, True)
' Draw an ellipse to the screen using the LinearGradientBrush.
e.Graphics.FillEllipse(myLGBrush, x, y, w, h)
' Clone the LinearGradientBrush.
Dim clonedLGBrush As LinearGradientBrush = _
CType(myLGBrush.Clone(), LinearGradientBrush)
' Justify the left edge of the gradient with the left edge of the
' ellipse.
clonedLGBrush.TranslateTransform(-100.0F, 0.0F)
' Draw a second ellipse to the screen using the cloned HBrush.
y = 150
e.Graphics.FillEllipse(clonedLGBrush, x, y, w, h)
End Sub