akiraux / akiraux/libgtkcanvas
Add angle-snapping when rotating
- Lingua principale
- Vala
- Stelle
- 47
- Fork
- 4
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
I've implemented that like this:
If the object is rotated, by dragging the node, by a `rotation` amount (in degrees, for this example), then the actual rotation would be equal to:
rotation - rotation % 15
For example, if the input rotation is _67°_, then the applied rotation would be _67 - 67 % 15 = 67 - 7 = 60_.
And that works fine. However, this isn't the default behavior in 99% of the software I've used, but rather, it's freehand rotation, until you press a key (most likely `Ctrl`), and then the snapping is applied. And currently I don't know how to detect whether `Ctrl` is pressed or not, so I can't finish this feature on my own (if I figure it out, I will send in a PR).
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.