/

HTML / CSS / JavaScript Tutorial

JavaScript canvas2d object method: isPointInPath()

[this page | pdf | back links]

The isPointInPath() method of the JavaScript DOM object returned by the getContext("2d") method applied to the HTML <canvas> element returns true if point is in current path, otherwise false.

 

It has the following syntax with the following parameters.

 

context.isPointInPath(x, y)

 

Parameter

Required / Optional

Description

x

Required

x-coordinate of point

y

Required

y-coordinate of point

 


NAVIGATION LINKS
Contents | Prev | Next | JavaScript DOM (and BOM)


Desktop view | Switch to Mobile