Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2007-06

TFPCustomCanvas and Rectangle method

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

Below is the definition of the Rectangle method as defined in TFPCustomCanvas in the fpcanvas unit.

  procedure Rectangle (left,top,right,bottom:integer);

I believe it would be much better defined as show below. The reason being that 'right' and 'bottom' are actually offset values based on 'left' and 'top' and not absolute coordinates as the parameter names would make you believe.

  procedure Rectangle(ALeft, ATop, AWidth, AHeight:integer);

If Michael or anybody else agrees, I'll create and submit a patch for the 'fpcanvas' unit.

Regards,
- Graeme -

Reply by email