Quantcast Pixel Perfection for Specific Resolution - WoWInterface
Thread Tools Display Modes
Prev Previous Post   Next Post Next
04-26-10, 03:24 PM   #9
A Deviate Faerie Dragon
Join Date: Apr 2010
Posts: 11
Originally Posted by Sideshow View Post
You say SetCVar / GetCVar ??? I corrected it to GetCVar / GetCVar
You are incorrect by changing this code to use 2 GetCVars, since there are two arguments in nightcracker's code, and GetCVar only has one argument:


I also don't agree with nightcracker's original code either (and this may be simply a misunderstanding on my part as well). It seems like the multiplier calculation should only call GetCVar:

local mult = (768/string.match(({GetScreenResolutions()})[GetCurrentResolution()], "%d+x(%d+)"))/GetCVar("uiScale")
His original code, if I understand it correctly, would override your UIScale Cvar permanently with a fixed value.

Anyways, the premise to this method is finding the reverse multiplier that WoW is using, so it is scaling you one way, and you're scaling it back before you draw, thereby negating effects of both the UI scaling and the "in-game" resolution based off a 768 pixel height screen.

I'm still going to reiterate this warning: using this method will cause the code ignore UI scaling. Use only where appropriate.

For instance, a 1 pixel border ignoring UI scale is fine, as it will stretch to encompass the entire container and still serve its purpose while retaining is pixel perfection. Using it to scale an entire frame will result in the UI enlarged or contracted in comparison to your addon because your addon isn't scaling with everything else.

Last edited by TravisWatson : 04-26-10 at 03:28 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Tutorials & Other Helpful Info. » Pixel Perfection for Specific Resolution

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off