-
Notifications
You must be signed in to change notification settings - Fork 83
[REQUEST] Optional alpha channel #9
Comments
I have started to work on this feature and I have made some progress. First of all I've declared two new attributes alphaChannel (float between 0 and 1.0) and waveBackgroundColor (color). The alphaChannel attribute has a default value of 0.66 (0xAA) If the user only sets the waveColor the progressbar works exactly the same as now. wavePaint is initialized with smoothColor() of the waveColor with the alphaChannel applied and waveFilledPaint is initialized with filterColor() of the waveColor with the alphaChannel applied. It waveBackgroundColor is also set, wavePaint is set to smoothColor() of the waveBackgroundColor with the alphaChannel applied and waveFilledPaint is set to smoothColor() of the waveColor with the alphaChannel applied. I've made tests and the colors are applying but I have issues with the drawing of the rects... . first of all there is redrawData which already needs a color (wavePaint) and also there is the onDraw method which uses both wavePaint and waveFilledPaint to paint the rects. The result I'm getting is like some kind of composition of the colors, like they are blending in some way, not pure colors. I will look into it again today. |
@proudh0n sorry for non-replying to you, lacking of free time Yet thanks for your contribution, variable alphaChannel and opaque colors were on my todo list, so I'd appreciate your work a lot! I'll try to look at the code later today and help you if necessary |
Hi @alxrm I've contacted you on telegram. When you have some time please answer me. Many thanks :) |
Hi, I'm using this library for a personal project where I place the progressbar between an image and a panel, with the default alpha channel it doesn't look very fine. I suggest accepting parameters for the not filled bars color, for the filled bars color and also for the alpha channel instead of using a hardcoded alpha value.
The text was updated successfully, but these errors were encountered: