El lun, 27-07-2009 a las 20:00 +0200, Albert Astals Cid escribió:
> A Dilluns, 27 de juliol de 2009, Carlos Garcia Campos va escriure:
> > 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.
>
> Another variant, switch axialShadedFill from returning GBool to return
>
> enum axialShadedFillResult
> {
> AxialShadingDone,
> AxialShadingNotDoneNeedsFill,
> AxialShadingNotDoneDoesNotNeedFill
> }
>
> What do you think?what about adding a new method to OutputDev like: GBool axialShadedSupportExtend(GfxAxialShading *shading); and of course GBool radialShadedSupportExetend(GfxRadialShading *shading); > Albert > > > > > > Albert > > > _______________________________________________ > > > poppler mailing list > > > [email protected] > > > http://lists.freedesktop.org/mailman/listinfo/poppler > > _______________________________________________ > poppler mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/poppler -- Carlos Garcia Campos PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462
signature.asc
Description: Esta parte del mensaje está firmada digitalmente
_______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
