Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@doodle3d/fill-path
Advanced tools
Vector based fill tool (like floodfill) build with Clipper
Include fillPath
in your project. fillPath
accepts two arguments, paths
and point
.
fillPath( Paths, Point, [ { LineWidth = 1.0, Scale = 10.0, MiterLimit = 2.0, FillOffset = 'center' } ] );
Paths = [...[...Point];
Point = { x: Number, y: Number };
LineWidth = Float;
Scale = Float;
MiterLimit = Float;
FillOffset = String;
Note: the Point
argument gets rounded because Clipper
needs IntPoint
for polygon collision.
Include fill-path
Using JSPM
import fillPath from 'Doodle3D/fill-path';
Using NPM
const fillPath = require('fill-path');
Example code
const paths = [rect(0, 0, 30, 30), rect(10, 10, 10, 10)];
const result = fillPath(paths, { x: 5, y: 5 });
// result = [ [
// { x: 1, y: 1 },
// { x: 1, y: 29 },
// { x: 29, y: 29 },
// { x: 29, y: 1 }
// ], [
// { x: 21, y: 10 },
// { x: 21, y: 20 },
// { x: 20, y: 21 },
// { x: 10, y: 21 },
// { x: 9, y: 20 },
// { x: 9, y: 10 },
// { x: 10, y: 10 },
// { x: 10, y: 9 },
// { x: 20, y: 9 }
// ] ]
function rect(x, y, w, h) {
return [
{ x, y },
{ x: w + x, y },
{ x: w + x, y: h + y },
{ x, y: h + y },
{ x, y }
];
}
Using NPM
npm install fill-path
using JSPM
jspm install github:Doodle3D/fill-path
git clone git@github.com:Doodle3D/fill-path.git
cd fill-path
npm install
jspm install
npm run test
npm run example
FAQs
Vector based fill tool (like floodfill)
The npm package @doodle3d/fill-path receives a total of 1 weekly downloads. As such, @doodle3d/fill-path popularity was classified as not popular.
We found that @doodle3d/fill-path demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.