Small Xr example

Owen Taylor <[email protected]> Sun, 1 Dec 2002 02:00:06 -0500 (EST)
Newsgroups gmane.comp.xfree86.render
Message-ID <[email protected]>
People may find the following example:
 
  http://people.redhat.com/otaylor/x/xr-knockout-example.c
  http://people.redhat.com/otaylor/x/xr-knockout-example.png

useful. It contains:

 - The Xlib boilerplate needed to get a window up on the screen,
   handle exposes, etc.
 - Expose compression code. (needed pretty badly until we get
   a bit faster code for RENDER in the server)
 - A simple oval_path routine for drawing circles.
 - An example of using operators other than Over and Saturate

The knockout in the name does not indicate that it's especially 
pretty; it just means that the example has to do with effects
similar to knockout-groups in PDF-1.4.

You can compile it with a makefile like:

===
CFLAGS=-I/opt/xf/include/ -Wall -O2
LIBS=-L/opt/xf/lib/ -lXr -lXc -lXft -lXrender -lXext -lX11 -lm

xr-knockout-example: xr-knockout-example.o
        $(CC) -o $@ $< $(LIBS)
===

Regards,
                                        Owen