sprang / Inkpad

Vector illustration app for the iPad.
Mozilla Public License 2.0
2.64k stars 474 forks source link

Anchor point control #98

Open camloken opened 10 years ago

camloken commented 10 years ago

SVG allows you to vary the width of a point on a stroke (eg. consider a four point open path and set it like so... stroke-width: 1 5 2 8;). In theory you could have point A start at 1px and point B at 5px and so on, varying the width of a stroke. You could also set up a corner radius on each anchor point (using a quadratic curve). A contextual palette could pop up that allows you to control both the width and and the curve of an anchor point (possibly sliders). Again, a very simple interface, but this allows for super flexible control and creativity. You could do this on multiple points at the same time, but if the points varied in width and radius, you should probably hide the button on the slider controls. Of course the slider button would appear after the user selects a width or radius. All the selected anchor points would then have the same width or radius. Hope this makes sense.

Cheers, Cam

Width 0 ---------0---------- 100 [+] Curve 0 -----0-------------- 100 [+]

sweetmandm commented 9 years ago

Where do you find that definition of stroke-width in the spec? I don't see anything in the SVG 1.1 spec that indicates stroke-width can be an array. See stroke-width at: http://www.w3.org/TR/SVG/painting.html

A second stopper is that Inkpad renders strokes in Core Graphics, which does not support variable stroke width.

camloken commented 9 years ago

Hi David, Thanks for your response. You are right, the stroke-width definition is still in progress at the moment. That being said you may want to check out this experimental link.

http://svg-whiz.com/experiments.html

Cheers, Cam

Sent from my iPhone

On Oct 8, 2014, at 12:21 PM, David Sweetman notifications@github.com wrote:

Where do you find that definition of stroke-width in the spec? I don't see anything in the SVG 1.1 spec that indicates stroke-width can be an array. See stroke-width at: http://www.w3.org/TR/SVG/painting.html

A second stopper is that Inkpad renders strokes in Core Graphics, which does not support variable stroke width.

— Reply to this email directly or view it on GitHub.