Bug in Bounds() procedure
Original Reporter info from Mantis: ggeldenhuys
-
Reporter name: Graeme Geldenhuys
Original Reporter info from Mantis: ggeldenhuys
- Reporter name: Graeme Geldenhuys
Description:
Bounds() is not calculating the Right and Bottom values correctly.
So we have a rectangle. Top = 1, Left = 2, Width = 2, Height = 2.
eg:
If you need to calculate the right value, it is:
Right := Left + Width - 1.
If you think of it it terms of a rectangle on a screen, Left (or x coordinate) is already the first pixel painted with a width of 1 pixel. So if that rectangle is 2 pixels wide, you only need to point another pixel to the right or Left (or x coordinate). So the right edge of the rectangle in this example is: Left+1 or Left + Width - 1
Mantis conversion info:
- Mantis ID: 16682
- OS: Ubuntu Linux
- OS Build: 10.04
- Build: latest revision
- Platform: x86_64
- Version: 2.5.1
- Fixed in version: 2.6.0
- Fixed in revision: 667 (#3d174e3c)
- Target version: 2.4.2