Sign in Join

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

Mailing lists / lazarus / 2012-05

TColor and alpha channel

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Krzysztof

Hi,

Does TColor has alpha channel? I am confused because wiki says that it doesn't but delphi TColor has (I always thought that he doesn't have too, maybe it is new Delphi 2010?). If not, maybe exists any equivalent type or possibility write own TColorEx = longint which include standard TColor and byte with alpha?

Regards

Reply by email

Mattias Gaertner
to Krzysztof
Hi, Does TColor has alpha channel?

No.

Show quoted text 5 lines
I am confused because wiki says that it doesn't but delphi TColor has (I always thought that he doesn't have too, maybe it is new Delphi 2010?). If not, maybe exists any equivalent type or possibility write own TColorEx = longint which include standard TColor and byte with alpha?
TColor supports special colors:
  clNone    = TColor($1FFFFFFF);
  clDefault = TColor($20000000);
  SYS_COLOR_BASE = TColorRef($80000000);
  clScrollBar = TColor(SYS_COLOR_BASE or COLOR_SCROLLBAR);

TFPColor supports RGB colors with alpha.

Mattias

Reply by email

Krzysztof
to Mattias Gaertner

I read about TFPColor, but this is record type and I can't publish this kind of property type in object inspector, so I thought that maybe exists some numerical type which include alpha. Ok so I must create some wrapper which inherit from TPersistent.

2012/5/30 Mattias Gaertner :

Show quoted text 31 lines
On Wed, 30 May 2012 22:38:00 +0200 Krzysztof wrote: > Hi, > > Does TColor has alpha channel? No. > I am confused because wiki says that it > doesn't but delphi TColor has (I always thought that he doesn't have > too, maybe it is new Delphi 2010?). If not, maybe exists any > equivalent type or possibility write own TColorEx = longint which > include standard TColor and byte with alpha? TColor supports special colors: ?clNone ? ?= TColor($1FFFFFFF); ?clDefault = TColor($20000000); ?SYS_COLOR_BASE = TColorRef($80000000); ?clScrollBar = TColor(SYS_COLOR_BASE or COLOR_SCROLLBAR); TFPColor supports RGB colors with alpha. Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email