Re: Semi-transparent gradient
Lele Gaifax <[email protected]> Mon, 04 Apr 2022 19:57:37 +0200
| Newsgroups | gmane.comp.python.reportlab.user |
|---|---|
| Organization | Nautilus Entertainments |
| Message-ID | <[email protected]> |
Hi Robin, Robin Becker <[email protected]> writes: > I think your logic would be correct, but I believe that the linearGradient > functionality is ignoring the alpha as you suspect. > > I think the problem is in the color definitions we are using that are > derived from the input colours. I think that is done in > canvas._normalizeColor which seems only to care about the rgb values. > > I seem to recall tha pdf transparency is supposed to apply to objects rather > than colours. If I understand correctly, I then get that it's not possible to have a gradient that works on the alpha level. Not a great problem, I will try using a semi-transparent image over the real one. > I can certainly change the whole gradient using eg > > c._setFillAlpha(0.7) > > prior to calling c.linerGradient. I tried that, and it somewhat work, but is not appropriate for my case, because I'd like to blur only a part of the image. Anyway, will try to find an alternative, although less elegant, approach. Thanks a lot, bye, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. [email protected] | -- Fortunato Depero, 1929. _______________________________________________ reportlab-users mailing list [email protected] https://pairlist2.pair.net/mailman/listinfo/reportlab-users