noflo-canvas icon indicating copy to clipboard operation
noflo-canvas copied to clipboard

Coverage

Open automata opened this issue 11 years ago • 2 comments

Analyzing the canvas 2d API I want to start discussing its coverage/mapping to components.

As a beginning, how to create paths with mixed lineTo, arcTo, moveTo instructions?

automata avatar Apr 25 '14 02:04 automata

MakePath, with single commands, makes the first point moveTo and the rest lineTo.

No arcTo yet

There isn't a way to do moveTo in the middle of a path. That could be its own component. Then in Draw.path() if the item is a Point, work as it does now, MoveTo or LineTo do those specific.

PS, this is a challenge that I give when teaching JS. noflo-canvas makes a totally different way to look at the problem and solution: screen shot 2014-04-25 at 10 05 29 am

forresto avatar Apr 25 '14 07:04 forresto

Curves are now arrayable. In this case, the first point works as a moveTo to do before each curve path.

screen shot 2014-04-25 at 5 18 43 pm

forresto avatar Apr 25 '14 14:04 forresto