GraphicsPath.IsOutlineVisible 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指示当使用指定的 Pen 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。
重载
IsOutlineVisible(Int32, Int32, Pen, Graphics) |
指示当使用指定的 Pen 和 Graphics 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。 |
IsOutlineVisible(Point, Pen, Graphics) |
指示当使用指定的 Pen 和 Graphics 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。 |
IsOutlineVisible(Single, Single, Pen, Graphics) |
指示当使用指定的 Pen 和 Graphics 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。 |
IsOutlineVisible(Single, Single, Pen) |
指示当使用指定的 Pen 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。 |
IsOutlineVisible(PointF, Pen) |
指示当使用指定的 Pen 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。 |
IsOutlineVisible(PointF, Pen, Graphics) |
指示当使用指定的 Pen 和 Graphics 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。 |
IsOutlineVisible(Int32, Int32, Pen) |
指示当使用指定的 Pen 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。 |
IsOutlineVisible(Point, Pen) |
指示当使用指定的 Pen 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。 |
IsOutlineVisible(Int32, Int32, Pen, Graphics)
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
指示当使用指定的 Pen 和 Graphics 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。
public:
bool IsOutlineVisible(int x, int y, System::Drawing::Pen ^ pen, System::Drawing::Graphics ^ graphics);
public bool IsOutlineVisible (int x, int y, System.Drawing.Pen pen, System.Drawing.Graphics graphics);
public bool IsOutlineVisible (int x, int y, System.Drawing.Pen pen, System.Drawing.Graphics? graphics);
member this.IsOutlineVisible : int * int * System.Drawing.Pen * System.Drawing.Graphics -> bool
Public Function IsOutlineVisible (x As Integer, y As Integer, pen As Pen, graphics As Graphics) As Boolean
参数
- x
- Int32
要测试的点的 X 坐标。
- y
- Int32
要测试的点的 Y 坐标。
返回
如果使用指定的 Pen 绘制此 GraphicsPath 时,指定点包含在后者轮廓内,则该方法返回 true
;否则,返回 false
。
示例
下面的代码示例设计用于 Windows 窗体,它需要 PaintEventArgse
事件OnPaint。 此代码执行以下操作:
创建路径。
向路径添加一个矩形。
创建一个宽笔,并使用该笔 (扩大路径,使示例更清晰) ,
通过调用 IsOutlineVisible测试点 (100,50) ,以查看它是否位于矩形) 一个边缘下的 (内。
结果显示在消息框中,在本例中 (为 true) 。 换句话说,边缘呈现在该点上。
public:
void IsOutlineVisibleExample( PaintEventArgs^ e )
{
GraphicsPath^ myPath = gcnew GraphicsPath;
Rectangle rect = Rectangle(20,20,100,100);
myPath->AddRectangle( rect );
Pen^ testPen = gcnew Pen( Color::Black,20.0f );
myPath->Widen( testPen );
e->Graphics->FillPath( Brushes::Black, myPath );
bool visible = myPath->IsOutlineVisible( 100, 50, testPen, e->Graphics );
MessageBox::Show( String::Format( "visible = {0}", visible ) );
}
public void IsOutlineVisibleExample(PaintEventArgs e)
{
GraphicsPath myPath = new GraphicsPath();
Rectangle rect = new Rectangle(20, 20, 100, 100);
myPath.AddRectangle(rect);
Pen testPen = new Pen(Color.Black, 20);
myPath.Widen(testPen);
e.Graphics.FillPath(Brushes.Black, myPath);
bool visible = myPath.IsOutlineVisible(100, 50, testPen,
e.Graphics);
MessageBox.Show("visible = " + visible.ToString());
}
Public Sub IsOutlineVisibleExample(ByVal e As PaintEventArgs)
Dim myPath As New GraphicsPath
Dim rect As New Rectangle(20, 20, 100, 100)
myPath.AddRectangle(rect)
Dim testPen As New Pen(Color.Black, 20)
myPath.Widen(testPen)
e.Graphics.FillPath(Brushes.Black, myPath)
Dim visible As Boolean = myPath.IsOutlineVisible(100, 50, _
testPen, e.Graphics)
MessageBox.Show(("visible = " + visible.ToString()))
End Sub
注解
此方法测试给定路径的轮廓是否在指定点呈现为可见。 要测试的点的坐标以世界坐标提供。 在测试可见性之前,暂时应用 的 graphics
转换矩阵。
适用于
IsOutlineVisible(Point, Pen, Graphics)
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
指示当使用指定的 Pen 和 Graphics 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。
public:
bool IsOutlineVisible(System::Drawing::Point pt, System::Drawing::Pen ^ pen, System::Drawing::Graphics ^ graphics);
public bool IsOutlineVisible (System.Drawing.Point pt, System.Drawing.Pen pen, System.Drawing.Graphics graphics);
public bool IsOutlineVisible (System.Drawing.Point pt, System.Drawing.Pen pen, System.Drawing.Graphics? graphics);
member this.IsOutlineVisible : System.Drawing.Point * System.Drawing.Pen * System.Drawing.Graphics -> bool
Public Function IsOutlineVisible (pt As Point, pen As Pen, graphics As Graphics) As Boolean
参数
返回
如果使用指定的 Pen 绘制此 GraphicsPath 时,指定点包含在后者轮廓内,则该方法返回 true
;否则,返回 false
。
示例
有关示例,请参见 IsOutlineVisible(Int32, Int32, Pen, Graphics)。
注解
此方法测试给定路径的轮廓是否在指定点呈现为可见。 要测试的点的坐标以世界坐标提供。 在测试可见性之前,暂时应用 的 graphics
转换矩阵。
适用于
IsOutlineVisible(Single, Single, Pen, Graphics)
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
指示当使用指定的 Pen 和 Graphics 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。
public:
bool IsOutlineVisible(float x, float y, System::Drawing::Pen ^ pen, System::Drawing::Graphics ^ graphics);
public bool IsOutlineVisible (float x, float y, System.Drawing.Pen pen, System.Drawing.Graphics graphics);
public bool IsOutlineVisible (float x, float y, System.Drawing.Pen pen, System.Drawing.Graphics? graphics);
member this.IsOutlineVisible : single * single * System.Drawing.Pen * System.Drawing.Graphics -> bool
Public Function IsOutlineVisible (x As Single, y As Single, pen As Pen, graphics As Graphics) As Boolean
参数
- x
- Single
要测试的点的 X 坐标。
- y
- Single
要测试的点的 Y 坐标。
返回
如果使用指定的 Pen 绘制此 GraphicsPath 时,指定点包含在后者的轮廓内(下),则该方法返回 true
;否则,返回 false
。
示例
有关示例,请参见 IsOutlineVisible(Int32, Int32, Pen, Graphics)。
注解
此方法测试给定路径的轮廓是否在指定点呈现为可见。 要测试的点的坐标以世界坐标提供。 参数的 graphics
转换矩阵在测试可见性之前暂时应用。
适用于
IsOutlineVisible(Single, Single, Pen)
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
指示当使用指定的 Pen 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。
public:
bool IsOutlineVisible(float x, float y, System::Drawing::Pen ^ pen);
public bool IsOutlineVisible (float x, float y, System.Drawing.Pen pen);
member this.IsOutlineVisible : single * single * System.Drawing.Pen -> bool
Public Function IsOutlineVisible (x As Single, y As Single, pen As Pen) As Boolean
参数
- x
- Single
要测试的点的 X 坐标。
- y
- Single
要测试的点的 Y 坐标。
返回
如果使用指定的 Pen 绘制此 GraphicsPath 时,指定点包含在后者的轮廓内,则此方法返回 true
;否则,返回 false
。
示例
有关示例,请参见 IsOutlineVisible(Int32, Int32, Pen, Graphics)。
注解
此方法测试给定路径的轮廓是否在指定点呈现为可见。
适用于
IsOutlineVisible(PointF, Pen)
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
指示当使用指定的 Pen 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。
public:
bool IsOutlineVisible(System::Drawing::PointF point, System::Drawing::Pen ^ pen);
public bool IsOutlineVisible (System.Drawing.PointF point, System.Drawing.Pen pen);
member this.IsOutlineVisible : System.Drawing.PointF * System.Drawing.Pen -> bool
Public Function IsOutlineVisible (point As PointF, pen As Pen) As Boolean
参数
返回
如果使用指定的 Pen 绘制此 GraphicsPath 时,指定点包含在后者的轮廓内,则此方法返回 true
;否则,返回 false
。
示例
有关示例,请参见 IsOutlineVisible(Int32, Int32, Pen, Graphics)。
注解
此方法测试给定路径的轮廓是否在指定点呈现为可见。
适用于
IsOutlineVisible(PointF, Pen, Graphics)
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
指示当使用指定的 Pen 和 Graphics 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。
public:
bool IsOutlineVisible(System::Drawing::PointF pt, System::Drawing::Pen ^ pen, System::Drawing::Graphics ^ graphics);
public bool IsOutlineVisible (System.Drawing.PointF pt, System.Drawing.Pen pen, System.Drawing.Graphics graphics);
public bool IsOutlineVisible (System.Drawing.PointF pt, System.Drawing.Pen pen, System.Drawing.Graphics? graphics);
member this.IsOutlineVisible : System.Drawing.PointF * System.Drawing.Pen * System.Drawing.Graphics -> bool
Public Function IsOutlineVisible (pt As PointF, pen As Pen, graphics As Graphics) As Boolean
参数
返回
如果使用指定的 Pen 绘制此 GraphicsPath 时,指定点包含在后者的轮廓内(下),则该方法返回 true
;否则,返回 false
。
示例
有关示例,请参见 IsOutlineVisible(Int32, Int32, Pen, Graphics)。
注解
此方法测试给定路径的轮廓是否在指定点呈现为可见。 要测试的点的坐标以世界坐标提供。 在测试可见性之前,暂时应用 的 graphics
转换矩阵。
适用于
IsOutlineVisible(Int32, Int32, Pen)
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
指示当使用指定的 Pen 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。
public:
bool IsOutlineVisible(int x, int y, System::Drawing::Pen ^ pen);
public bool IsOutlineVisible (int x, int y, System.Drawing.Pen pen);
member this.IsOutlineVisible : int * int * System.Drawing.Pen -> bool
Public Function IsOutlineVisible (x As Integer, y As Integer, pen As Pen) As Boolean
参数
- x
- Int32
要测试的点的 X 坐标。
- y
- Int32
要测试的点的 Y 坐标。
返回
如果使用指定的 Pen 绘制此 GraphicsPath 时,指定点包含在后者的轮廓内,则此方法返回 true
;否则,返回 false
。
示例
有关示例,请参见 IsOutlineVisible(Int32, Int32, Pen, Graphics)。
注解
此方法测试给定路径的轮廓是否在指定点呈现为可见。
适用于
IsOutlineVisible(Point, Pen)
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
指示当使用指定的 Pen 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。
public:
bool IsOutlineVisible(System::Drawing::Point point, System::Drawing::Pen ^ pen);
public bool IsOutlineVisible (System.Drawing.Point point, System.Drawing.Pen pen);
member this.IsOutlineVisible : System.Drawing.Point * System.Drawing.Pen -> bool
Public Function IsOutlineVisible (point As Point, pen As Pen) As Boolean
参数
返回
如果使用指定的 Pen 绘制此 GraphicsPath 时,指定点包含在后者的轮廓内,则此方法返回 true
;否则,返回 false
。
示例
有关示例,请参见 IsOutlineVisible(Int32, Int32, Pen, Graphics)。
注解
此方法测试给定路径的轮廓是否在指定点呈现为可见。
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