本文整理汇总了VB.NET中System.Drawing.Region.IsVisible方法的典型用法代码示例。如果您正苦于以下问题:VB.NET Region.IsVisible方法的具体用法?VB.NET Region.IsVisible怎么用?VB.NET Region.IsVisible使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Drawing.Region
的用法示例。
在下文中一共展示了Region.IsVisible方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: Rectangle
Public Sub IsVisible_RectF_Example(ByVal e As PaintEventArgs)
' Create the first rectangle and draw it to the screen in blue.
Dim regionRect As New Rectangle(20, 20, 100, 100)
e.Graphics.DrawRectangle(Pens.Blue, regionRect)
' create the second rectangle and draw it to the screen in red.
Dim myRect As New RectangleF(90, 30, 100, 100)
e.Graphics.DrawRectangle(Pens.Red, Rectangle.Round(myRect))
' Create a region using the first rectangle.
Dim myRegion As New [Region](regionRect)
' Determine if myRect is contained in the region.
Dim contained As Boolean = myRegion.IsVisible(myRect)
' Display the result.
Dim myFont As New Font("Arial", 8)
Dim myBrush As New SolidBrush(Color.Black)
e.Graphics.DrawString("contained = " & contained.ToString(), _
myFont, myBrush, New PointF(20, 140))
End Sub