GraphicsPath.IsVisible 方法

定义

指示指定点是否包含在此 GraphicsPath 内。

重载

IsVisible(Point)

指示指定点是否包含在此 GraphicsPath 内。

IsVisible(PointF)

指示指定点是否包含在此 GraphicsPath 内。

IsVisible(Point, Graphics)

指示指定点是否包含在此 GraphicsPath 内。

IsVisible(PointF, Graphics)

指示指定点是否包含在此 GraphicsPath 内。

IsVisible(Int32, Int32)

指示指定点是否包含在此 GraphicsPath 内。

IsVisible(Single, Single)

指示指定点是否包含在此 GraphicsPath 内。

IsVisible(Int32, Int32, Graphics)

使用指定的 Graphics,指示指定点是否包含在此 GraphicsPath 内。

IsVisible(Single, Single, Graphics)

指示指定点是否包含在此 GraphicsPath 内,它位于指定的 Graphics 的可见剪辑区域内。

IsVisible(Point)

Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs

指示指定点是否包含在此 GraphicsPath 内。

public:
 bool IsVisible(System::Drawing::Point point);
public bool IsVisible (System.Drawing.Point point);
member this.IsVisible : System.Drawing.Point -> bool
Public Function IsVisible (point As Point) As Boolean

参数

point
Point

表示测试点的 Point

返回

如果指定点包含在此 GraphicsPath 内,则该方法返回 true;否则,返回 false

示例

有关示例,请参见 GraphicsPath.IsVisible Method (Int32, Int32, Graphics)

适用于

IsVisible(PointF)

Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs

指示指定点是否包含在此 GraphicsPath 内。

public:
 bool IsVisible(System::Drawing::PointF point);
public bool IsVisible (System.Drawing.PointF point);
member this.IsVisible : System.Drawing.PointF -> bool
Public Function IsVisible (point As PointF) As Boolean

参数

point
PointF

表示测试点的 PointF

返回

如果指定点包含在此 GraphicsPath 内,则该方法返回 true;否则,返回 false

示例

有关示例,请参见 IsVisible(Int32, Int32, Graphics)

适用于

IsVisible(Point, Graphics)

Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs

指示指定点是否包含在此 GraphicsPath 内。

public:
 bool IsVisible(System::Drawing::Point pt, System::Drawing::Graphics ^ graphics);
public bool IsVisible (System.Drawing.Point pt, System.Drawing.Graphics graphics);
public bool IsVisible (System.Drawing.Point pt, System.Drawing.Graphics? graphics);
member this.IsVisible : System.Drawing.Point * System.Drawing.Graphics -> bool
Public Function IsVisible (pt As Point, graphics As Graphics) As Boolean

参数

pt
Point

表示测试点的 Point

graphics
Graphics

要对其测试可见性的 Graphics

返回

如果指定点包含在此 GraphicsPath 内,则该方法返回 true;否则,返回 false

示例

有关示例,请参见 GraphicsPath.IsVisible Method (Int32, Int32, Graphics)

注解

要测试的点的坐标以世界坐标提供。 参数的 graphics 转换矩阵在测试可见性之前暂时应用。

适用于

IsVisible(PointF, Graphics)

Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs

指示指定点是否包含在此 GraphicsPath 内。

public:
 bool IsVisible(System::Drawing::PointF pt, System::Drawing::Graphics ^ graphics);
public bool IsVisible (System.Drawing.PointF pt, System.Drawing.Graphics graphics);
public bool IsVisible (System.Drawing.PointF pt, System.Drawing.Graphics? graphics);
member this.IsVisible : System.Drawing.PointF * System.Drawing.Graphics -> bool
Public Function IsVisible (pt As PointF, graphics As Graphics) As Boolean

参数

pt
PointF

表示测试点的 PointF

graphics
Graphics

要对其测试可见性的 Graphics

返回

如果指定点包含在此对象内,则该方法返回 true;否则,返回 false

示例

有关示例,请参见 IsVisible(Int32, Int32, Graphics)

注解

要测试的点的坐标以世界坐标提供。 参数的 graphics 转换矩阵在测试可见性之前暂时应用。

适用于

IsVisible(Int32, Int32)

Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs

指示指定点是否包含在此 GraphicsPath 内。

public:
 bool IsVisible(int x, int y);
public bool IsVisible (int x, int y);
member this.IsVisible : int * int -> bool
Public Function IsVisible (x As Integer, y As Integer) As Boolean

