本文整理汇总了VB.NET中System.Drawing.RectangleF.Equality操作符的典型用法代码示例。如果您正苦于以下问题:VB.NET RectangleF.Equality操作符的具体用法?VB.NET RectangleF.Equality怎么用?VB.NET RectangleF.Equality使用的例子?那么, 这里精选的操作符代码示例或许可以为您提供帮助。您也可以进一步了解该操作符所在类System.Drawing.RectangleF
的用法示例。
在下文中一共展示了RectangleF.Equality操作符的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: ConvertRectangleToRectangleF
Private Sub ConvertRectangleToRectangleF( _
ByVal e As PaintEventArgs)
' Create a rectangle.
Dim rectangle1 As New Rectangle(30, 40, 50, 100)
' Convert it to a RectangleF.
Dim convertedRectangle As RectangleF = _
RectangleF.op_Implicit(rectangle1)
' Create a new RectangleF.
Dim rectangle2 As New RectangleF(New PointF(30.0F, 40.0F), _
New SizeF(50.0F, 100.0F))
' Create a custom, partially transparent brush.
Dim redBrush As New SolidBrush(Color.FromArgb(40, Color.Red))
' Compare the converted rectangle with the new one. If they
' are equal, draw and fill the rectangles on the form.
If (RectangleF.op_Equality(convertedRectangle, rectangle2)) Then
e.Graphics.FillRectangle(redBrush, rectangle2)
End If
' Dispose of the custom brush.
redBrush.Dispose()
End Sub