[scribus-dev] Soft shadows -- Partial implementation

Leonard Rosenthol lrosenth at adobe.com
Thu Mar 15 13:36:36 UTC 2012


Why use an image instead of an actual vector line?

Leonard

-----Original Message-----
From: Benjamin Dumke-von der Ehe [mailto:scribus at benjamin-dumke.de] 
Sent: Thursday, March 15, 2012 9:16 AM
To: scribus-dev at lists.scribus.info
Subject: [scribus-dev] Soft shadows -- Partial implementation

a.l.e asked me
(http://lists.scribus.net/pipermail/scribus/2012-January/045622.html)
to upload the patch for my half-baked soft shadow implementation; I have attached it to http://bugs.scribus.net/view.php?id=3712.

It's fairly undocumented, to put it mildly -- the basic idea is the following (as mentioned elsewhere, it only works during PDF export):

For an object that's supposed to have a soft shadow, add a 1x1 pixel image of the shadow's color to the PDF (with /Interpolate false, so it's really a rectangle of the desired size), and give it an /SMask that contains a blurred version of the original object's alpha channel.

It's been a while since I wrote this, and C++ really isn't my area, but feel free to hit me with questions; I'll try to remember what I was thinking :)

Cheers
Ben

_______________________________________________
scribus-dev mailing list
scribus-dev at lists.scribus.net
http://lists.scribus.net/mailman/listinfo/scribus-dev



More information about the scribus-dev mailing list