[poppler] Implement Type 4, 5, 6, 7 shadings using cairo mesh gradients
Carlos Garcia Campos
carlosgc at gnome.org
Tue Jan 25 06:29:58 PST 2011
Excerpts from Thomas Freitag's message of mar ene 25 09:27:24 +0100 2011:
> Am 25.01.2011 09:15, schrieb Carlos Garcia Campos:
> > Excerpts from Albert Astals Cid's message of lun ene 24 19:53:50 +0100 2011:
> >> A Dilluns, 24 de gener de 2011, Thomas Freitag va escriure:
> >>> Am 24.01.2011 14:17, schrieb Carlos Garcia Campos:
> >>>> Cairo 1.11.2 has a new mesh pattern that can be used to implement 6/7
> >>>> type gradients. Adrian has an updated poppler branch that implements
> >>>> mesh gradients in cairo backend:
> >>>>
> >>>> http://cgit.freedesktop.org/~ajohnson/poppler/log/?h=mesh
> >>>>
> >>>> I've tried it and it works great, it fixes bugs #28836 and #32791 (and
> >>>> maybe others). I haven't pushed the patch yet becuase it contains
> >>>> minimal changes in Gfx.cc. If nobody objects I'll push it to master
> >>>> branch only.
> >>> I had a quick look at what Adrian has done in Gfc.cc, and think, that is
> >>> a little bit misusing of out->gouraudTriangleShadedFill( state, shading)
> >>> and out->patchMeshShadedFill( state, shading):
> >>>
> >>> When these functions returns gTrue, this indicates that all work has
> >>> already be done in the output device. How Adrian implements it is very
> >>> special to Cairo. But it is quite ease to change it:
> >>> Just move the lines
> >> Agreed with Thomas.
> > contentIsHidden() is private to Gfx, and all other patterns do the
> > clip and fill in Gfx
> Yeah, unfortunately contentIsHidden is private to Gfx, so probably there
> should be a return if contentIsHidden() before calling the shading
> routines in the output devices.
I'm not sure it's correct, the spec says:
When a piece of optional content in a PDF file is determined that it
shall be hidden, the following occurs:
- The content shall not be drawn.
- Graphics state operations, such as setting the colour,
transformation matrix, and clipping, shall still be applied.
I think that's why we check whether content is hidden right before
filling.
> But You're not true, that clip and fill
> is done in Gfx, this is special to cairo which is the only device that
> supports useFillColorStop() and can therefore use the clip and fill from
> Gfx. At least in SplashOutputDev the done work (implemented by Christian
> Feuersänger) in gouraudTriangleShadedFill would be overwritten and
> probably causes wrong results.
>
> Thomas
> >> 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: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20110125/68974452/attachment-0001.pgp>
More information about the poppler
mailing list