This is a wow side 'problem.' Feature, technically. The wow UI resolution is 1024 x 768. Pixels in wow are drawn as the UI resolution, divided by the screen width (or height), divided by UI scale. From what I understand this is an anti-aliasing mechanic, so if the width of your texture doesn't fall on a particular 'wow ui pixel' it is cropped to fit.
So for me, 1 pixel wide is:
768 / 1280 / .64 = .9375 pixels.
The way I implement this into my layouts is with this:
Code:
local Px = function(num, height)
if height then
return 768 / GetScreenHeight() / UIParent:GetScale() * num
else
return 1024 / GetScreenWidth() / UIParent:GetScale() * num
end
end
I also sometimes use numbers like N.25, N.5 and N.75 to reduce the chances of getting an uneven texture. This isn't foolproof but it does make it significantly easier to deal with precise small pixel elements like borders on different resolutions and different screen positions.
Although this is a bit of a tangent to the topic. When dealing with border textures I haven't found a solution for this problem. Unless you're manually creating your texture side-by-side in game, you can't control the width of them. If you're using SetAllPoints() you can slightly fine tune it by using
Code:
:SetPoint('TOPLEFT', xOff, yOff)
:SetPoint('BOTTOMRIGHT', xOff, yOff)
but there's you've only got a few pixels to work with before the border gets distorted.
The best solution is to just shift the entire buff frame around a few pixels until you find the right look. It's annoying but generally something being 5 pixels off from where you want it to be isn't too bad (assuming you move any paired elements to match the offset, i.e. the minimap in this case)