Lazarus

Programming => Graphics => Graphics and Multimedia => BGRABitmap and LazPaint => Topic started by: winni on September 19, 2020, 12:24:02 am

Title: TBCButtonFocus: round corners leave white BG on gradient
Post by: winni on September 19, 2020, 12:24:02 am
Hi!

Situation:

A TBCButtonFocus with round corners on a Form.
If the form has one solid color everything is ok:
the cliiped rest of the rectangle is in the Form.color.

Now I wanted to put a gradient on the Form:
The corners of the round TBCButtonFocus are white.
And I don't know how to fix it.

The color of the button is clNone.
And there are no options for transperency in the class.

Does anybody how to change that?

Problem is shown in the attachment.

Winni
Title: Re: TBCButtonFocus: round corners leave white BG on gradient
Post by: lainz on September 19, 2020, 01:56:52 am
I suppose you're on Linux?

I already reported the bug:
https://bugs.freepascal.org/view.php?id=37005
Title: Re: TBCButtonFocus: round corners leave white BG on gradient
Post by: winni on September 19, 2020, 03:42:47 am
Hi Lainz!

I see - thanx.
Yes - I am on Linux.

Wild hack-workaround:

Set the button.color to something ugly and unused (clOlive??).
Make a backup of the gradient.
Replace all corner pixels with the button.color by the related pixel of the gradient.
Don't do it on the canvas because it is awfull slow.
Copy it to an intermediate BGRAbitmap an do all needed operations there.

Another rattrap .....

Your entry in the bug tracker is from 1/5/2020.
Does anybody care about LCL graphics?

Winni

PS. That was the "International fighting day of the working class".



Title: Re: TBCButtonFocus: round corners leave white BG on gradient
Post by: lainz on September 19, 2020, 04:34:29 am
Nice to know. Sometimes is a fight using the bugtracker...
Like when proposing changes or reporting strange bugs...
If not a fight at least a vivid discussion
Like in real life I think.  :)
TinyPortal © 2005-2018