Skip to main content
isPointInPath method

Determines if the specified point is in the current path.

HTML Canvas 2D Context, Section 9 Internet Explorer 9

Syntax

var retval = CanvasRenderingContext2D.isPointInPath(x, y, fillRule);

Parameters

x [in]

Type: number

The x-coordinate to test.

y [in]

Type: number

The y-coordinate to test.

fillRule [in, optional]

Type: DOMString

Set to the evenodd fill rule.

Return value

Type: Boolean

Return valueDescription
false

The point is not in the current path.

true

The point is in the current path.

 

Standards information

Remarks

Starting with Internet Explorer 11 this method uses the non-zero winding number rule or the even-odd rule, based on the setting of the optional fillRule parameter. Earlier versions offer only the default non-zero winding number rule.

See also

CanvasRenderingContext2D
msFillRule