-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Allow rotating IO masks #3987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow rotating IO masks #3987
Conversation
|
Re the bounds checking, the seems like a rare-enough case that it's probably not worth the effort? PR looks good. The only thought I had was about the way we're serializing the angle to four decimal places, which is probably more than we need. And once the user has made adjustments, even if they rotate back to what looks like 0, chances are it remains stuck on an angle like 0.05. We could perhaps address the former by normalizing the value to 10k steps, but I'm not sure if it's worth it for a few bytes savings per rotated occlusion. |
|
Even with 10k steps its still difficult to get it back to 0. The rounding error doesn't appear to be noticeable at least. Worried about using 10000 as a magic constant though. Perhaps keeping it as degrees but with truncated decimal points would allow for future flexibility PS: Made a few git mistakes and had to wrestle with it for a bit 😅 no idea how i closed it |
bcd6129 to
899f790
Compare
|
I think it might automatically close if the branch becomes empty of new commits? Not sure though. In any case, thank you as always for the improvements, including going the extra step of normalizing those values. :-) |
Relevant: https://forums.ankiweb.net/t/allow-rotating-io-masks/60336
NB1: editing on older clients can be destructive (rotation-wise only), as the
angleIO cloze property would be stripped outNB2: 6d767c4's message is mistakenly misleading, it's not meant to be a full revert of that commit
EDIT: the bounds checking leaves one case unresolved: a thin diagonal rect can have a bounding box large enough that it still remains in the canvas, but the actual rect itself is far enough away as to be hidden. we could check for non-intersection with the canvas, but im not sure where the mask should be moved to. thoughts?