Sign in Join

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

Mailing lists / fpc-pascal / 2007-06

fpCanvas and FPColor property

2 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,

TFPCustomFont has a property as follows:
  property FPColor : TFPColor ...

TFPColor is a record compared to Lazarus and Delphi's Color property being TColor with is a LongWord.
If I persist a Form containing a Label to a .dfm or .lfm or whatever extension I want to use. Will the internal TWriter of TComponent be able to write a TFPColor property to file? Or will I have to do some magic in TWriter or implement a Color: TColor property in my components?

If the later is needed, why doesn't TFPCustomCanvas implement the FPColor property like Lazarus and Delphi using TColor (LongWord).

Regards,
- Graeme -

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 15 lines
Hi, TFPCustomFont has a property as follows: property FPColor : TFPColor ... TFPColor is a record compared to Lazarus and Delphi's Color property being TColor with is a LongWord. If I persist a Form containing a Label to a .dfm or .lfm or whatever extension I want to use. Will the internal TWriter of TComponent be able to write a TFPColor property to file? Or will I have to do some magic in TWriter or implement a Color: TColor property in my components? If the later is needed, why doesn't TFPCustomCanvas implement the FPColor property like Lazarus and Delphi using TColor (LongWord).

Because TFPColor is a 64-bit structure. When it was implemented, streaming was not a consideration.

Michael.

Reply by email