layer names not positioned correctly

Help
2009-05-27
2013-05-02
  • Nigel Paton
    Nigel Paton
    2009-05-27

    Hi,

    Most of the layer name positioning code is still based on the old coordinate system.

    For example in mpFX::Plot():

                if ((m_flags & mpALIGNMASK) == mpALIGN_RIGHT)
                    tx = (w.GetScrX()>>1) - tx - 8;
                else if ((m_flags & mpALIGNMASK) == mpALIGN_CENTER)
                    tx = -tx/2;
                else
                    tx = -(w.GetScrX()>>1) + 8;

    I think this should be:

                if ((m_flags & mpALIGNMASK) == mpALIGN_RIGHT)
                    tx = (w.GetScrX() - tx) - 8;
                else if ((m_flags & mpALIGNMASK) == mpALIGN_CENTER)
                    tx = ((w.GetScrX() - tx) / 2);
                else
                    tx = 8;

    Cheers

    Nigel