WeakAuras

WeakAuras

206M Downloads

Non-dynamic group members off by 1/1 pixel

Mitalie opened this issue ยท 0 comments

commented

Describe the bug

Auras within normal (non-dynamic) groups are one pixel up and to the right from the expected position.

To Reproduce

Create/import these auras showing a 4x4 pixel colored texture:

  • Centered standalone: !WA:2!Df5ZUnnqqyCSYHQ6dajGQqIdiXbehiLKwAOhjonrfuAB0gZFUf217y7vYExRzxN2YXCaXvYJqoZP8iWtGvfpb8i0Na21jQh40o76VXF)MVXBuR8w8w8F8SBnWvMse(mslotXbYGX9pBYkJkAoGAHs(eVz)KqZksPnWRUiowdgVLAilEIsinSbdppCiHLlquHP41BvSMkJsvyTMQDirQmf(bVgEnwYYaj350b9p5KviKy9i86ca3cYn0sJTZlkm2pO9xfPKCXMAKgvx0JOnu04ZIfsHo1pWEy8REaR7HDo(TDxyqrsIL(7)cCB53xXbwzCCTrNoC8KrFCCGXEHqlr6bl0fqw275A))QlzWCqAMAvlUA9Sb9NgoBAyFsyqP1fwrg9AajsAoO9j1szNc0mt6DTobbBRKPtgoE8Ys5we8lA6WFoeU5Ulc(19U1MpakPzFAtAFg5sb3KU7sQuKtDtBVQhn63avdtniitmP7u90aPsc3WTO7umZniOgCjLEHtQBmRAhKtfYrvVY2qv7Q9REDvh75J))xEUGx8qvCCxoKRAVDlCqPGV(4GtZppV4YxYdwhJ2j2Ia1qBC7ML7i3toRythqgo88IMCHocbdmdvMA08ywOIfj(28xtnoGH0v2GIuV31(SuqKKA2Lv3b81GmfL3lWUpI2JKxMze(KOmQwVx178d0IVbUIf39)BPlAE4(D2)O2D71o5nh194UXh2A(F(Y)o

  • Centered within a centered group: !WA:2!fov3UTrruywTcfYiOuBGqjuOHkrksihStiUPq5hVU2kTYUXA9Mw4kZS7C2Dh1X7SmZSHKCzUik3sEe81CLFe6tWrr8e0hH8eWSEnub3Wn7E0z((oNV58DgNNvxNxBNTAU1UnA1UrYxVBR9AfVt9P1z1zxC7RcPrVGPK5DLcP6jUUUJCTqFvOuXaL3Y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xrk0jc5b5AUitHKNFquKIPDMqYcn17j4z6G2D2VFh8KQz1wKkKpZXXXfRYjHSBjjHLxEtSstKAKhpJRrbrMxQe0qTKhhZKQ5xwo94Rhtzbfrr9ppNj3Pt3EB)8UEAZpWKcjzTHQCwA6Uuf6Avra7ewM230n)Sjh3ULF)J973c33RW8rcYtjNZKVRTEsMPnSFVoD7IlReSdJKQtWzKbmfAur2uiGMekslgK5BzG7ngsYKzK0dn40qL9grY4diwwTj8HBdFKxMiJDjJOy(AjllwNmZvudwTDCSf5sfluKrvdT9y5fSK3acpZCxyj4RNbwg(g4BnhV3)TcMKYJZGAsZYZImNXg2GzXLYHxQGq30ZSqcNdpOWiyiCykrPMd(EKNIFbZE4QGPYBL04662Z14pKvKGLmv42nZiSgrlKKYCdQQLmU6DhAmlFw)FVGizlSDrA6chLW1SXYsGyj0L0ZnlrEOXGvKp9w(gaClpLqQHLgrKHDlxnVAUXrMj0MldtzViqsO8c1RUZ1MfKHJz6Tn(fHma3ARDFU)WcfRlFaxNCz1mR8F1WP2I3ESweEsLO8qNJ)Jf50jIOOMu2ardA8WyjNAb3I4TgzpFeNQtU9nvE3TLgr3(Vb(TXD6S)KiBbJas0e3adAI4XO1kmJ0)0d35jBSE0PTdKNnnam0eKQChJTklVkFmsXsJkdfqnth6shGt9W5FZJUrZotxizhjj57jOmC7UT2Rh0XIBJHxr0wddlbhona56c)KBWaUukKjWmoWha1G3hnkiLLrTtyTwBTf8JYPZfoWjO8lYEbChJTeb3fb3db3)UldZ(AOo8aJZ6JH5qWNape(uyE4ZGph(c4lHhHGfq5ZAJPNW6xfaSZ)pFp43cAU(Qp9hAclUx(SuUkuY0SJFhXamuZSZZFW)yP34T45RQYg)B)9J)F54ZtiU4tTIvnW3b6IG9MiF5gCXJ1BSZ(e47qbjmECIUg8ZiOXMWkwFoSA5ZMLp3fEw9t(RF5Vd

The one in a normal group (red) is not aligned with the other two (blue + green = cyan). Magnified screenshot:
image
Measuring the full screenshot reveals that red is incorrectly centered and the other two are correctly centered.

Did you try having WeakAuras as the only enabled addon and everything else (especially something like ElvUI) disabled?

Yes

Which version of WeakAuras are you using?

3.0.5-16-g45181f3

Are you on World of Warcraft Classic or Retail?

  • Classic
  • Retail

The problem should apply to both

Was it working in a previous version? If yes, which was the last good one?

I didn't test. The relevant code doesn't seem to have changed for a long time, except for 6472469 (point 3 below) which simply enforces what was already restricted in the options UI.

Additional Info

This is caused by the following factors:

  1. Normal groups have an invisible 2x2 frame
    region:SetWidth(2);
    region:SetHeight(2);
  2. Normal groups are anchored by their bottom left corner
    local function modify(parent, region, data)
    data.selfPoint = "BOTTOMLEFT";
  3. Members of a group anchored to the parent group are anchored to the invisible frame's center
    local anchorPoint = data.anchorPoint
    if data.parent then
    if data.anchorFrameType == "SCREEN" or data.anchorFrameType == "MOUSE" then
    anchorPoint = "CENTER"
    end
    else

Obviously there is 1/1 pixel offset between the center and the bottom left of a 2x2 frame.

The invisible frame used to be 1x1 until b761c2f, causing only half pixel difference between bottom left and center. Change to 2x2 was done to help with texel snapping related issues caused by the partial pixel offset, but a better fix might be to actually align the anchors, e.g. set the selfPoint of a group to CENTER to match the anchorPoint of the children.