[Xr] Help: Render error on XrFormatRGB32

Carl Worth cworth at east.isi.edu
Fri May 2 14:15:49 PDT 2003

On May 2, Soorya Kuloor wrote:
 > I am a newbie trying to turn off anti-aliasing in Xr by trying to use
 > XrFormatRGB32 for the target suface (is this the right way to do
 > it)?

This won't quite do the trick for at least a couple of reasons:

	1) Geometric objects, (strokes and fills), are pre-composited
           using an intermediate surface which is currently hard-coded
           to use XrFormatA8.

	2) Eliminating alpha from the target surface affects more than
           antialiasing. It also prevents you from blending the
           surface with other surfaces, (eg. this is needed by the
           intermediate surfaces used in xrknockout).

So it looks like you'll need some other mechanism to get what you
want. Probably just a mechanism to control the depth of the
intermediate surface used for geometric objects.

Suggestions for an API.

 > To test this I modified xrknockout.c under xrtest module to use
 > XrFormatRGB32 for the surfaces instead of XrFormatARGB32. When I run the
 > resulting program I get the following error.

Xr was a little confused.

I've fixed this now by replacing XrFormatRGB32 with XrFormatRGB24 and
updating the depth where necessary. It seems much happier now.

Feel free to update Xr now and give XrFormatRGB24 a try in
xrknockout. You won't get what you want, but at least it shouldn't
crash anymore.


Carl Worth                                        
USC Information Sciences Institute                      cworth at isi.edu

More information about the cairo mailing list