GraphicsPath.IsOutlineVisible 方法
定义
指示当使用指定的 Pen 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen.
重载
| IsOutlineVisible(Point, Pen) |
指示当使用指定的 Pen 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen. |
| IsOutlineVisible(PointF, Pen) |
指示当使用指定的 Pen 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen. |
| IsOutlineVisible(Point, Pen, Graphics) |
指示当使用指定的 Pen 和 Graphics 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen and using the specified Graphics. |
| IsOutlineVisible(PointF, Pen, Graphics) |
指示当使用指定的 Pen 和 Graphics 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen and using the specified Graphics. |
| IsOutlineVisible(Int32, Int32, Pen) |
指示当使用指定的 Pen 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen. |
| IsOutlineVisible(Single, Single, Pen) |
指示当使用指定的 Pen 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen. |
| IsOutlineVisible(Int32, Int32, Pen, Graphics) |
指示当使用指定的 Pen 和 Graphics 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen and using the specified Graphics. |
| IsOutlineVisible(Single, Single, Pen, Graphics) |
指示当使用指定的 Pen 和 Graphics 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen and using the specified Graphics. |
IsOutlineVisible(Point, Pen)
指示当使用指定的 Pen 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen.
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。This method returns true if the specified point is contained within the outline of this GraphicsPath when drawn with the specified Pen; otherwise, false.
示例
有关示例,请参见 IsOutlineVisible(Int32, Int32, Pen, Graphics)。For an example, see IsOutlineVisible(Int32, Int32, Pen, Graphics).
注解
此方法测试给定路径的轮廓在指定点是否可见。This method tests to see if the outline of a given path is rendered visible at the specified point.
适用于
IsOutlineVisible(PointF, Pen)
指示当使用指定的 Pen 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen.
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。This method returns true if the specified point is contained within the outline of this GraphicsPath when drawn with the specified Pen; otherwise, false.
示例
有关示例,请参见 IsOutlineVisible(Int32, Int32, Pen, Graphics)。For an example, see IsOutlineVisible(Int32, Int32, Pen, Graphics).
注解
此方法测试给定路径的轮廓在指定点是否可见。This method tests to see if the outline of a given path is rendered visible at the specified point.
适用于
IsOutlineVisible(Point, Pen, Graphics)
指示当使用指定的 Pen 和 Graphics 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen and using the specified 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);
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。This method returns true if the specified point is contained within the outline of this GraphicsPath as drawn with the specified Pen; otherwise, false.
示例
有关示例,请参见 IsOutlineVisible(Int32, Int32, Pen, Graphics)。For an example, see IsOutlineVisible(Int32, Int32, Pen, Graphics).
注解
此方法测试给定路径的轮廓在指定点是否可见。This method tests to see if the outline of a given path is rendered visible at the specified point. 要测试的点的坐标在世界坐标内提供。The coordinates of the point to be tested are given in world coordinates. 在 graphics 测试可见性之前,将临时应用的转换矩阵。The transform matrix of graphics is temporarily applied before testing for visibility.
适用于
IsOutlineVisible(PointF, Pen, Graphics)
指示当使用指定的 Pen 和 Graphics 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen and using the specified 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);
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。This method returns true if the specified point is contained within (under) the outline of this GraphicsPath as drawn with the specified Pen; otherwise, false.
示例
有关示例,请参见 IsOutlineVisible(Int32, Int32, Pen, Graphics)。For an example, see IsOutlineVisible(Int32, Int32, Pen, Graphics).
注解
此方法测试给定路径的轮廓在指定点是否可见。This method tests to see if the outline of a given path is rendered visible at the specified point. 要测试的点的坐标在世界坐标内提供。The coordinates of the point to be tested are given in world coordinates. 在 graphics 测试可见性之前,将临时应用的转换矩阵。The transform matrix of graphics is temporarily applied before testing for visibility.
适用于
IsOutlineVisible(Int32, Int32, Pen)
指示当使用指定的 Pen 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen.
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 坐标。The x-coordinate of the point to test.
- y
- Int32
要测试的点的 Y 坐标。The y-coordinate of the point to test.
返回
如果使用指定的 Pen 绘制此 GraphicsPath 时,指定点包含在后者的轮廓内,则此方法返回 true;否则,返回 false。This method returns true if the specified point is contained within the outline of this GraphicsPath when drawn with the specified Pen; otherwise, false.
示例
有关示例,请参见 IsOutlineVisible(Int32, Int32, Pen, Graphics)。For an example, see IsOutlineVisible(Int32, Int32, Pen, Graphics).
注解
此方法测试给定路径的轮廓在指定点是否可见。This method tests to see if the outline of a given path is rendered visible at the specified point.
适用于
IsOutlineVisible(Single, Single, Pen)
指示当使用指定的 Pen 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen.
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 坐标。The x-coordinate of the point to test.
- y
- Single
要测试的点的 Y 坐标。The y-coordinate of the point to test.
返回
如果使用指定的 Pen 绘制此 GraphicsPath 时,指定点包含在后者的轮廓内,则此方法返回 true;否则,返回 false。This method returns true if the specified point is contained within the outline of this GraphicsPath when drawn with the specified Pen; otherwise, false.
示例
有关示例,请参见 IsOutlineVisible(Int32, Int32, Pen, Graphics)。For an example, see IsOutlineVisible(Int32, Int32, Pen, Graphics).
注解
此方法测试给定路径的轮廓在指定点是否可见。This method tests to see if the outline of a given path is rendered visible at the specified point.
适用于
IsOutlineVisible(Int32, Int32, Pen, Graphics)
指示当使用指定的 Pen 和 Graphics 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen and using the specified 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);
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 坐标。The x-coordinate of the point to test.
- y
- Int32
要测试的点的 Y 坐标。The y-coordinate of the point to test.
返回
如果使用指定的 Pen 绘制此 GraphicsPath 时,指定点包含在后者轮廓内,则该方法返回 true;否则,返回 false。This method returns true if the specified point is contained within the outline of this GraphicsPath as drawn with the specified Pen; otherwise, false.
示例
下面的代码示例旨在与 Windows 窗体一起使用,并且它需要 PaintEventArgs e 一个 OnPaint 事件。The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, an OnPaint event. 此代码执行以下操作:The code performs the following actions:
创建一个路径。Creates a path.
向路径添加一个矩形。Adds a rectangle to the path.
创建宽笔,并使用该笔扩大路径 (以使示例更清晰) Creates a wide pen and widens the path with that pen (to make the example clearer),
测试 (100,50) 的点,以确定该点是否位于通过调用) 矩形边缘之一下的 (中 IsOutlineVisible 。Tests a point (100, 50) to see if it lies within (under) one of the edges of the rectangle by calling IsOutlineVisible.
结果显示在消息框中 (在本例中为 true) 。The result is shown in the message box (in this case, true). 换句话说,边缘呈现在该点上。In other words the edge is rendered over that point.
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
注解
此方法测试给定路径的轮廓在指定点是否可见。This method tests to see if the outline of a given path is rendered visible at the specified point. 要测试的点的坐标在世界坐标内提供。The coordinates of the point to be tested are given in world coordinates. 在 graphics 测试可见性之前,将临时应用的转换矩阵。The transform matrix of graphics is temporarily applied before testing for visibility.
适用于
IsOutlineVisible(Single, Single, Pen, Graphics)
指示当使用指定的 Pen 和 Graphics 绘制此 GraphicsPath 时,指定点是否包含在后者的轮廓内(下)。Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen and using the specified 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);
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 坐标。The x-coordinate of the point to test.
- y
- Single
要测试的点的 Y 坐标。The y-coordinate of the point to test.
返回
如果使用指定的 Pen 绘制此 GraphicsPath 时,指定点包含在后者的轮廓内(下),则该方法返回 true;否则,返回 false。This method returns true if the specified point is contained within (under) the outline of this GraphicsPath as drawn with the specified Pen; otherwise, false.
示例
有关示例,请参见 IsOutlineVisible(Int32, Int32, Pen, Graphics)。For an example, see IsOutlineVisible(Int32, Int32, Pen, Graphics).
注解
此方法测试给定路径的轮廓在指定点是否可见。This method tests to see if the outline of a given path is rendered visible at the specified point. 要测试的点的坐标在世界坐标内提供。The coordinates of the point to be tested are given in world coordinates. graphics测试可见性之前,将临时应用参数的转换矩阵。The transform matrix of the graphics parameter is temporarily applied before testing for visibility.