Sign in Join

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

Mailing lists / fpc-devel / 2006-07

[patch] types.pp - InflateRect() & Size()

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Graeme Geldenhuys

Hi,

Attached is a patch for the types.pp unit. I also include some Unit Tests for InflateRect() function in a separate file (uses fpcUnit) by wasn't sure how or where to incorporate them. The patch needs to be applied in the root FPC source directory.

Changes:
* Added a new InflateRect() function, which does the same as the Windows API call, but is cross-platform.
* Added two Size() functions with different parameters that return a TSize record. It works the same as the Point() function that returns a TPoint record.

Regards,
Graeme.

There's no place like 127.0.0.1

Reply by email

Graeme Geldenhuys
to Graeme Geldenhuys

Sorry, I added the two Size() functions as a last minute and only after sending the patch I noticed that it breaks the FPC build! Sorry!

I attached another patch, without the Size() functions... Anybody know how we can get around the Size() issue. It conflicts with the "SIZE = TSize;" line on line 94 in unit types.pp

----------------------------------
types.pp(267,14) Error: overloaded identifier "SIZE" isn't a function
types.pp(268,14) Error: overloaded identifier "SIZE" isn't a function
types.pp(271,1) Fatal: There were 2 errors compiling module, stopping
types.pp(271,1) Fatal: Compilation aborted
----------------------------------

Regards,
Graeme.

Graeme Geldenhuys wrote 24 lines
Hi, Attached is a patch for the types.pp unit. I also include some Unit Tests for InflateRect() function in a separate file (uses fpcUnit) by wasn't sure how or where to incorporate them. The patch needs to be applied in the root FPC source directory. Changes: * Added a new InflateRect() function, which does the same as the Windows API call, but is cross-platform. * Added two Size() functions with different parameters that return a TSize record. It works the same as the Point() function that returns a TPoint record. Regards, Graeme. -- There's no place like 127.0.0.1
There's no place like 127.0.0.1

Reply by email

Vinzent Hoefler
to Graeme Geldenhuys
Graeme Geldenhuys wrote 7 lines
Sorry, I added the two Size() functions as a last minute and only after sending the patch I noticed that it breaks the FPC build! Sorry! I attached another patch, without the Size() functions... Anybody know how we can get around the Size() issue. It conflicts with the "SIZE = TSize;" line on line 94 in unit types.pp

I'd suggest to get rid of the "SIZE" type rename. But most probably it will break something else somewhere...

Vinzent.

Reply by email