Is there an "easy" option to do a linear gradient fill that includes an
alpha component of the colors?  Basically, I want to draw one shape with a
gradient fill over a different shape with a different color gradient fill
and use an alpha < 1 so that you can see the back shape through the front
one.

It looks like the standard option uses the DeviceRGB color space which I
understand doesn't have an alpha.  I see, for instance, this:
https://stackoverflow.com/questions/40697135/creating-a-gradient-in-background-with-pdfbox

I was hoping there was an option to just use a different color space that
includes an alpha or something like that.  Is there any option that's just
a minor variation on the sample code in the StackOverflow answer above?

I see this writeup on a substantially more complex approach for the PDF
structure (the second section there on "Linear gradients with
transparency"):
https://github.com/danfickle/neoflyingsaucer/blob/using-pdfbox/pdf-internals-tutorials/linear-gradients.md

I also see people complaining that some PDF viewers don't handle
transparency well, and I'm not sure whether that's out of date or a problem
I might run into even if I got this working.

Thanks,
       Aaron

Reply via email to