CreativeInquiry / PEmbroider

Embroidery Library for Processing
Other
442 stars 28 forks source link

strokeMode (ANGLED) #44

Closed golanlevin closed 4 years ago

golanlevin commented 4 years ago

A feature request, inspired by some embroidery graphics I've seen:

E.strokeMode(PEmbroiderGraphics.ANGLED); E.strokeAngle(radians(45));

IMG_8700

This will not work for large angles, but could be attractive for angles ±45°. It might require raster rendering to cope with appropriate cropping.

LingDong- commented 4 years ago

Angled mode added: bc9833185364060e37e2d84a2144833e1613f8ab

It's simply PERPENDICULAR mode with an angle -- I was already using raster rendering to do the cropping for PERPENDICULAR.

E.strokeMode(PEmbroiderGraphics.ANGLED);
E.strokeAngle(radians(45));

Produces weird results when angle > 60° though (which makes sense). Maybe I'll add a cap in the setter.