ghkweon / dwscript

Automatically exported from code.google.com/p/dwscript
0 stars 0 forks source link

[BUG] DwsIdeDemo - UdwsIdeForm TRect.Width and TRect.Height methods doesn't exist in delphi XE or below. #417

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi at line 2058 of unit UdwsIdeForm there is a call to Ri.Width and Ri.heigth 
those methods in delphi XE and lower doesn't exist. maybe you should create 
arecord helper for those versions or use: Abs(Ri.Right- ri.Left) for Width and 
Abs(Ri.Top-Ri.Bottom) for Height 

Original issue reported on code.google.com by fdue...@gmail.com on 8 Jun 2013 at 12:36

GoogleCodeExporter commented 8 years ago
Or if Right will be always greater than Left and Top greater than Bottom you 
could skip the ABS function :)

Original comment by fdue...@gmail.com on 8 Jun 2013 at 12:40

GoogleCodeExporter commented 8 years ago
Fixed

Original comment by zar...@gmail.com on 11 Jun 2013 at 6:34

GoogleCodeExporter commented 8 years ago
Thanks, but i saw the changes, I think is better to have:
(Ri.Top-Ri.Bottom instead of (Ri.Bottom-Ri.Top) 
I think Top will be always greater than bottom or not?

Original comment by fdue...@gmail.com on 11 Jun 2013 at 7:02

GoogleCodeExporter commented 8 years ago
Coordinates have a top-left origin, so Top<Bottom or it's a degenerate TRect 
(used for "null" rectangles)

Original comment by zar...@gmail.com on 12 Jun 2013 at 1:48

GoogleCodeExporter commented 8 years ago
You're right, its a measuring and not a location rectangle (bounding box) what 
you're getting. I have not used TRect like that before, I have learn something 
new, Thanks regards.

Original comment by fdue...@gmail.com on 12 Jun 2013 at 5:23