Quantcast WoWInterface - View Single Post - How to make pixel-accurate interface?
View Single Post
07-11-18, 05:58 AM   #1
Basil2
A Deviate Faerie Dragon
Join Date: Feb 2015
Posts: 17
How to make pixel-accurate interface?

I am trying to output some pixels and have two problems.


1. Frame:SetSize(x, y) in real pixels is not exactly x and y.

I can compensate it by using Frame:SetScale(768/real_resolution). But how can I get <real_resolution> within addon?


2. I cannot set exact pixel color.

I have
Code:
function SetColor256(obj, r, g, b)
    obj:SetColorTexture(r/255, g/255, b/255)
end
However, when I call it like SetColor256(1, 2, 3), real pixel might have (0, 1, 3). Or (1,2,3) as planned. Why? How to compensate it?
  Reply With Quote