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

Albert Astals Cid aacid at kde.org
Sun Jul 26 11:17:49 PDT 2009

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.

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


More information about the poppler mailing list