Re: cairo-1.13 finally opens

Bill Spitzak <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On 09/07/2013 06:43 AM, Krzysztof Kosiński wrote:

> Inset shadow means that the shadow is inside the shape, e.g. it has to
> be clipped to the original shape. For normal shadow, there is no need
> to clip:

What I meant was that inset shadow also needs the blurry part of the 
mask inverted. If you ignore the clip, a normal shadow will color in the 
center of a large object, getting less and less opaque toward the edges, 
while the inset shadow will not color the center in and get more opaque 
toward the edges. You are right that the mask is not inverted to set the 
clip and is not needed for the normal shadow.

> 1. Currently there seems to be no way to modify the path on the
> context, for example to add an offset, so for offset shadows the path
> would have to be processed twice.

Along with the new set_blur method, there would need to be a set_offset, 
plus a set_spread for the CSS effect. Note that this set_blur is *not* 
the blur assigned to the source pattern.

> 2. Optimizing the rendering of a drop shadow under a large opaque
> object might be more difficult. On the other hand, I'm not sure there
> is a lot to gain in this case.

The caller could clip out the area they know will be opaque before 
drawing the shadow. They have to be careful to not clip out antialiased 
edges however.

-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.