Add stub method for isPointInStroke

This commit is contained in:
Evert Prants 2025-03-09 13:00:07 +02:00
parent 89b592c6ac
commit ef5c949d85
5 changed files with 18 additions and 2 deletions

4
.npmignore Normal file
View File

@ -0,0 +1,4 @@
coverage
test
/*.js
!dist

1
.npmrc Normal file
View File

@ -0,0 +1 @@
@icynet:registry=https://git.icynet.eu/api/packages/evert/npm/

View File

@ -1218,6 +1218,15 @@ export default (function () {
}
};
Context.prototype.isPointInStroke = function (path2d, x, y) {
if (this.__ctx) {
return this.__ctx.isPointInStroke(path2d, x, y);
}
// TODO: method stub
return false;
}
/**
* SetTransform changes the current transformation matrix to
* the matrix given by the arguments as described below.

View File

@ -1,13 +1,13 @@
{
"name": "@icynet/svgcanvas",
"version": "2.5.1",
"version": "2.5.1-1",
"description": "svgcanvas",
"main": "dist/svgcanvas.js",
"types": "types/index.d.ts",
"scripts": {
"watch": "rollup -c -w",
"build": "rollup -c",
"prepare": "npm run build",
"prepublishOnly": "npm run build",
"test": "karma start"
},
"repository": {

2
types/context.d.ts vendored
View File

@ -90,4 +90,6 @@ export default class Context {
createImageData(): any;
putImageData(): any;
globalCompositeOperation(): any;
isPointInStroke(x: number, y: number): boolean;
isPointInStroke(path: Path2D, x: number, y: number): boolean;
}