How to set a bidirectional color gradient
I'm trying to draw a rectangle with a color gradient. In addition, I need that some sections of the rectangle have different heights. To achieve this what I want to do is something like this:
and, for example, if i want that the rectangle has 0.5 of height between 0 and 0.3 what I would try to do is define Color1 and Color2 as vertical color gradients where only changes alpha.
Could it be possible to do something like this ??
Thank's for your time!
Yes I think its possible.
You could use the built in editor to experiment.
It's a good approach, but as the vertical gradient was intended to modify the width of the rectangle it hasn't fitted.
So, what i finally made is create a function which creates little pixmaps from desired height and color gradients and, just after this I paint them into a bigger pixmap