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)

使用指定的 GraphicsPath,指示這個 Graphics 內是否包含指定的點。

IsVisible(Single, Single, Graphics)

指示指定的點是否包含在指定 GraphicsPath 之可見裁剪區域中的這個 Graphics 內。

IsVisible(Point)

來源:
GraphicsPath.cs
來源:
GraphicsPath.cs
來源:
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)

來源:
GraphicsPath.cs
來源:
GraphicsPath.cs
來源:
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)

來源:
GraphicsPath.cs
來源:
GraphicsPath.cs
來源:
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)

來源:
GraphicsPath.cs
來源:
GraphicsPath.cs
來源:
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)

來源:
GraphicsPath.cs
來源:
GraphicsPath.cs
來源:
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)

來源:
GraphicsPath.cs
來源:
GraphicsPath.cs
來源:
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)

來源:
GraphicsPath.cs
來源:
GraphicsPath.cs
來源:
GraphicsPath.cs

使用指定的 GraphicsPath,指示這個 Graphics 內是否包含指定的點。

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 Forms 使用,而且需要 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)

來源:
GraphicsPath.cs
來源:
GraphicsPath.cs
來源:
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 轉換矩陣。

適用於