XRenderCompositeTriangles

Andrew Chant andrew.chant at gmail.com
Sat Jul 21 07:44:59 PDT 2007


Ahhh it all makes much more sense now :)
Thanks very much,
-Andrew

On Saturday 21 July 2007 10:25, Carlos Eduardo Rodrigues Diógenes wrote:
> Hi Andrew,
>
> You must call XDoubleToFixed when setting the triangle coordinates, since
> XTriangle has p1, p2 and p3 that are XPointFixed, that has x and y that are
> XFixed:
>
>     triangle.p1.x = XDoubleToFixed (5);
>     triangle.p1.y = XDoubleToFixed (5);
>     triangle.p2.x = XDoubleToFixed (5);
>     triangle.p2.y = XDoubleToFixed (100);
>     triangle.p3.x = XDoubleToFixed (100);
>     triangle.p3.y = XDoubleToFixed (100);
>
> best regards,
> Carlos.
>
> 2007/7/20, Andrew Chant <andrew.chant at gmail.com>:
> > Hi,
> > I'm not sure if there's a bug in XRenderCompositeTriangles, or I am just
> > not
> > using it correctly.
> > Using the over op  and XRenderComposite, I successfully render a black
> > pixmap
> > over the right half of a white window.
> > Using the over op and XRenderCompositeTriangles, I expect a black
> > triangle to
> > be rendered over the left half of the white window, but it remains white.
> >
> > My only guess is it has something to do with the fact that the src and
> > dst are
> > RGB24 not ARGB32.  Could someone please take a quick look at my attached
> > test
> > program to see where I am wrong?  If it's not wrong then I'll file a bug
> > report I guess.
> >
> > Thanks,
> > -Andrew Chant
> >
> > _______________________________________________
> > xorg mailing list
> > xorg at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/xorg



More information about the xorg mailing list