hundredrabbits / Dotgrid

Minimalist Vector Tool
https://hundredrabbits.itch.io/dotgrid
Other
1.04k stars 75 forks source link

Curves not mirroring properly #34

Closed jaybaptista closed 6 years ago

jaybaptista commented 6 years ago

When defining a curve, it doesn't mirror horizontally as expected, instead it mirrors the points but the curve isn't mirrored exactly.

image

neauoire commented 6 years ago

I've been trying to solve this actually, it's a tricky one. If you have any idea how to mirror SVG paths(not using) I could do with a bit of help.

neauoire commented 6 years ago

/scripts/generator.js

jaybaptista commented 6 years ago

I'm currently studying for exams this week so I can't really look into it but maybe try to make a new layer for mirrored segments, then for the new layer/context just scale it in the inverse direction ( https://www.w3.org/TR/2dcontext/#dom-context-2d-scale) somewhere like: " layer.setScale(-1, 1) ", which should just mirror the segment and I understand that the points are already offset in generator.js so maybe it would work?

On Thu, May 10, 2018 at 7:48 PM, Лu Лinveгa notifications@github.com wrote:

/scripts/generator.js

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hundredrabbits/Dotgrid/issues/34#issuecomment-388266446, or mute the thread https://github.com/notifications/unsubscribe-auth/AF36O4lHdymO66VaWYqEse3FnGXHhoA-ks5txSYXgaJpZM4T65DD .

neauoire commented 6 years ago

That's how it was before and isn't quite good enough. I'll figure it out, I think I have found something that works~ Will do some further testing.

neauoire commented 6 years ago
screen shot 2018-05-12 at 9 32 38 am screen shot 2018-05-12 at 9 32 30 am screen shot 2018-05-12 at 9 32 22 am