Прочитај на енглеском Уреди

Делите путем


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
Source:
GraphicsPath.cs

Indicates whether the specified point is contained within this GraphicsPath.

C#
public bool IsVisible(System.Drawing.Point point);

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

.NET 10 (package-provided) и друге верзије
Производ Верзије
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

IsVisible(PointF)

Source:
GraphicsPath.cs
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.

C#
public bool IsVisible(System.Drawing.PointF point);

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

.NET 10 (package-provided) и друге верзије
Производ Верзије
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

IsVisible(Point, Graphics)

Source:
GraphicsPath.cs
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.

C#
public bool IsVisible(System.Drawing.Point pt, System.Drawing.Graphics? graphics);
C#
public bool IsVisible(System.Drawing.Point pt, System.Drawing.Graphics graphics);

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

.NET 10 (package-provided) и друге верзије
Производ Верзије
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

IsVisible(PointF, Graphics)

Source:
GraphicsPath.cs
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.

C#
public bool IsVisible(System.Drawing.PointF pt, System.Drawing.Graphics? graphics);
C#
public bool IsVisible(System.Drawing.PointF pt, System.Drawing.Graphics graphics);

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

.NET 10 (package-provided) и друге верзије
Производ Верзије
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

IsVisible(Int32, Int32)

Source:
GraphicsPath.cs
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.

C#
public bool IsVisible(int x, int y);

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

.NET 10 (package-provided) и друге верзије
Производ Верзије
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

IsVisible(Single, Single)

Source:
GraphicsPath.cs
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.

C#
public bool IsVisible(float x, float y);

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

.NET 10 (package-provided) и друге верзије
Производ Верзије
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

IsVisible(Int32, Int32, Graphics)

Source:
GraphicsPath.cs
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.

C#
public bool IsVisible(int x, int y, System.Drawing.Graphics? graphics);
C#
public bool IsVisible(int x, int y, System.Drawing.Graphics graphics);

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.

C#
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());
}

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

.NET 10 (package-provided) и друге верзије
Производ Верзије
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

IsVisible(Single, Single, Graphics)

Source:
GraphicsPath.cs
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.

C#
public bool IsVisible(float x, float y, System.Drawing.Graphics? graphics);
C#
public bool IsVisible(float x, float y, System.Drawing.Graphics graphics);

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

.NET 10 (package-provided) и друге верзије
Производ Верзије
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10