View Single Post
10-08-17, 03:36 AM   #6
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by semlar View Post
Fractions get rounded to the nearest pixel, you can't draw something halfway between two pixels.

The client has an internal resolution with a height of 768 pixels (width depends on widescreen format), and that gets stretched to fit the size of the window on the player's monitor. Even if you use whole numbers in your code, those aren't going to map 1:1 with pixels on their screen, so you're generally dealing with rounded fractions anyway.

There are also other factors that come into play like the UI scale setting and the scale of the frame itself.
Ofc you can't draw between pixels, however if you don't round the numbers yourself then the engine is going to render those textures differently:



You can clearly see something is wrong with the left/right border of these pet frames, and that would be the not rounded SetPoint x value.

And this is a chain of command, if the frame is not placed pixel pefectly then the topleft border is neither and so on everything that SetPointed to the topleft border so the topright border neither on integer pixels.

Last edited by Resike : 10-08-17 at 03:55 AM.
  Reply With Quote