Color Problem

TeeGrid VCL / FMX for Embarcadero RAD Studio, Delphi, C++ Builder and Lazarus Free Pascal.
Post Reply
QDavid
Newbie
Newbie
Posts: 2
Joined: Mon Aug 26, 2019 12:00 am

Color Problem

Post by QDavid » Fri Apr 07, 2023 11:28 am

Hi

In Delphi 11.2 + Firemonkey , does not support AlphaColors?

Image attached..

Thks.
Attachments
TeegridBakColor.png
TeegridBakColor.png (18.29 KiB) Viewed 28082 times

QDavid
Newbie
Newbie
Posts: 2
Joined: Mon Aug 26, 2019 12:00 am

Re: Color Problem

Post by QDavid » Sat Apr 08, 2023 9:30 pm

Width this change in the original code of the unit Tee.Format , seems to work correctly.

Code: Select all

class function TColorHelper.Swap(const AColor:TColor):TColor;
begin
{  Original Code
  TAlphaColorRec(result).R:=TAlphaColorRec(AColor).B;
  TAlphaColorRec(result).G:=TAlphaColorRec(AColor).G;
  TAlphaColorRec(result).B:=TAlphaColorRec(AColor).R;
  TAlphaColorRec(result).A:=TAlphaColorRec(AColor).A;
 }

  // Changed code
  TAlphaColorRec(result).R:=TAlphaColorRec(AColor).R;
  TAlphaColorRec(result).G:=TAlphaColorRec(AColor).G;
  TAlphaColorRec(result).B:=TAlphaColorRec(AColor).B;
  TAlphaColorRec(result).A:=TAlphaColorRec(AColor).A;

end;

Marc
Site Admin
Site Admin
Posts: 1274
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: Color Problem

Post by Marc » Tue Apr 18, 2023 9:34 am

Thanks for the feedback. We'll take a look at the best way to meet TColor and TAlphaColor requirements.

Regards,
Marc Meumann
Steema Support

TheOtherPrefontaine
Newbie
Newbie
Posts: 17
Joined: Tue Aug 22, 2023 12:00 am

Re: Color Problem

Post by TheOtherPrefontaine » Fri Sep 22, 2023 2:32 am

This exact bug was in the aggpas delphi port.

Post Reply