GraphicsPath.IsOutlineVisible Method

Definition

Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen.

Overloads

IsOutlineVisible(Int32, Int32, Pen, Graphics)

Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen and using the specified Graphics.

IsOutlineVisible(Point, Pen, Graphics)

Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen and using the specified Graphics.

IsOutlineVisible(Single, Single, Pen, Graphics)

Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen and using the specified Graphics.

IsOutlineVisible(Single, Single, Pen)

Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen.

IsOutlineVisible(PointF, Pen)

Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen.

IsOutlineVisible(PointF, Pen, Graphics)

Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen and using the specified Graphics.

IsOutlineVisible(Int32, Int32, Pen)

Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen.

IsOutlineVisible(Point, Pen)

Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen.

IsOutlineVisible(Int32, Int32, Pen, Graphics)

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

Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen and using the specified Graphics.

C#
public bool IsOutlineVisible (int x, int y, System.Drawing.Pen pen, System.Drawing.Graphics? graphics);
C#
public bool IsOutlineVisible (int x, int y, System.Drawing.Pen pen, 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.

pen
Pen

The Pen to test.

graphics
Graphics

The Graphics for which to test visibility.

Returns

This method returns true if the specified point is contained within the outline of this GraphicsPath as drawn with the specified Pen; otherwise, false.

Examples

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

  • Creates a path.

  • Adds a rectangle to the path.

  • Creates a wide pen and widens the path with that pen (to make the example clearer),

  • Tests a point (100, 50) to see if it lies within (under) one of the edges of the rectangle by calling IsOutlineVisible.

The result is shown in the message box (in this case, true). In other words the edge is rendered over that point.

C#
public void IsOutlineVisibleExample(PaintEventArgs e)
{
    GraphicsPath myPath = new GraphicsPath();
    Rectangle rect = new Rectangle(20, 20, 100, 100);
    myPath.AddRectangle(rect);
    Pen testPen = new Pen(Color.Black, 20);
    myPath.Widen(testPen);
    e.Graphics.FillPath(Brushes.Black, myPath);
    bool visible = myPath.IsOutlineVisible(100, 50, testPen,
        e.Graphics);
    MessageBox.Show("visible = " + visible.ToString());
}

Remarks

This method tests to see if the outline of a given path is rendered visible at the specified point. 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 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (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 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

IsOutlineVisible(Point, Pen, Graphics)

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

Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen and using the specified Graphics.

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

Parameters

pt
Point

A Point that specifies the location to test.

pen
Pen

The Pen to test.

graphics
Graphics

The Graphics for which to test visibility.

Returns

This method returns true if the specified point is contained within the outline of this GraphicsPath as drawn with the specified Pen; otherwise, false.

Examples

For an example, see IsOutlineVisible(Int32, Int32, Pen, Graphics).

Remarks

This method tests to see if the outline of a given path is rendered visible at the specified point. 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 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (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 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

IsOutlineVisible(Single, Single, Pen, Graphics)

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

Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen and using the specified Graphics.

C#
public bool IsOutlineVisible (float x, float y, System.Drawing.Pen pen, System.Drawing.Graphics? graphics);
C#
public bool IsOutlineVisible (float x, float y, System.Drawing.Pen pen, 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.

pen
Pen

The Pen to test.

graphics
Graphics

The Graphics for which to test visibility.

Returns

This method returns true if the specified point is contained within (under) the outline of this GraphicsPath as drawn with the specified Pen; otherwise, false.

Examples

For an example, see IsOutlineVisible(Int32, Int32, Pen, Graphics).

Remarks

This method tests to see if the outline of a given path is rendered visible at the specified point. 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 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (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 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

IsOutlineVisible(Single, Single, Pen)

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

Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen.

C#
public bool IsOutlineVisible (float x, float y, System.Drawing.Pen pen);

Parameters

x
Single

The x-coordinate of the point to test.

y
Single

The y-coordinate of the point to test.

pen
Pen

The Pen to test.

Returns

This method returns true if the specified point is contained within the outline of this GraphicsPath when drawn with the specified Pen; otherwise, false.

Examples

For an example, see IsOutlineVisible(Int32, Int32, Pen, Graphics).

Remarks

This method tests to see if the outline of a given path is rendered visible at the specified point.

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (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 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

IsOutlineVisible(PointF, Pen)

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

Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen.

C#
public bool IsOutlineVisible (System.Drawing.PointF point, System.Drawing.Pen pen);

Parameters

point
PointF

A PointF that specifies the location to test.

pen
Pen

The Pen to test.

Returns

This method returns true if the specified point is contained within the outline of this GraphicsPath when drawn with the specified Pen; otherwise, false.

Examples

For an example, see IsOutlineVisible(Int32, Int32, Pen, Graphics).

Remarks

This method tests to see if the outline of a given path is rendered visible at the specified point.

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (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 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

IsOutlineVisible(PointF, Pen, Graphics)

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

Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen and using the specified Graphics.

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

Parameters

pt
PointF

A PointF that specifies the location to test.

pen
Pen

The Pen to test.

graphics
Graphics

The Graphics for which to test visibility.

Returns

This method returns true if the specified point is contained within (under) the outline of this GraphicsPath as drawn with the specified Pen; otherwise, false.

Examples

For an example, see IsOutlineVisible(Int32, Int32, Pen, Graphics).

Remarks

This method tests to see if the outline of a given path is rendered visible at the specified point. 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 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (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 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

IsOutlineVisible(Int32, Int32, Pen)

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

Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen.

C#
public bool IsOutlineVisible (int x, int y, System.Drawing.Pen pen);

Parameters

x
Int32

The x-coordinate of the point to test.

y
Int32

The y-coordinate of the point to test.

pen
Pen

The Pen to test.

Returns

This method returns true if the specified point is contained within the outline of this GraphicsPath when drawn with the specified Pen; otherwise, false.

Examples

For an example, see IsOutlineVisible(Int32, Int32, Pen, Graphics).

Remarks

This method tests to see if the outline of a given path is rendered visible at the specified point.

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (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 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

IsOutlineVisible(Point, Pen)

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

Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen.

C#
public bool IsOutlineVisible (System.Drawing.Point point, System.Drawing.Pen pen);

Parameters

point
Point

A Point that specifies the location to test.

pen
Pen

The Pen to test.

Returns

This method returns true if the specified point is contained within the outline of this GraphicsPath when drawn with the specified Pen; otherwise, false.

Examples

For an example, see IsOutlineVisible(Int32, Int32, Pen, Graphics).

Remarks

This method tests to see if the outline of a given path is rendered visible at the specified point.

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (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 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9