[poppler] Implement Type 4, 5, 6, 7 shadings using cairo mesh gradients

Thomas Freitag Thomas.Freitag at kabelmail.de
Tue Jan 25 00:27:24 PST 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. 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20110125/9a5084d3/attachment.htm>


More information about the poppler mailing list