[Xr] Re: Rectangle operators

Carl Worth cworth at east.isi.edu
Wed Jun 4 12:57:06 PDT 2003


On Jun 4, Bill Spitzak wrote:
 > It does seem like adding direct support for rectangles would be very useful 
 > as they can be very fast and they are very common. I'm thinking that the 
 > following three functions be added:
 > 
 > XrFillRectangle(xrs,x,y,r,t)
 > XrClipToRectangle(xrs,x,y,r,t)
 > XrClipOutRectangle(xrs,x,y,r,t)

I don't see why new functions are needed in Xr for these if they are
simply defined in terms of combinations of existing Xr functions.

It seems that Xr should still be able to make the right cases fast
without needing specialized Fill and Clip functions. (Note that Xr
does already have a special function for adding a rectangle to a
path).

 > If Xr has some way of enumerating the current clippath or turning it into a 
 > path, it may be best to say that whether this returned path includes the 
 > results of these rectangles is undefined.

And semantic confusion such as this is an argument for not including
the functions.

-Carl

-- 
Carl Worth                                        
USC Information Sciences Institute                      cworth at isi.edu





More information about the cairo mailing list