TShape PEN is one pixel smaller than it should be
Original Reporter info from Mantis: JoshyFun @joshyfun
-
Reporter name: José Mejuto
Original Reporter info from Mantis: JoshyFun @joshyfun
- Reporter name: José Mejuto
Description:
Tshape objects aligned to top/left/right/botton/client are one pixel smaller visually, this means that the width of the object is in example 500x500, but visually it will be 499x499.
Steps to reproduce:
Drop a square TShape in an empty form, select alignement "Client" and you will see an extra pixel at right and bottom.
Additional information:
The TPEN painted line is one pixel smaller, rect is being reduced by one and them reduced again based in TPEN width, but calculated values seems wrong.
The attached patch solves the problem in Win32, but other platforms should be tested to avoid problems, as PEN sizes may be calculated different in other platforms.