From 9359b40d8c41901844924060a864a854dac4adbf Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 1 Jul 2005 10:04:51 +0000 Subject: Add support for gradients and solid fills to Render. --- include/X11/extensions/Xrender.h | 44 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/X11/extensions/Xrender.h b/include/X11/extensions/Xrender.h index bbfdc6c..4e4723a 100644 --- a/include/X11/extensions/Xrender.h +++ b/include/X11/extensions/Xrender.h @@ -65,7 +65,7 @@ typedef struct { #define PictFormatColormap (1 << 11) typedef struct _XRenderPictureAttributes { - Bool repeat; + int repeat; Picture alpha_map; int alpha_x_origin; int alpha_y_origin; @@ -143,6 +143,12 @@ typedef struct _XTriangle { XPointFixed p1, p2, p3; } XTriangle; +typedef struct _XCircle { + XFixed x; + XFixed y; + XFixed radius; +} XCircle; + typedef struct _XTrapezoid { XFixed top, bottom; XLineFixed left, right; @@ -177,6 +183,21 @@ typedef struct _XTrap { XSpanFix top, bottom; } XTrap; +typedef struct _XLinearGradient { + XPointFixed p1; + XPointFixed p2; +} XLinearGradient; + +typedef struct _XRadialGradient { + XCircle inner; + XCircle outer; +} XRadialGradient; + +typedef struct _XConicalGradient { + XPointFixed center; + XFixed angle; /* in degrees */ +} XConicalGradient; + _XFUNCPROTOBEGIN Bool XRenderQueryExtension (Display *dpy, int *event_basep, int *error_basep); @@ -481,6 +502,27 @@ XRenderAddTraps (Display *dpy, _Xconst XTrap *traps, int ntrap); +Picture XRenderCreateSolidFill (Display *dpy, + const XRenderColor *color); + +Picture XRenderCreateLinearGradient (Display *dpy, + const XLinearGradient *gradient, + const XFixed *stops, + const XRenderColor *colors, + int nstops); + +Picture XRenderCreateRadialGradient (Display *dpy, + const XRadialGradient *gradient, + const XFixed *stops, + const XRenderColor *colors, + int nstops); + +Picture XRenderCreateConicalGradient (Display *dpy, + const XConicalGradient *gradient, + const XFixed *stops, + const XRenderColor *colors, + int nstops); + _XFUNCPROTOEND #endif /* _XRENDER_H_ */ -- cgit v1.2.1