Bewerken

Delen via


GraphicsPath.IsVisible Method

Definition

Indicates whether the specified point is contained within this GraphicsPath.

Overloads

IsVisible(Point)

Indicates whether the specified point is contained within this GraphicsPath.

IsVisible(PointF)

Indicates whether the specified point is contained within this GraphicsPath.

IsVisible(Point, Graphics)

Indicates whether the specified point is contained within this GraphicsPath.

IsVisible(PointF, Graphics)

Indicates whether the specified point is contained within this GraphicsPath.

IsVisible(Int32, Int32)

Indicates whether the specified point is contained within this GraphicsPath.

IsVisible(Single, Single)

Indicates whether the specified point is contained within this GraphicsPath.

IsVisible(Int32, Int32, Graphics)

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

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

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
Public Function IsVisible (point As Point) As Boolean

Parameters

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).

Applies to

IsVisible(PointF)

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

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

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).

Applies to

IsVisible(Point, Graphics)

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

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);
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

Parameters

pt
Point

A Point that represents the point to test.

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.

Applies to

IsVisible(PointF, Graphics)

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

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);
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

Parameters

pt
PointF

A PointF that represents the point to test.

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

IsVisible(Int32, Int32)

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

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

The x-coordinate of the point to test.

y
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).

Applies to

IsVisible(Single, Single)

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

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

The x-coordinate of the point to test.

y
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).

Applies to

IsVisible(Int32, Int32, Graphics)

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

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);
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

Parameters

x
Int32

The x-coordinate of the point to test.

y
Int32

The y-coordinate of the point to test.

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 PaintEventArgs e, 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.

Applies to

IsVisible(Single, Single, Graphics)

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

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);
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

Parameters

x
Single

The x-coordinate of the point to test.

y
Single

The y-coordinate of the point to test.

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.

Applies to