[cairo] shadow of transparent png image
Robert O'Callahan
robert at ocallahan.org
Sat Dec 27 11:49:59 PST 2008
On Sun, Dec 28, 2008 at 8:07 AM, Dusan Halicky <dusan.halicky at gmail.com>wrote:
> I have transparent png image. Can I somwhow in cairo draw it's shadow?
> I mean not rectangular shadow of picture, but shadow of it's contents.
> I was thinking about another surface - copy of original - but darken
> to black color and displayed behind original surface. However I don't
> know how to make this "darken" effect in cairo. Thanks.
>
Set the image surface as the mask in your cairo context, then paint black.
Rob
--
"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
53:5-6]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20081228/cd088259/attachment.htm
More information about the cairo
mailing list