Re: Xrender related question
Alexei Babich wrote: Hello, all. Having executed a piece of code listed below, I get a green window (as a result of calling XCreateSimpleWindow()) and a black rectangle on top of it (XRenderFillRectangle()). I still get just black, whatever color I set in the 'col' structure. XRenderFindVisualFormat() points to the data field shown on the screenshot attached to this letter. Why doesn't the color of the rectangle depend on the 'col' parameters? //some color col.red = 0; col.green = 127; col.blue = 250; col.alpha = 250; XRender uses 16-bit colors. If you multiply these numbers by 257 you should be fine. I would use 0x for the alpha value, though, if the intention is to make the rectangle fully opaque. Also, unless there is a specific reason to use XRender directly, I would recommend using the higher-level cairo library instead. ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: Xrender related question
XRender uses 16-bit colors. Oh, I read the documentation inattentively. Silly mistake. Thank you. Also, unless there is a specific reason to use XRender directly, I would recommend using the higher-level cairo library instead. Thank you. I believe the use of XRender more appropriate for my purposes than the use cairo. -- Regards, Alexei Babich, circuit engineer, OOO NPP Rezonans, Chelyabinsk, Russia http://www.rez.ru Jabber ID: imp...@jabber.ru ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg