On Wed, Nov 19, 2008 at 03:10:52PM +0000, Andrew Ross wrote:
> On Wed, Nov 19, 2008 at 03:38:37PM +0100, Werner Smekal wrote:
> > Hi all,
> > 
> > so I commited the change to the cairo driver by adding a new function
> > filled_polygon(). You can play around with the width of the stroke by
> > changing this line:
> > 
> >   cairo_set_line_width(aStream->cairoContext, 1.0);
> > 
> > A width of 1.0 is good for shade plots without transparency. Example 30
> > doesn't look that good (but not worse than before). I couldn't find a
> > good width for example 30.
> > 
> > Actually the solution to this problem should be 
> > 
> > http://www.cairographics.org/manual/cairo-context.html#cairo-push-group
> > 
> > where our case is described. Here we draw the fill and the stroke opaque
> > in the same color in an intermediate buffer and then draw this buffer
> > with a transparency into the image. Sounds nice, but has some
> > disadvantages:
> > 
> > 1) the driver gets unbearable slow
> > 2) example 30 doesn't look better because of this :)
> > 3) the pdf file size of example 30 increases from 8 to 200kB.
> > 
> > I commited the code, but commented it. In order to test it in cairo.c
> > you would need to comment line 795 and uncomment line 796. Also
> > uncomment line 798, 801, 802. So in theory this should solve our problem
> > but actually it does not. Now we need to discuss if we keep this stroke
> > around the polygons or revert to the old code.
> 
> Werner,
> 
> I've tested your fix, which works fine and solves all the problems for
> the examples I've looked at, except example 30 which suffers from the
> transparency problem. The only downside is that is seems to roughly
> double the size of the postscript files. This seems an awful lot, but is
> probably a price worth paying for better results. 

I've also committed a similar fix for the postscript driver. This makes
only a small difference to the file size, which suggests cairo is not
doing things in an optimal way. There is probably little we can do about
that though.

Andrew

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to