[Xr] Re: XrGetCurrentPoint() ?

Carl Worth cworth at east.isi.edu
Thu May 1 08:36:59 PDT 2003

On Apr 30, Soorya Kuloor wrote:
 > Is it possible to add a function to Xr to get current point?

Good idea.

As it turns out, I was looking at the PostScript graphics operators
yesterday to see what functionality they provide that Xr does not. The
query operators were one missing piece that I just coded up yesterday.

I've committed these now. I'll include the new section of the header
file for any comments.

I haven't added query functions for color/alpha yet as I'll probably
switch that interface over to an XrColor object first.

Also, it wasn't obvious how to deal with the memory management issues
for XrGetDash, so that function doesn't exist yet either.

As always, feedback and suggestions are welcome.


PS. Here's the relevant new section from Xr.h:

XrGetOperator(XrState *xrs);

XrGetTolerance(XrState *xrs);

XrGetCurrentPoint(XrState *, double *x, double *y);

XrGetFillRule(XrState *xrs);

XrGetLineWidth(XrState *xrs);

XrGetLineCap(XrState *xrs);

XrGetLineJoin(XrState *xrs);

XrGetMiterLimit(XrState *xrs);

/* XXX: How to do XrGetDash??? Do we want to switch to an XrDash object? */

XrGetMatrix(XrState *xrs,
            double *a, double *b,
            double *c, double *d,
            double *tx, double *ty);

Carl Worth                                        
USC Information Sciences Institute                      cworth at isi.edu

More information about the cairo mailing list