Open humdingerb opened 1 year ago
How did you rotate it? You need to make sure the rotation center is exactly centered so you don't shift the square by a half-pixel, which gives you that anti-aliased edge. That would also make it "101 x 101" because the half-pixels on the edges still take up a whole pixel.
I did this:
The edge is perfectly crisp with no anti-aliasing.
I just created a square and rotated the (arbitrarily sized) layer.
Maybe my brain shortcircuits thinking about it, but... The rotating area width/height has either an odd or an even number of pixels. The rotation point is therefore either in the... hang on... I think I got it! The issue may be if the width has an even number of pixels and the height is odd, and vice-versa. See here:
Let's say the checker pattern are single pixels of an image. If a rotating area has an even number of pixels in height and width, the rotation center lies in one of the green corners. If the pixel number is odd, it's in the center. But if one of them is even and the other odd, the rotation point is in one of the red circles, which will result in half-pixels.
Given the blurry results, should ArtPaint make sure the rotation point is in the "green" locations? I think so, because the artist probably isn't interested in the "mathematically correct" center.
I appreciate your analysis but thinking about it from a user perspective I am not able to come up with situations where it matters that much.
A. Any angle besides 90, 180, 270 will have an antialiased edge no matter the rotation center. B. Any shape that doesn’t have a flat edge aligned to 90, 180, 270, or 360 will be antialiased no matter the rotation center.
Between A & B the number of use cases seem quite small. Am I missing something?
I can see enhancements to help with setting rotation centers being useful, something like this widget(ignore the orange square)
or a modifier key to snap the rotation center to the corner of a selection.
WRT that antialiasing, maybe you're right. Just caught my eye, probably because I often deal with straight, rel. low resolution lines of screenshots and mockups... :)
The idea to help setting the rotation center is a good one. Best IMO by snapping to selection/canvas corners, median lines, center when holding SHIFT while right-dragging the rotation-center-widget.
just playing around a bit, I think one area this is definitely needed is that there's no convenient way to reset the pivot point to the center of the selection, besides cancelling the rotation and reopening the manipulator.
Try this: