I am into a situation where is need to find out of the shape is drawn inside an other shape on canvas.
For Example:
I have a canvas and I draw a random shape by plotting the points on the canvas and apply the color in it.
Secondly, I have to draw an other shape inside the first shape on the same canvas.
Here all I need to know technically if the second shape drawn in completely inside the first shape.
I am using javascript and easelJs.
Edit : Sample code how I plot points
const drawingCanvas = new createjs.Shape();
drawingCanvas.graphics
.clear()
.setStrokeStyle(canvas.height)
.setStrokeDash([14, 8])
.beginStroke('white')
.moveTo(midPt.x,midPt.y)
.curveTo(
oldPt.x,
oldPt.y,
oldMidPt.x,
oldMidPt.y
);
const mouseX = this.stage.mouseX;
const mouseY = this.stage.mouseY;
this.plotPoints.push({ x: mouseX, y: mouseY });
Created oldPt
and oldMidPt
using createjs.Point
Thanks