参数

x
Int32

要测试的点的 X 坐标。

y
Int32

要测试的点的 Y 坐标。

返回

如果指定点包含在此 GraphicsPath 内,则该方法返回 true;否则,返回 false

示例

有关示例,请参见 IsVisible(Int32, Int32, Graphics)

适用于

IsVisible(Single, Single)

Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs

指示指定点是否包含在此 GraphicsPath 内。

public:
 bool IsVisible(float x, float y);
public bool IsVisible (float x, float y);
member this.IsVisible : single * single -> bool
Public Function IsVisible (x As Single, y As Single) As Boolean

参数

x
Single

要测试的点的 X 坐标。

y
Single

要测试的点的 Y 坐标。

返回

如果指定点包含在此 GraphicsPath 内,则该方法返回 true;否则,返回 false

示例

有关示例,请参见 IsVisible(Int32, Int32, Graphics)

适用于

IsVisible(Int32, Int32, Graphics)

Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs

使用指定的 Graphics,指示指定点是否包含在此 GraphicsPath 内。

public:
 bool IsVisible(int x, int y, System::Drawing::Graphics ^ graphics);
public bool IsVisible (int x, int y, System.Drawing.Graphics graphics);
public bool IsVisible (int x, int y, System.Drawing.Graphics? graphics);
member this.IsVisible : int * int * System.Drawing.Graphics -> bool
Public Function IsVisible (x As Integer, y As Integer, graphics As Graphics) As Boolean

参数

x
Int32

要测试的点的 X 坐标。

y
Int32

要测试的点的 Y 坐标。

graphics
Graphics

要对其测试可见性的 Graphics

返回

如果指定点包含在此 GraphicsPath 内,则该方法返回 true;否则,返回 false

示例

下面的代码示例设计用于 Windows 窗体,它需要 PaintEventArgse事件OnPaint对象。 此代码执行以下操作:

  • 创建一个路径,并向该路径添加一个椭圆。

  • 测试指定的点是否包含在路径中。

  • 在对话框中显示结果。

private:
   void IsVisibleExample( PaintEventArgs^ e )
   {
      
      // Create a path and add an ellipse.
      GraphicsPath^ myPath = gcnew GraphicsPath;
      myPath->AddEllipse( 0, 0, 100, 100 );
      
      // Test the visibility of point (50, 50).
      bool visible = myPath->IsVisible( 50, 50, e->Graphics );
      
      // Show the result.
      MessageBox::Show( visible.ToString() );
   }
private void IsVisibleExample(PaintEventArgs e)
{
             
    // Create a path and add an ellipse.
    GraphicsPath myPath = new GraphicsPath();
    myPath.AddEllipse(0, 0, 100, 100);
             
    // Test the visibility of point (50, 50).
    bool visible = myPath.IsVisible(50, 50, e.Graphics);
             
    // Show the result.
    MessageBox.Show(visible.ToString());
}
Public Sub IsVisibleExample(ByVal e As PaintEventArgs)
    Dim myPath As New GraphicsPath
    myPath.AddEllipse(0, 0, 100, 100)
    Dim visible As Boolean = myPath.IsVisible(50, 50, e.Graphics)
    MessageBox.Show(visible.ToString())
End Sub

注解

要测试的点的坐标以世界坐标提供。 在测试可见性之前,暂时应用 的 graphics 转换矩阵。

适用于

IsVisible(Single, Single, Graphics)

Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs

指示指定点是否包含在此 GraphicsPath 内,它位于指定的 Graphics 的可见剪辑区域内。

public:
 bool IsVisible(float x, float y, System::Drawing::Graphics ^ graphics);
public bool IsVisible (float x, float y, System.Drawing.Graphics graphics);
public bool IsVisible (float x, float y, System.Drawing.Graphics? graphics);
member this.IsVisible : single * single * System.Drawing.Graphics -> bool
Public Function IsVisible (x As Single, y As Single, graphics As Graphics) As Boolean

参数

x
Single

要测试的点的 X 坐标。

y
Single

要测试的点的 Y 坐标。

graphics
Graphics

要对其测试可见性的 Graphics

返回

如果指定点包含在此 GraphicsPath 内,则该方法返回 true;否则,返回 false

示例

有关示例,请参见 IsVisible(Int32, Int32, Graphics)

注解

要测试的点的坐标以世界坐标提供。 参数的 graphics 转换矩阵在测试可见性之前暂时应用。

适用于