[poppler] [PATCH] Improve linear gradients in cairo backend

Carlos Garcia Campos carlosgc at gnome.org
Mon Jul 27 06:12:56 PDT 2009


El dom, 26-07-2009 a las 20:17 +0200, Albert Astals Cid escribió:
> A Dissabte, 25 de juliol de 2009, Carlos Garcia Campos va escriure:
> > Hi all,
> >
> > when drawing gradients with cairo, we don't need to fill a path for
> > every region, we can just fill the bounding box with the gradient
> > pattern, but this only works when shading->getExtend0() ==
> > shading->getExtend1(), since we can use CAIRO_EXTEND_NONE when they are
> > FALSE and CAIRO_EXTEND_PAD when they are TRUE. When they are different,
> > we could just use the current approach, adding a path for every region.
> > This is exactly what the attached patch does.
> 
> shading->getExtend0() == shading->getExtend1() in Gfx.cc code seems like 
> exposing a Cairo bug/feature to the rest of the world and doesn't seem a good 
> idea imho.

yes, indeed, the whole useFillSolorStop() thing is a little bit tricky
to avoid duplicate code. 

> What about a making useFillColorStop have shading as input parameter and 
> needFill as output parameter?

or it might be an output parameter of axialShadedFill() since it doesn't
depend on every useFillColorStop() call, and shading is already a
parameter of axialShadedFill(). It still looks weird to me, though. 

> Albert
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler


-- 
Carlos Garcia Campos
PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada
 digitalmente
Url : http://lists.freedesktop.org/archives/poppler/attachments/20090727/3f9fd6e8/attachment.pgp 


More information about the poppler mailing list