I am trying to make a tool to draw an arbitrary figure like in this example - Line Drawing, but using path itself with fill
- not stroke
. Here is what i already done - https://jsfiddle.net/zeleniy/b14paam2/. Example already contains single arbitrary path figure, but you can draw by yourself using dragging.
As you can see a have two troubles:
Nib is sloped i do not know why. As consequence when draw diagonal line from top-right to bottom-left or vice versa path almost invisible.
In places where path intersect itself filling are absent.
How to fix this problems?