Mher Sarkissian
Mher Sarkissian

Reputation: 131

ctx.lineTo equivalent in Kineticjs

how can i draw this on a kinetic js layer:

ctx.beginPath();
ctx.moveTo(47.1, 139.8);
ctx.lineTo(50.5, 137.6);
ctx.lineTo(50.5, 135.6);
.
.
.
ctx.bezierCurveTo(92.0, 200.2, 88.4, 201.2, 87.5, 201.2);
.
.
.
ctx.closePath();
ctx.fillStyle = color;
ctx.fill();

I already setup the stage and layers. I want to draw the custom path generated by a tool in kinetic js. Thanks

Upvotes: 0

Views: 257

Answers (1)

Eric Rowell
Eric Rowell

Reputation: 5219

you can create custom shapes with the Kinetic.Shape constructor. Here's an example:

http://www.html5canvastutorials.com/kineticjs/html5-canvas-kineticjs-shape-tutorial/

Upvotes: 1

Related Questions