GraphicsPath.IsVisible GraphicsPath.IsVisible GraphicsPath.IsVisible GraphicsPath.IsVisible Method

Definition

Indicates whether the specified point is contained within this GraphicsPath.

Overloads

IsVisible(Single, Single) IsVisible(Single, Single) IsVisible(Single, Single) IsVisible(Single, Single)

Indicates whether the specified point is contained within this GraphicsPath.

IsVisible(Single, Single, Graphics) IsVisible(Single, Single, Graphics) IsVisible(Single, Single, Graphics)

Indicates whether the specified point is contained within this GraphicsPath in the visible clip region of the specified Graphics.

IsVisible(Int32, Int32, Graphics) IsVisible(Int32, Int32, Graphics) IsVisible(Int32, Int32, Graphics)

Indicates whether the specified point is contained within this GraphicsPath, using the specified Graphics.

IsVisible(Int32, Int32) IsVisible(Int32, Int32) IsVisible(Int32, Int32) IsVisible(Int32, Int32)

Indicates whether the specified point is contained within this GraphicsPath.

IsVisible(Point) IsVisible(Point) IsVisible(Point)

Indicates whether the specified point is contained within this GraphicsPath.

IsVisible(Point, Graphics) IsVisible(Point, Graphics) IsVisible(Point, Graphics)

Indicates whether the specified point is contained within this GraphicsPath.

IsVisible(PointF) IsVisible(PointF) IsVisible(PointF) IsVisible(PointF)

Indicates whether the specified point is contained within this GraphicsPath.

IsVisible(PointF, Graphics) IsVisible(PointF, Graphics) IsVisible(PointF, Graphics)

Indicates whether the specified point is contained within this GraphicsPath.

IsVisible(Single, Single) IsVisible(Single, Single) IsVisible(Single, Single) IsVisible(Single, Single)

Indicates whether the specified point is contained within this 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

Parameters

x
Single Single Single Single

The x-coordinate of the point to test.

y
Single Single Single Single

The y-coordinate of the point to test.

Returns

This method returns true if the specified point is contained within this GraphicsPath; otherwise, false.

Examples

For an example, see IsVisible(Int32, Int32, Graphics).

IsVisible(Single, Single, Graphics) IsVisible(Single, Single, Graphics) IsVisible(Single, Single, Graphics)

Indicates whether the specified point is contained within this GraphicsPath in the visible clip region of the specified 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

Parameters

x
Single Single Single Single

The x-coordinate of the point to test.

y
Single Single Single Single

The y-coordinate of the point to test.

graphics
Graphics Graphics Graphics Graphics

The Graphics for which to test visibility.

Returns

This method returns true if the specified point is contained within this GraphicsPath; otherwise, false.

Examples

For an example, see IsVisible(Int32, Int32, Graphics).

Remarks

The coordinates of the point to be tested are given in world coordinates. The transform matrix of the graphics parameter is temporarily applied before testing for visibility.

IsVisible(Int32, Int32, Graphics) IsVisible(Int32, Int32, Graphics) IsVisible(Int32, Int32, Graphics)

Indicates whether the specified point is contained within this GraphicsPath, using the specified 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

Parameters

x
Int32 Int32 Int32 Int32

The x-coordinate of the point to test.

y
Int32 Int32 Int32 Int32

The y-coordinate of the point to test.

graphics
Graphics Graphics Graphics Graphics

The Graphics for which to test visibility.

Returns

This method returns true if the specified point is contained within this GraphicsPath; otherwise, false.

Examples

The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, an OnPaint event object. The code performs the following actions:

  • Creates a path and adds an ellipse to the path.

  • Tests whether the specified point is contained within the path.

  • Displays the result in a dialog box.

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

Remarks

The coordinates of the point to be tested are given in world coordinates. The transform matrix of graphics is temporarily applied before testing for visibility.

IsVisible(Int32, Int32) IsVisible(Int32, Int32) IsVisible(Int32, Int32) IsVisible(Int32, Int32)

Indicates whether the specified point is contained within this 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

Parameters

x
Int32 Int32 Int32 Int32

The x-coordinate of the point to test.

y
Int32 Int32 Int32 Int32

The y-coordinate of the point to test.

Returns

This method returns true if the specified point is contained within this GraphicsPath; otherwise, false.

Examples

For an example, see IsVisible(Int32, Int32, Graphics).

IsVisible(Point) IsVisible(Point) IsVisible(Point)

Indicates whether the specified point is contained within this GraphicsPath.

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

Parameters

point
Point Point Point Point

A Point that represents the point to test.

Returns

This method returns true if the specified point is contained within this GraphicsPath; otherwise, false.

Examples

For an example, see GraphicsPath.IsVisible Method (Int32, Int32, Graphics).

IsVisible(Point, Graphics) IsVisible(Point, Graphics) IsVisible(Point, Graphics)

Indicates whether the specified point is contained within this GraphicsPath.

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

Parameters

pt
Point Point Point Point

A Point that represents the point to test.

graphics
Graphics Graphics Graphics Graphics

The Graphics for which to test visibility.

Returns

This method returns true if the specified point is contained within this GraphicsPath; otherwise, false.

Examples

For an example, see GraphicsPath.IsVisible Method (Int32, Int32, Graphics).

Remarks

The coordinates of the point to be tested are given in world coordinates. The transform matrix of the graphics parameter is temporarily applied before testing for visibility.

IsVisible(PointF) IsVisible(PointF) IsVisible(PointF) IsVisible(PointF)

Indicates whether the specified point is contained within this 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

Parameters

point
PointF PointF PointF PointF

A PointF that represents the point to test.

Returns

This method returns true if the specified point is contained within this GraphicsPath; otherwise, false.

Examples

For an example, see IsVisible(Int32, Int32, Graphics).

IsVisible(PointF, Graphics) IsVisible(PointF, Graphics) IsVisible(PointF, Graphics)

Indicates whether the specified point is contained within this GraphicsPath.

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

Parameters

pt
PointF PointF PointF PointF

A PointF that represents the point to test.

graphics
Graphics Graphics Graphics Graphics

The Graphics for which to test visibility.

Returns

This method returns true if the specified point is contained within this; otherwise, false.

Examples

For an example, see IsVisible(Int32, Int32, Graphics).

Remarks

The coordinates of the point to be tested are given in world coordinates. The transform matrix of the graphics parameter is temporarily applied before testing for visibility.

Applies to