View Single Post
06-09-17, 06:59 PM   #11
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
Originally Posted by Resike View Post
You can however thats a bit more complex, since you can never know if the relative frame is not positioned on fraction pixels, for that you have to get the relative frames (GetLeft|GetBottom|GetTop|GetRight) based on anchor points and substract those values from the actual frame's (GetLeft|GetBottom|GetTop|GetRight), and it even gets more complicated since every different anchor points need different calculations, however i have a function for that already, called GetRelativePoint:

This time the frame is anchored to the PlayerFrame, every time you move the PlayerFrame the frame moves with it, if you position the PlayerFrame on fraction of pixes it does not matter for the frame, the frame still will be positioned pixel perfectly every time. You can also move the frame related to the player frame and it will also keep the pixel perfection that way, and also every time to resize/rescale the PlayerFrame or resize the frame itself. HOWEVER it won't keep the pixel perfection if you scale the frame itself, thats requires even more work.
Whoa... That's definitely more complicated than I thought.

I gotta look through it!

Originally Posted by Resike View Post
I don't think ElvUI has pixel perfection, at least not a "perfect" pixel perfection. They just using a hack to set you UI scale on a number which only makes the frames pixel perfect on a 1.0 scaling, however every other scale value will be still be ugly (mostly for frames with edges).

The perfect pixel perfect scaling/resizing on any value is a lot more harder to achieve, i have such a function for my frames, however it only works on frames that you know well and you build in a proper way, it can't be generalised to work on every frame easily.
Hm... I see.

It seems like I've underestimated pixel perfection...

Yep, it is absolutely an horror...

Anyways, thank you so much for such a detailed explanation!
  Reply With Quote