XRenderCompositeTriangles

Carlos Eduardo Rodrigues Diógenes cerdiogenes at yahoo.com.br
Sat Jul 21 07:25:37 PDT 2007


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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg/attachments/20070721/e44a6b63/attachment.html>


More information about the xorg mailing list