PaperScript : Why for non pre-defined shapes, it is need to be selected for it to display?

50 views Asked by At

I am new to PaperScript and I am trying to make hexagon using it. I have used following two codes. One works and one doesn't. I am not able to figure out the reason behind this behaviour:

Working code:

var triangle = new Path.RegularPolygon(new Point(80, 70), 3, 50);
triangle.fillColor = '#e9e9ff';
triangle.selected = true;

Not working code:

var triangle = new Path.RegularPolygon(new Point(80, 70), 3, 50);
triangle.fillColor = '#e9e9ff';

Why there is need to select the path for it to display (in case of not pre defined shapes) but for pre-defined shapes (like Circle or Rectangle) it is not needed?

0

There are 0 answers