diagrams / diagrams-lib

Diagrams standard library
https://diagrams.github.io/
Other
138 stars 62 forks source link

Support for soft masks #362

Open amigalemming opened 1 year ago

amigalemming commented 1 year ago

Please also support blending with soft masks.

byorgey commented 1 year ago

Hi @amigalemming , thanks for the idea. Do you happen to know which backends support this? (For example, do Cairo or SVG support blending with soft masks? Or do you happen to know if https://hackage.haskell.org/package/Rasterific supports it?) Ultimately the kinds of features diagrams offers are somewhat constrained by what features are available in backends.

amigalemming commented 1 year ago

On Mon, 11 Sep 2023, Brent Yorgey wrote:

Hi @amigalemming , thanks for the idea. Do you happen to know which backends support this? (For example, do Cairo or SVG support blending with soft masks? Or do you happen to know if https://hackage.haskell.org/package/Rasterific supports it?) Ultimately the kinds of features diagrams offers are somewhat constrained by what features are available in backends.

PostScript does not support transparency.

Cairo supports it. See the Mask example at: https://www.cairographics.org/tutorial/

SVG should support it, since Inkscape supports it and it uses SVG.

PDF supports it since version 1.4. https://github.com/thielema/hpdf/tree/expression