idwall / idcrop

Polygonal image cropping plugin.
MIT License
18 stars 9 forks source link

Use SVG instead of divs #5

Closed raphaelgmelo closed 6 years ago

raphaelgmelo commented 6 years ago

This will allow us to make a polygonal selection for IDs \o/

I see the first incremental step as using SVG for the current boxed crop. After that, we can think of a polygonal crop

Some experimentations: https://jsfiddle.net/9cg9ngx5/

brizental commented 6 years ago

I'll work on this, but I'll try this with SVG and canvas and see what works best.

Experiments with canvas: http://jsfiddle.net/5afa1so3/

brizental commented 6 years ago

I had a really good result using canvas. I basically got it to work with much less code and much faster. Next week I'll put it in our own code.

You guys can see it working already: https://codepen.io/brizental/pen/xPmovB