kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #31049
Re: [PATCH] Set color picker color alpha channel to 1
-
To:
kicad-developers@xxxxxxxxxxxxxxxxxxx
-
From:
jp charras <jp.charras@xxxxxxxxxx>
-
Date:
Fri, 29 Sep 2017 15:27:46 +0200
-
In-reply-to:
<CAHBy37fnA0=6uxUCyVJK5N6nGU6+-P3pBb0RdKzGf7KC81oxJg@mail.gmail.com>
-
User-agent:
Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Thunderbird/52.3.0
Le 29/09/2017 à 14:08, Seppe Stas a écrit :
> Fixes lp:1718389 <https://bugs.launchpad.net/kicad/+bug/1718389>. The alpha channel of
> |KIGFX::COLOR4D|, which is used to draw the color pickers, initialises to 0. This causes the color
> picker to be invisible on platforms that support alpha channels in a |wxBitmap| (like macOS). This
> patch sets the alpha channel of the color used to draw the color pickers to 1.
Good catch Seppe.
The main bug is in KIGFX::COLOR4D that initialize the opacity to 0.
This is clearly a mistake.
I just committed a fix to set the opacity to 1.0 (a normal value) and therefore fix this issue.
>
> This patch also simplifies the generation of the color channel bitmaps a bit and fixes weird scaling
> issue of green-blue triangle
> <https://launchpadlibrarian.net/339135271/Screen%20Shot%202017-09-29%20at%2011.54.46.png>
> @Jean-pierre, I’m not sure what the 0.9 factor was for, but removing it looks a lot nicer.
>
Just to adjust the vertical scale to give a "good" 3D rendering of the 3D RGB space in the 2D draw
plane.
The "good" value is a matter of taste.
--
Jean-Pierre CHARRAS
Follow ups
References