Alpha channel in linear and radial gradients
MauriceMeilleur last edited by gferreira
I've been using DrawBot to generate diagrams—specifically, Boolean diagrams of categories with fuzzy boundaries—and I would love to see both linear and radial gradients incorporate an alpha channel.
continue here: https://github.com/typemytype/drawbot/issues/355
what does work:
im = ImageObject() im.linearGradient((300, 300), (50, 0), (300, 0), color0=(1, 0, 0, 1), color1=(0, 1, 0, .3)) fontSize(100) text("Hello World", (0, 30)) image(im, (0, 0))
This creates a image with a gradient with opacity. But it will be a lot slower...
MauriceMeilleur last edited by
@frederik Thanks (and thanks for opening this over in the GitHub repo). I'll give it a try later today. Speed isn't a factor in this case because I'm generating static diagrams.