本文整理匯總了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