HTML tuvali isPointInPath() Yöntemi
Örnek
20,50 noktası geçerli yoldaysa bir dikdörtgen çizin:
JavaScript:
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.rect(20, 20, 150, 100);
if (ctx.isPointInPath(20, 50)) {
ctx.stroke();
};
Tarayıcı Desteği
Tablodaki sayılar, yöntemi tam olarak destekleyen ilk tarayıcı sürümünü belirtir.
Method | |||||
---|---|---|---|---|---|
isPointInPath() | Yes | 9.0 | Yes | Yes | Yes |
Tanım ve Kullanım
isPointInPath() yöntemi, belirtilen nokta geçerli yoldaysa true, aksi takdirde false döndürür.
JavaScript sözdizimi: | bağlam .isPointInPath( x,y ); |
---|
Parametre Değerleri
Parameter | Description |
---|---|
x | The x-coordinate to test |
y | The y-coordinate to test |
❮ HTML Kanvas Referansı