Originally Posted by semlar
While pixel-perfection might be desirable when trying to draw straight single-pixel borders, it produces hard, jagged lines everywhere else. A pixel-perfect image also can't be scaled, so will end up looking quite small on a higher resolution monitor.
Anti-aliasing techniques are used to produce a smoother experience for general use. It's a complicated subject, and different applications require different approaches for better results.
Snapping the edge of a frame to the nearest pixel also produces a perceptibly less-smooth movement system than interpolating it the way the game does normally.
|
Ofc it can be scaled, you just have to reapply the pixel perfect methods after every SetScale and OnSizeChanged method/script, that's why i said it can draw a lot of resources.
Basically you make sure the width/height/edgesize are integer pixels by rounding, and you make sure the frame itself (and it's childrens) is not on fraction pixels or you check the GetTop/GetBottom/GetLeft/GetRight boundaries and round them to integer pixels.
And you also have to do this every time the game's resolution/window size or the UIParent scale gets changed.