lundi 30 mars 2015

Close and Fill Bezier Curve SVG, Canvas, Fabric.js or Create Curvy Shapes out of Points

Hello I need to close a path made by bezier curves (connect startPoint e.g. x:5 y:75 to endPoint x:476 y:75) and to fill it.


<path d="M 5 75 C 5 80 , 12 100 , 19 109 M 19 109 C 26 118 , 26 95 , 33 116 M 33 116 C 40 137 , 40 99 , 47 126 M 47 126 C 54 153 , 54 117 , 61 111 M 61 111 C 68 105 , 68 106 , 75 112 ... M 411 79 C 418 79 , 418 77 , 425 87 M 425 87 C 432 97 , 432 87 , 439 93 M 439 93 C 446 99 , 446 112 , 453 120 M 453 120 C 460 128 , 460 106 , 467 75 L 5 75 Z" stroke="black" fill="red"></path>


here is my self-explaining Fiddle: http://ift.tt/1ILg11Y


O.T. I am using fabric.js but i almost feel like it makes no sense as fabrik does not support curvy shapes out of points. Maybe someone could suggest a library where i can get a shape with round edges from a list of points. (Several instances in one view are needed :( )


Thank you!


Aucun commentaire:

Enregistrer un commentaire