Question about XRender specification

Helge Bahmann hcb at chaoticmind.net
Tue Apr 8 23:32:51 PDT 2008


> On Tue, 08 Apr 2008 17:21:49 -0400, Peter Harris wrote:
> > Helge Bahmann wrote:
> > >> 				XRenderCompositeTrapezoids(display,
> > >> 					PictOpOver, red_transp, picture, 0,
> > >> 					0, 0, &trap, 2);
> > >
> > > the way you are calling, they are drawn independently, this means the
> > > first trapezoid covers the pixel by 1/2, the second gets drawn over and
> > > now the pixel is covered by 3/4 and NOT 1 !
>
> No. The XRenderCompositeTrapezoids call pre-composes the trapezoids
> together into a single mask, (with ADD I believe), and the uses that
> as the mask for the Over operation being asked for here.

hm, I may be misreading the source code, but as far as I understand it only 
does that if you specify a non-NULL mask format, otherwise every primitive is 
composited with the target image individually, no?

best regards
Helge
-- 
Mathematicians stand on each other's shoulders while computer scientists stand 
on each other's toes.
-- Richard Hamming



More information about the xorg mailing list