Re: Small Xr example
Owen Taylor <[email protected]> Sun, 1 Dec 2002 11:07:01 -0500 (EST)
| Newsgroups | gmane.comp.xfree86.render |
|---|---|
| Message-ID | <[email protected]> |
Keith Packard <[email protected]> writes: > Some people might find the following patch helpful for Owen's nice example > program. (He's apparantly using C++ compilers these days). Thanks; I've become a little sloppy with taking advantage of that gcc extension recently, since it's now only practically wrong (not many C99 compilers out there yet) rather than morally wrong. > I would like an idea if the Xr API was in any way a hinderence in this > little activity. Most of what I noticed was a subset of things in my original mail: - No convenience function for circular arcs. - No ability to use a surface for the source of fill or stroke - Couldn't control the format of group buffers, so I had to use a full RGBA buffer for the stencil buffer. - The sequence: XrPushGroup (r); draw_3circles (r, xc, yc, radius); XrSetOperator (r, XrOperatorOutReverse); XrPopGroup (r); Still doesn't seem natural to me; I think we need to find some way of moving the parameters affecting the group as a whole outside of the PopGroup(). Other things: - It turned out that I wanted to be able to do a something like XcSetSurfaceClipRegion() and then have that affect both the original buffer and all group buffers to avoid having to repaint the entire bounding box of the update region. This is probably distinct from the idea of a postscript style clip. - Probably need some surface creation convenience functionality (like the proposed XcCreateOffscreenSurface(), but maybe even easier.) Mostly it felt pretty pleasant to use; I didn't spend much time fighting the API. Regards, Owen