2002-06-11 04:02:23 +00:00
|
|
|
|
/*
|
|
|
|
|
|
* $XFree86: $
|
|
|
|
|
|
*
|
2002-08-14 00:39:43 +00:00
|
|
|
|
* Copyright <EFBFBD> 2002 Carl D. Worth
|
2002-06-11 04:02:23 +00:00
|
|
|
|
*
|
|
|
|
|
|
* Permission to use, copy, modify, distribute, and sell this software
|
|
|
|
|
|
* and its documentation for any purpose is hereby granted without
|
|
|
|
|
|
* fee, provided that the above copyright notice appear in all copies
|
|
|
|
|
|
* and that both that copyright notice and this permission notice
|
2002-08-14 00:39:43 +00:00
|
|
|
|
* appear in supporting documentation, and that the name of Carl
|
|
|
|
|
|
* D. Worth not be used in advertising or publicity pertaining to
|
|
|
|
|
|
* distribution of the software without specific, written prior
|
|
|
|
|
|
* permission. Carl D. Worth makes no representations about the
|
|
|
|
|
|
* suitability of this software for any purpose. It is provided "as
|
|
|
|
|
|
* is" without express or implied warranty.
|
2002-06-11 04:02:23 +00:00
|
|
|
|
*
|
2002-08-14 00:39:43 +00:00
|
|
|
|
* CARL D. WORTH DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
|
|
|
|
|
|
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
|
|
|
|
* FITNESS, IN NO EVENT SHALL CARL D. WORTH BE LIABLE FOR ANY SPECIAL,
|
|
|
|
|
|
* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
|
|
|
|
|
|
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
|
|
|
|
|
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
|
|
|
|
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
|
|
*/
|
2002-06-11 04:02:23 +00:00
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
* These definitions are solely for use by the implementation of Xr
|
|
|
|
|
|
* and constitute no kind of standard. If you need any of these
|
|
|
|
|
|
* functions, please drop me a note. Either the library needs new
|
|
|
|
|
|
* functionality, or there's a way to do what you need using the
|
|
|
|
|
|
* existing published interfaces. cworth@isi.edu
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _XRINT_H_
|
|
|
|
|
|
#define _XRINT_H_
|
|
|
|
|
|
|
2002-08-14 00:39:43 +00:00
|
|
|
|
#include <math.h>
|
2002-07-23 07:22:23 +00:00
|
|
|
|
#include <X11/Xlibint.h>
|
2002-06-11 04:02:23 +00:00
|
|
|
|
#include "Xr.h"
|
|
|
|
|
|
|
2002-08-14 00:39:43 +00:00
|
|
|
|
#ifndef __GCC__
|
|
|
|
|
|
#define __attribute__(x)
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
2002-08-15 05:22:59 +00:00
|
|
|
|
typedef enum _XrError {
|
|
|
|
|
|
XrErrorSuccess = 0,
|
2002-09-10 09:51:14 +00:00
|
|
|
|
XrErrorNoMemory,
|
|
|
|
|
|
XrErrorDegenerate
|
2002-08-15 05:22:59 +00:00
|
|
|
|
} XrError;
|
|
|
|
|
|
|
2002-08-14 00:39:43 +00:00
|
|
|
|
typedef enum _XrPathOp {
|
2002-08-15 17:29:26 +00:00
|
|
|
|
XrPathOpMoveTo = 0,
|
|
|
|
|
|
XrPathOpLineTo = 1,
|
|
|
|
|
|
XrPathOpCurveTo = 2,
|
|
|
|
|
|
XrPathOpRelMoveTo = 3,
|
|
|
|
|
|
XrPathOpRelLineTo = 4,
|
|
|
|
|
|
XrPathOpRelCurveTo = 5,
|
|
|
|
|
|
XrPathOpClosePath = 6
|
2002-08-14 00:39:43 +00:00
|
|
|
|
} __attribute__ ((packed)) XrPathOp; /* Don't want 32 bits if we can avoid it. */
|
|
|
|
|
|
|
|
|
|
|
|
typedef enum _XrPathDirection {
|
|
|
|
|
|
XrPathDirectionForward,
|
|
|
|
|
|
XrPathDirectionReverse
|
|
|
|
|
|
} XrPathDirection;
|
|
|
|
|
|
|
2002-08-14 18:32:42 +00:00
|
|
|
|
typedef enum _XrSubPathDone {
|
|
|
|
|
|
XrSubPathDoneCap,
|
|
|
|
|
|
XrSubPathDoneJoin
|
|
|
|
|
|
} XrSubPathDone;
|
|
|
|
|
|
|
2002-08-14 00:39:43 +00:00
|
|
|
|
typedef struct _XrPathCallbacks {
|
2002-08-15 05:22:59 +00:00
|
|
|
|
XrError (*AddEdge)(void *closure, XPointFixed *p1, XPointFixed *p2);
|
2002-08-15 17:29:26 +00:00
|
|
|
|
XrError (*AddSpline)(void *closure, XPointFixed *a, XPointFixed *b, XPointFixed *c, XPointFixed *d);
|
2002-08-15 05:22:59 +00:00
|
|
|
|
XrError (*DoneSubPath) (void *closure, XrSubPathDone done);
|
2002-08-15 17:29:26 +00:00
|
|
|
|
XrError (*DonePath) (void *closure);
|
2002-08-14 00:39:43 +00:00
|
|
|
|
} XrPathCallbacks;
|
|
|
|
|
|
|
|
|
|
|
|
#define XR_PATH_BUF_SZ 64
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _XrPathOpBuf {
|
|
|
|
|
|
int num_ops;
|
|
|
|
|
|
XrPathOp op[XR_PATH_BUF_SZ];
|
|
|
|
|
|
|
|
|
|
|
|
struct _XrPathOpBuf *next, *prev;
|
|
|
|
|
|
} XrPathOpBuf;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _XrPathArgBuf {
|
2002-06-11 04:02:23 +00:00
|
|
|
|
int num_pts;
|
2002-08-14 00:39:43 +00:00
|
|
|
|
XPointFixed pt[XR_PATH_BUF_SZ];
|
2002-06-11 04:02:23 +00:00
|
|
|
|
|
2002-08-14 00:39:43 +00:00
|
|
|
|
struct _XrPathArgBuf *next, *prev;
|
|
|
|
|
|
} XrPathArgBuf;
|
2002-06-11 04:02:23 +00:00
|
|
|
|
|
|
|
|
|
|
typedef struct _XrPath {
|
2002-08-14 00:39:43 +00:00
|
|
|
|
XrPathOpBuf *op_head;
|
|
|
|
|
|
XrPathOpBuf *op_tail;
|
|
|
|
|
|
|
|
|
|
|
|
XrPathArgBuf *arg_head;
|
|
|
|
|
|
XrPathArgBuf *arg_tail;
|
2002-06-11 04:02:23 +00:00
|
|
|
|
} XrPath;
|
|
|
|
|
|
|
2002-08-14 00:39:43 +00:00
|
|
|
|
typedef struct _XrEdge {
|
|
|
|
|
|
/* Externally initialized */
|
|
|
|
|
|
XLineFixed edge;
|
|
|
|
|
|
Bool clockWise;
|
|
|
|
|
|
|
|
|
|
|
|
/* Internal use by XrTrapsTessellateEdges */
|
|
|
|
|
|
XFixed current_x;
|
|
|
|
|
|
XFixed next_x;
|
|
|
|
|
|
struct _XrEdge *next, *prev;
|
|
|
|
|
|
} XrEdge;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _XrPolygon {
|
|
|
|
|
|
int num_edges;
|
|
|
|
|
|
int edges_size;
|
|
|
|
|
|
XrEdge *edges;
|
2002-09-03 08:42:25 +00:00
|
|
|
|
|
|
|
|
|
|
XPointFixed first_pt;
|
|
|
|
|
|
int first_pt_defined;
|
|
|
|
|
|
XPointFixed last_pt;
|
|
|
|
|
|
int last_pt_defined;
|
|
|
|
|
|
|
|
|
|
|
|
int closed;
|
2002-08-14 00:39:43 +00:00
|
|
|
|
} XrPolygon;
|
|
|
|
|
|
|
2002-09-10 08:01:00 +00:00
|
|
|
|
typedef struct _XrSlopeFixed
|
|
|
|
|
|
{
|
|
|
|
|
|
XFixed dx;
|
|
|
|
|
|
XFixed dy;
|
|
|
|
|
|
} XrSlopeFixed;
|
|
|
|
|
|
|
2002-08-15 17:29:26 +00:00
|
|
|
|
typedef struct _XrSpline {
|
|
|
|
|
|
XPointFixed a, b, c, d;
|
2002-09-03 08:42:25 +00:00
|
|
|
|
|
2002-09-10 08:01:00 +00:00
|
|
|
|
XrSlopeFixed initial_slope;
|
|
|
|
|
|
XrSlopeFixed final_slope;
|
|
|
|
|
|
|
2002-08-15 17:29:26 +00:00
|
|
|
|
int num_pts;
|
2002-09-03 08:42:25 +00:00
|
|
|
|
int pts_size;
|
|
|
|
|
|
XPointFixed *pts;
|
2002-08-15 17:29:26 +00:00
|
|
|
|
} XrSpline;
|
|
|
|
|
|
|
2002-09-03 08:42:25 +00:00
|
|
|
|
typedef enum _XrPenVertexTag {
|
|
|
|
|
|
XrPenVertexTagNone,
|
|
|
|
|
|
XrPenVertexTagForward,
|
|
|
|
|
|
XrPenVertexTagReverse
|
|
|
|
|
|
} XrPenVertexTag;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _XrPenTaggedPoint {
|
|
|
|
|
|
XPointFixed pt;
|
|
|
|
|
|
XrPenVertexTag tag;
|
|
|
|
|
|
} XrPenTaggedPoint;
|
2002-08-15 17:29:26 +00:00
|
|
|
|
|
|
|
|
|
|
typedef struct _XrPenVertex {
|
|
|
|
|
|
XPointFixed pt;
|
2002-09-03 08:42:25 +00:00
|
|
|
|
XrPenVertexTag tag;
|
|
|
|
|
|
|
2002-08-15 17:29:26 +00:00
|
|
|
|
double theta;
|
2002-09-03 08:42:25 +00:00
|
|
|
|
XrSlopeFixed slope_ccw;
|
|
|
|
|
|
XrSlopeFixed slope_cw;
|
2002-08-15 17:29:26 +00:00
|
|
|
|
} XrPenVertex;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _XrPen {
|
2002-09-03 08:42:25 +00:00
|
|
|
|
double radius;
|
|
|
|
|
|
double tolerance;
|
|
|
|
|
|
|
2002-08-15 17:29:26 +00:00
|
|
|
|
int num_vertices;
|
|
|
|
|
|
XrPenVertex *vertex;
|
|
|
|
|
|
} XrPen;
|
|
|
|
|
|
|
2002-07-23 07:22:23 +00:00
|
|
|
|
typedef struct _XrSurface {
|
2002-06-11 04:02:23 +00:00
|
|
|
|
Display *dpy;
|
|
|
|
|
|
|
|
|
|
|
|
Drawable drawable;
|
|
|
|
|
|
|
|
|
|
|
|
unsigned int depth;
|
|
|
|
|
|
|
2002-07-23 07:22:23 +00:00
|
|
|
|
unsigned long sa_mask;
|
|
|
|
|
|
XcSurfaceAttributes sa;
|
|
|
|
|
|
XcFormat *xcformat;
|
2002-06-11 04:02:23 +00:00
|
|
|
|
|
2002-07-23 07:22:23 +00:00
|
|
|
|
XcSurface *xcsurface;
|
|
|
|
|
|
XcSurface *alpha;
|
|
|
|
|
|
} XrSurface;
|
2002-06-11 04:02:23 +00:00
|
|
|
|
|
|
|
|
|
|
typedef struct _XrColor {
|
|
|
|
|
|
double red;
|
|
|
|
|
|
double green;
|
|
|
|
|
|
double blue;
|
|
|
|
|
|
double alpha;
|
|
|
|
|
|
|
2002-07-23 07:22:23 +00:00
|
|
|
|
XcColor xccolor;
|
2002-06-11 04:02:23 +00:00
|
|
|
|
} XrColor;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _XrTransform {
|
2002-06-14 15:13:44 +00:00
|
|
|
|
double m[3][2];
|
2002-06-11 04:02:23 +00:00
|
|
|
|
} XrTransform;
|
|
|
|
|
|
|
2002-07-23 07:22:23 +00:00
|
|
|
|
typedef struct _XrTraps {
|
|
|
|
|
|
int num_xtraps;
|
|
|
|
|
|
int xtraps_size;
|
|
|
|
|
|
XTrapezoid *xtraps;
|
|
|
|
|
|
} XrTraps;
|
|
|
|
|
|
|
|
|
|
|
|
#define XR_GSTATE_OPERATOR_DEFAULT XrOperatorOver
|
2002-08-15 17:29:26 +00:00
|
|
|
|
#define XR_GSTATE_TOLERANCE_DEFAULT 0.1
|
2002-06-11 04:02:23 +00:00
|
|
|
|
#define XR_GSTATE_WINDING_DEFAULT 1
|
2002-08-14 00:39:43 +00:00
|
|
|
|
#define XR_GSTATE_LINE_WIDTH_DEFAULT 2.0
|
2002-07-23 07:22:23 +00:00
|
|
|
|
#define XR_GSTATE_LINE_CAP_DEFAULT XrLineCapButt
|
|
|
|
|
|
#define XR_GSTATE_LINE_JOIN_DEFAULT XrLineJoinMiter
|
|
|
|
|
|
#define XR_GSTATE_MITER_LIMIT_DEFAULT 10.0
|
2002-06-11 04:02:23 +00:00
|
|
|
|
|
2002-08-15 17:19:28 +00:00
|
|
|
|
typedef struct _XrGState {
|
|
|
|
|
|
Display *dpy;
|
|
|
|
|
|
|
2002-08-15 17:29:26 +00:00
|
|
|
|
double tolerance;
|
|
|
|
|
|
|
2002-08-15 17:19:28 +00:00
|
|
|
|
/* stroke style */
|
2002-06-11 04:02:23 +00:00
|
|
|
|
double line_width;
|
2002-08-15 17:19:28 +00:00
|
|
|
|
XrLineCap line_cap;
|
2002-07-23 07:22:23 +00:00
|
|
|
|
XrLineJoin line_join;
|
2002-08-15 17:19:28 +00:00
|
|
|
|
double *dashes;
|
|
|
|
|
|
int ndashes;
|
|
|
|
|
|
double dash_offset;
|
2002-07-23 07:22:23 +00:00
|
|
|
|
double miter_limit;
|
2002-08-14 17:32:22 +00:00
|
|
|
|
|
2002-08-15 17:19:28 +00:00
|
|
|
|
/* fill style */
|
2002-08-14 17:32:22 +00:00
|
|
|
|
int winding;
|
|
|
|
|
|
|
|
|
|
|
|
XrOperator operator;
|
|
|
|
|
|
|
2002-07-23 07:22:23 +00:00
|
|
|
|
XcFormat *solidFormat;
|
|
|
|
|
|
XcFormat *alphaFormat;
|
2002-06-11 04:02:23 +00:00
|
|
|
|
|
|
|
|
|
|
XrColor color;
|
2002-07-23 07:22:23 +00:00
|
|
|
|
XrSurface src;
|
|
|
|
|
|
XrSurface surface;
|
2002-06-14 15:13:44 +00:00
|
|
|
|
|
|
|
|
|
|
XrTransform ctm;
|
|
|
|
|
|
XrTransform ctm_inverse;
|
2002-06-11 04:02:23 +00:00
|
|
|
|
|
|
|
|
|
|
XrPath path;
|
|
|
|
|
|
|
2002-08-15 17:29:26 +00:00
|
|
|
|
XrPen pen_regular;
|
|
|
|
|
|
|
2002-06-11 04:02:23 +00:00
|
|
|
|
struct _XrGState *next;
|
|
|
|
|
|
} XrGState;
|
|
|
|
|
|
|
|
|
|
|
|
struct _XrState {
|
|
|
|
|
|
Display *dpy;
|
|
|
|
|
|
XrGState *stack;
|
2002-08-15 05:22:59 +00:00
|
|
|
|
XrError error;
|
2002-06-11 04:02:23 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
2002-08-14 18:32:42 +00:00
|
|
|
|
typedef struct _XrStrokeFace {
|
|
|
|
|
|
XPointFixed ccw;
|
|
|
|
|
|
XPointFixed pt;
|
|
|
|
|
|
XPointFixed cw;
|
2002-08-15 03:50:28 +00:00
|
|
|
|
XPointDouble vector;
|
2002-08-14 18:32:42 +00:00
|
|
|
|
} XrStrokeFace;
|
|
|
|
|
|
|
2002-08-14 00:39:43 +00:00
|
|
|
|
typedef struct _XrStroker {
|
|
|
|
|
|
XrGState *gstate;
|
|
|
|
|
|
XrTraps *traps;
|
2002-09-03 08:42:25 +00:00
|
|
|
|
|
2002-08-14 18:32:42 +00:00
|
|
|
|
int have_prev;
|
2002-08-18 22:55:58 +00:00
|
|
|
|
int have_first;
|
|
|
|
|
|
int is_first;
|
2002-08-14 18:32:42 +00:00
|
|
|
|
XrStrokeFace prev;
|
|
|
|
|
|
XrStrokeFace first;
|
2002-08-18 22:55:58 +00:00
|
|
|
|
int dash_index;
|
|
|
|
|
|
int dash_on;
|
|
|
|
|
|
double dash_remain;
|
2002-08-14 00:39:43 +00:00
|
|
|
|
} XrStroker;
|
|
|
|
|
|
|
2002-08-15 17:29:26 +00:00
|
|
|
|
typedef struct _XrFiller {
|
|
|
|
|
|
XrGState *gstate;
|
|
|
|
|
|
XrTraps *traps;
|
|
|
|
|
|
|
|
|
|
|
|
XrPolygon polygon;
|
2002-09-03 08:42:25 +00:00
|
|
|
|
|
|
|
|
|
|
int have_prev;
|
|
|
|
|
|
XPointFixed prev;
|
|
|
|
|
|
XPointFixed first;
|
2002-08-15 17:29:26 +00:00
|
|
|
|
} XrFiller;
|
|
|
|
|
|
|
2002-06-11 04:02:23 +00:00
|
|
|
|
/* xrstate.c */
|
|
|
|
|
|
|
|
|
|
|
|
#define CURRENT_GSTATE(xrs) (xrs->stack)
|
|
|
|
|
|
|
|
|
|
|
|
XrState *
|
|
|
|
|
|
XrStateCreate(Display *dpy);
|
|
|
|
|
|
|
2002-08-15 05:22:59 +00:00
|
|
|
|
XrError
|
2002-06-11 04:02:23 +00:00
|
|
|
|
XrStateInit(XrState *state, Display *dpy);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrStateDeinit(XrState *xrs);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrStateDestroy(XrState *state);
|
|
|
|
|
|
|
2002-08-15 05:22:59 +00:00
|
|
|
|
XrError
|
2002-06-11 04:02:23 +00:00
|
|
|
|
XrStatePush(XrState *xrs);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrStatePop(XrState *xrs);
|
|
|
|
|
|
|
|
|
|
|
|
/* xrgstate.c */
|
|
|
|
|
|
XrGState *
|
|
|
|
|
|
XrGStateCreate(Display *dpy);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrGStateInit(XrGState *gstate, Display *dpy);
|
|
|
|
|
|
|
2002-08-15 05:22:59 +00:00
|
|
|
|
XrError
|
2002-06-11 04:02:23 +00:00
|
|
|
|
XrGStateInitCopy(XrGState *gstate, XrGState *other);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrGStateDeinit(XrGState *gstate);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrGStateDestroy(XrGState *gstate);
|
|
|
|
|
|
|
2002-08-14 00:39:43 +00:00
|
|
|
|
XrGState *
|
|
|
|
|
|
XrGStateClone(XrGState *gstate);
|
2002-06-11 04:02:23 +00:00
|
|
|
|
|
|
|
|
|
|
void
|
2002-06-14 15:13:44 +00:00
|
|
|
|
XrGStateSetDrawable(XrGState *gstate, Drawable drawable);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrGStateSetVisual(XrGState *gstate, Visual *visual);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrGStateSetFormat(XrGState *gstate, XrFormat format);
|
2002-06-11 04:02:23 +00:00
|
|
|
|
|
|
|
|
|
|
void
|
2002-07-23 07:22:23 +00:00
|
|
|
|
XrGStateSetOperator(XrGState *gstate, XrOperator operator);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrGStateSetRGBColor(XrGState *gstate, double red, double green, double blue);
|
2002-06-11 04:02:23 +00:00
|
|
|
|
|
2002-09-03 08:42:25 +00:00
|
|
|
|
void
|
|
|
|
|
|
XrGStateSetTolerance(XrGState *gstate, double tolerance);
|
|
|
|
|
|
|
2002-06-11 04:02:23 +00:00
|
|
|
|
void
|
|
|
|
|
|
XrGStateSetAlpha(XrGState *gstate, double alpha);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrGStateSetLineWidth(XrGState *gstate, double width);
|
|
|
|
|
|
|
2002-07-23 07:22:23 +00:00
|
|
|
|
void
|
|
|
|
|
|
XrGStateSetLineCap(XrGState *gstate, XrLineCap line_cap);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrGStateSetLineJoin(XrGState *gstate, XrLineJoin line_join);
|
|
|
|
|
|
|
2002-08-15 17:19:28 +00:00
|
|
|
|
XrError
|
|
|
|
|
|
XrGStateSetDash(XrGState *gstate, double *dashes, int ndash, double offset);
|
|
|
|
|
|
|
2002-07-23 07:22:23 +00:00
|
|
|
|
void
|
|
|
|
|
|
XrGStateSetMiterLimit(XrGState *gstate, double limit);
|
|
|
|
|
|
|
2002-06-11 04:02:23 +00:00
|
|
|
|
void
|
|
|
|
|
|
XrGStateTranslate(XrGState *gstate, double tx, double ty);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrGStateScale(XrGState *gstate, double sx, double sy);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrGStateRotate(XrGState *gstate, double angle);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrGStateNewPath(XrGState *gstate);
|
|
|
|
|
|
|
2002-08-15 05:22:59 +00:00
|
|
|
|
XrError
|
|
|
|
|
|
XrGStateAddPathOp(XrGState *gstate, XrPathOp op, XPointDouble *pt, int num_pts);
|
|
|
|
|
|
|
|
|
|
|
|
XrError
|
2002-08-14 00:39:43 +00:00
|
|
|
|
XrGStateAddUnaryPathOp(XrGState *gstate, XrPathOp op, double x, double y);
|
2002-06-11 04:02:23 +00:00
|
|
|
|
|
2002-08-15 05:22:59 +00:00
|
|
|
|
XrError
|
2002-06-11 04:02:23 +00:00
|
|
|
|
XrGStateClosePath(XrGState *gstate);
|
|
|
|
|
|
|
2002-08-15 05:22:59 +00:00
|
|
|
|
XrError
|
2002-06-11 04:02:23 +00:00
|
|
|
|
XrGStateStroke(XrGState *gstate);
|
|
|
|
|
|
|
2002-08-15 05:22:59 +00:00
|
|
|
|
XrError
|
2002-06-11 04:02:23 +00:00
|
|
|
|
XrGStateFill(XrGState *fill);
|
|
|
|
|
|
|
|
|
|
|
|
/* xrcolor.c */
|
|
|
|
|
|
void
|
|
|
|
|
|
XrColorInit(XrColor *color);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrColorDeinit(XrColor *color);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrColorSetRGB(XrColor *color, double red, double green, double blue);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrColorSetAlpha(XrColor *color, double alpha);
|
|
|
|
|
|
|
|
|
|
|
|
/* xrpath.c */
|
|
|
|
|
|
void
|
|
|
|
|
|
XrPathInit(XrPath *path);
|
|
|
|
|
|
|
2002-08-15 05:22:59 +00:00
|
|
|
|
XrError
|
2002-06-11 04:02:23 +00:00
|
|
|
|
XrPathInitCopy(XrPath *path, XrPath *other);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrPathDeinit(XrPath *path);
|
|
|
|
|
|
|
2002-08-15 05:22:59 +00:00
|
|
|
|
XrError
|
2002-08-14 00:39:43 +00:00
|
|
|
|
XrPathAdd(XrPath *path, XrPathOp op, XPointFixed *pts, int num_pts);
|
2002-06-11 04:02:23 +00:00
|
|
|
|
|
2002-08-15 05:22:59 +00:00
|
|
|
|
XrError
|
2002-08-14 00:39:43 +00:00
|
|
|
|
XrPathInterpret(XrPath *path, XrPathDirection dir, XrPathCallbacks *cb, void *closure);
|
2002-06-11 04:02:23 +00:00
|
|
|
|
|
2002-08-14 00:39:43 +00:00
|
|
|
|
/* xrsurface.c */
|
2002-06-11 04:02:23 +00:00
|
|
|
|
void
|
2002-08-14 00:39:43 +00:00
|
|
|
|
XrSurfaceInit(XrSurface *surface, Display *dpy);
|
2002-06-11 04:02:23 +00:00
|
|
|
|
|
|
|
|
|
|
void
|
2002-08-14 00:39:43 +00:00
|
|
|
|
XrSurfaceDeinit(XrSurface *surface);
|
2002-06-11 04:02:23 +00:00
|
|
|
|
|
|
|
|
|
|
void
|
2002-08-14 00:39:43 +00:00
|
|
|
|
XrSurfaceSetSolidColor(XrSurface *surface, XrColor *color, XcFormat *xcformat);
|
2002-06-11 04:02:23 +00:00
|
|
|
|
|
|
|
|
|
|
void
|
2002-08-14 00:39:43 +00:00
|
|
|
|
XrSurfaceSetDrawable(XrSurface *surface, Drawable drawable);
|
2002-06-11 04:02:23 +00:00
|
|
|
|
|
|
|
|
|
|
void
|
2002-08-14 00:39:43 +00:00
|
|
|
|
XrSurfaceSetVisual(XrSurface *surface, Visual *visual);
|
2002-06-11 04:02:23 +00:00
|
|
|
|
|
|
|
|
|
|
void
|
2002-08-14 00:39:43 +00:00
|
|
|
|
XrSurfaceSetFormat(XrSurface *surface, XrFormat format);
|
2002-06-11 04:02:23 +00:00
|
|
|
|
|
2002-08-15 17:29:26 +00:00
|
|
|
|
/* xrpen.c */
|
|
|
|
|
|
XrError
|
2002-09-04 07:28:56 +00:00
|
|
|
|
XrPenInit(XrPen *pen, double radius, XrGState *gstate);
|
2002-09-03 08:42:25 +00:00
|
|
|
|
|
|
|
|
|
|
XrError
|
|
|
|
|
|
XrPenInitEmpty(XrPen *pen);
|
2002-08-15 17:29:26 +00:00
|
|
|
|
|
|
|
|
|
|
XrError
|
|
|
|
|
|
XrPenInitCopy(XrPen *pen, XrPen *other);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrPenDeinit(XrPen *pen);
|
|
|
|
|
|
|
2002-09-03 08:42:25 +00:00
|
|
|
|
XrError
|
|
|
|
|
|
XrPenAddPoints(XrPen *pen, XrPenTaggedPoint *pt, int num_pts);
|
|
|
|
|
|
|
|
|
|
|
|
XrError
|
2002-08-15 17:29:26 +00:00
|
|
|
|
XrPenAddPointsForSlopes(XrPen *pen, XPointFixed *a, XPointFixed *b, XPointFixed *c, XPointFixed *d);
|
|
|
|
|
|
|
|
|
|
|
|
XrError
|
2002-09-05 13:12:23 +00:00
|
|
|
|
XrPenStrokeSpline(XrPen *pen, XrSpline *spline, double tolerance, XrPolygon *polygon);
|
2002-08-15 17:29:26 +00:00
|
|
|
|
|
2002-08-14 00:39:43 +00:00
|
|
|
|
/* xrpolygon.c */
|
2002-06-11 04:02:23 +00:00
|
|
|
|
void
|
2002-08-15 17:29:26 +00:00
|
|
|
|
XrPolygonInit(XrPolygon *polygon);
|
2002-06-11 04:02:23 +00:00
|
|
|
|
|
|
|
|
|
|
void
|
2002-08-15 17:29:26 +00:00
|
|
|
|
XrPolygonDeinit(XrPolygon *polygon);
|
2002-06-11 04:02:23 +00:00
|
|
|
|
|
2002-08-15 05:22:59 +00:00
|
|
|
|
XrError
|
2002-08-15 17:29:26 +00:00
|
|
|
|
XrPolygonAddEdge(XrPolygon *polygon, XPointFixed *p1, XPointFixed *p2);
|
|
|
|
|
|
|
2002-09-03 08:42:25 +00:00
|
|
|
|
XrError
|
|
|
|
|
|
XrPolygonAddPoint(XrPolygon *polygon, XPointFixed *pt);
|
|
|
|
|
|
|
|
|
|
|
|
XrError
|
|
|
|
|
|
XrPolygonClose(XrPolygon *polygon);
|
|
|
|
|
|
|
2002-08-15 17:29:26 +00:00
|
|
|
|
/* xrspline.c */
|
2002-09-10 09:51:14 +00:00
|
|
|
|
XrError
|
2002-08-15 17:29:26 +00:00
|
|
|
|
XrSplineInit(XrSpline *spline, XPointFixed *a, XPointFixed *b, XPointFixed *c, XPointFixed *d);
|
2002-06-11 04:02:23 +00:00
|
|
|
|
|
2002-08-15 05:22:59 +00:00
|
|
|
|
XrError
|
2002-08-15 17:29:26 +00:00
|
|
|
|
XrSplineDecompose(XrSpline *spline, double tolerance);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrSplineDeinit(XrSpline *spline);
|
|
|
|
|
|
|
|
|
|
|
|
/* xrstroker.c */
|
2002-06-11 04:02:23 +00:00
|
|
|
|
void
|
2002-08-14 00:39:43 +00:00
|
|
|
|
XrStrokerInit(XrStroker *stroker, XrGState *gstate, XrTraps *traps);
|
2002-06-14 15:13:44 +00:00
|
|
|
|
|
|
|
|
|
|
void
|
2002-08-14 00:39:43 +00:00
|
|
|
|
XrStrokerDeinit(XrStroker *stroker);
|
2002-06-14 15:13:44 +00:00
|
|
|
|
|
2002-08-15 05:22:59 +00:00
|
|
|
|
XrError
|
2002-08-14 00:39:43 +00:00
|
|
|
|
XrStrokerAddEdge(void *closure, XPointFixed *p1, XPointFixed *p2);
|
2002-06-11 04:02:23 +00:00
|
|
|
|
|
2002-08-18 22:55:58 +00:00
|
|
|
|
XrError
|
|
|
|
|
|
XrStrokerAddEdgeDashed(void *closure, XPointFixed *p1, XPointFixed *p2);
|
|
|
|
|
|
|
2002-08-15 17:29:26 +00:00
|
|
|
|
XrError
|
|
|
|
|
|
XrStrokerAddSpline (void *closure, XPointFixed *a, XPointFixed *b, XPointFixed *c, XPointFixed *d);
|
|
|
|
|
|
|
2002-08-15 05:22:59 +00:00
|
|
|
|
XrError
|
2002-08-14 18:32:42 +00:00
|
|
|
|
XrStrokerDoneSubPath (void *closure, XrSubPathDone done);
|
|
|
|
|
|
|
2002-08-15 17:29:26 +00:00
|
|
|
|
XrError
|
|
|
|
|
|
XrStrokerDonePath (void *closure);
|
|
|
|
|
|
|
|
|
|
|
|
/* xrfiller.c */
|
|
|
|
|
|
void
|
|
|
|
|
|
XrFillerInit(XrFiller *filler, XrGState *gstate, XrTraps *traps);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrFillerDeinit(XrFiller *filler);
|
|
|
|
|
|
|
|
|
|
|
|
XrError
|
|
|
|
|
|
XrFillerAddEdge(void *closure, XPointFixed *p1, XPointFixed *p2);
|
|
|
|
|
|
|
|
|
|
|
|
XrError
|
|
|
|
|
|
XrFillerAddSpline (void *closure, XPointFixed *a, XPointFixed *b, XPointFixed *c, XPointFixed *d);
|
|
|
|
|
|
|
|
|
|
|
|
XrError
|
|
|
|
|
|
XrFillerDoneSubPath (void *closure, XrSubPathDone done);
|
|
|
|
|
|
|
|
|
|
|
|
XrError
|
|
|
|
|
|
XrFillerDonePath (void *closure);
|
|
|
|
|
|
|
2002-06-11 04:02:23 +00:00
|
|
|
|
/* xrtransform.c */
|
|
|
|
|
|
void
|
|
|
|
|
|
XrTransformInit(XrTransform *transform);
|
|
|
|
|
|
|
2002-06-14 15:13:44 +00:00
|
|
|
|
void
|
|
|
|
|
|
XrTransformDeinit(XrTransform *transform);
|
|
|
|
|
|
|
2002-06-11 04:02:23 +00:00
|
|
|
|
void
|
|
|
|
|
|
XrTransformInitMatrix(XrTransform *transform,
|
|
|
|
|
|
double a, double b,
|
|
|
|
|
|
double c, double d,
|
|
|
|
|
|
double tx, double ty);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrTransformInitTranslate(XrTransform *transform,
|
|
|
|
|
|
double tx, double ty);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrTransformInitScale(XrTransform *transform,
|
|
|
|
|
|
double sx, double sy);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrTransformInitRotate(XrTransform *transform,
|
|
|
|
|
|
double angle);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2002-06-14 15:13:44 +00:00
|
|
|
|
XrTransformMultiplyIntoLeft(XrTransform *t1, const XrTransform *t2);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrTransformMultiplyIntoRight(const XrTransform *t1, XrTransform *t2);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrTransformMultiply(const XrTransform *t1, const XrTransform *t2, XrTransform *new);
|
2002-06-11 04:02:23 +00:00
|
|
|
|
|
|
|
|
|
|
void
|
2002-06-14 15:13:44 +00:00
|
|
|
|
XrTransformPointScaleOnly(XrTransform *transform, XPointDouble *pt);
|
2002-06-11 04:02:23 +00:00
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrTransformPointWithoutTranslate(XrTransform *transform, XPointDouble *pt);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrTransformPoint(XrTransform *transform, XPointDouble *pt);
|
|
|
|
|
|
|
2002-09-05 10:06:44 +00:00
|
|
|
|
void
|
|
|
|
|
|
XrTransformEigenValues(XrTransform *transform, double *lambda1, double *lambda2);
|
|
|
|
|
|
|
2002-07-23 07:22:23 +00:00
|
|
|
|
/* xrtraps.c */
|
|
|
|
|
|
void
|
|
|
|
|
|
XrTrapsInit(XrTraps *traps);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
XrTrapsDeinit(XrTraps *traps);
|
|
|
|
|
|
|
2002-08-15 05:22:59 +00:00
|
|
|
|
XrError
|
2002-08-15 03:50:28 +00:00
|
|
|
|
XrTrapsTessellateRectangle (XrTraps *traps, XPointFixed q[4]);
|
2002-07-23 07:22:23 +00:00
|
|
|
|
|
2002-08-15 05:22:59 +00:00
|
|
|
|
XrError
|
2002-08-14 00:39:43 +00:00
|
|
|
|
XrTrapsTessellatePolygon (XrTraps *traps, XrPolygon *poly, int winding);
|
2002-07-23 07:22:23 +00:00
|
|
|
|
|
2002-09-10 08:01:00 +00:00
|
|
|
|
/* xrmisc.c */
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
ComputeSlope(XPointFixed *a, XPointFixed *b, XrSlopeFixed *slope);
|
|
|
|
|
|
|
2002-06-11 04:02:23 +00:00
|
|
|
|
#endif
|
2002-07-23 07:22:23 +00:00
|
|
|
|
|