[Commit] Xr/src Xr.h, 1.28, 1.29 xr.c, 1.25, 1.26 xrcolor.c, 1.6,
1.7 xrgstate.c, 1.37, 1.38 xrint.h, 1.42, 1.43
Carl Worth
commit at keithp.com
Thu Jul 3 09:12:54 PDT 2003
Committed by: cworth
Update of /local/src/CVS/Xr/src
In directory home.keithp.com:/tmp/cvs-serv15591/src
Modified Files:
Xr.h xr.c xrcolor.c xrgstate.c xrint.h
Log Message:
Added XrGetRGBColor and XrGetAlpha
Index: Xr.h
===================================================================
RCS file: /local/src/CVS/Xr/src/Xr.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- Xr.h 29 May 2003 02:28:53 -0000 1.28
+++ Xr.h 3 Jul 2003 15:12:52 -0000 1.29
@@ -130,6 +130,9 @@
void
XrSetRGBColor(XrState *xrs, double red, double green, double blue);
+void
+XrGetRGBColor(XrState *xrs, double *red, double *green, double *blue);
+
/* XXX: Do we want XrGetPattern as well? */
void
XrSetPattern(XrState *xrs, XrSurface *pattern);
@@ -139,6 +142,9 @@
void
XrSetAlpha(XrState *xrs, double alpha);
+
+double
+XrGetAlpha(XrState *xrs);
typedef enum _XrFillRule { XrFillRuleWinding, XrFillRuleEvenOdd } XrFillRule;
Index: xr.c
===================================================================
RCS file: /local/src/CVS/Xr/src/xr.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- xr.c 16 May 2003 04:16:26 -0000 1.25
+++ xr.c 3 Jul 2003 15:12:52 -0000 1.26
@@ -184,6 +184,16 @@
}
void
+XrGetRGBColor(XrState *xrs, double *red, double *green, double *blue)
+{
+ /* XXX: Should we do anything with the return values in the error case? */
+ if (xrs->status)
+ return;
+
+ xrs->status = _XrGStateGetRGBColor(_XR_CURRENT_GSTATE(xrs), red, green, blue);
+}
+
+void
XrSetPattern(XrState *xrs, XrSurface *pattern)
{
if (xrs->status)
@@ -220,6 +230,12 @@
xrs->status = _XrGStateSetAlpha(_XR_CURRENT_GSTATE(xrs), alpha);
}
+double
+XrGetAlpha(XrState *xrs)
+{
+ return _XrGStateGetAlpha(_XR_CURRENT_GSTATE(xrs));
+}
+
void
XrSetFillRule(XrState *xrs, XrFillRule fill_rule)
{
@@ -501,7 +517,7 @@
void
XrGetCurrentPoint(XrState *xrs, double *x, double *y)
{
- /* XXX: Should we do anything with the return value in the error case? */
+ /* XXX: Should we do anything with the return values in the error case? */
if (xrs->status)
return;
Index: xrcolor.c
===================================================================
RCS file: /local/src/CVS/Xr/src/xrcolor.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- xrcolor.c 31 Oct 2002 05:54:50 -0000 1.6
+++ xrcolor.c 3 Jul 2003 15:12:52 -0000 1.7
@@ -62,6 +62,14 @@
}
void
+_XrColorGetRGB(XrColor *color, double *red, double *green, double *blue)
+{
+ *red = color->red;
+ *green = color->green;
+ *blue = color->blue;
+}
+
+void
_XrColorSetAlpha(XrColor *color, double alpha)
{
color->alpha = alpha;
Index: xrgstate.c
===================================================================
RCS file: /local/src/CVS/Xr/src/xrgstate.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- xrgstate.c 12 Jun 2003 06:43:30 -0000 1.37
+++ xrgstate.c 3 Jul 2003 15:12:52 -0000 1.38
@@ -358,6 +358,14 @@
}
XrStatus
+_XrGStateGetRGBColor(XrGState *gstate, double *red, double *green, double *blue)
+{
+ _XrColorGetRGB(&gstate->color, red, green, blue);
+
+ return XrStatusSuccess;
+}
+
+XrStatus
_XrGStateSetTolerance(XrGState *gstate, double tolerance)
{
gstate->tolerance = tolerance;
@@ -389,6 +397,12 @@
XrSurfaceSetRepeat (gstate->solid, 1);
return XrStatusSuccess;
+}
+
+double
+_XrGStateGetAlpha(XrGState *gstate)
+{
+ return gstate->alpha;
}
XrStatus
Index: xrint.h
===================================================================
RCS file: /local/src/CVS/Xr/src/xrint.h,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- xrint.h 29 May 2003 02:28:53 -0000 1.42
+++ xrint.h 3 Jul 2003 15:12:52 -0000 1.43
@@ -349,6 +349,9 @@
_XrGStateSetRGBColor(XrGState *gstate, double red, double green, double blue);
XrStatus
+_XrGStateGetRGBColor(XrGState *gstate, double *red, double *green, double *blue);
+
+XrStatus
_XrGStateSetTolerance(XrGState *gstate, double tolerance);
double
@@ -357,6 +360,9 @@
XrStatus
_XrGStateSetAlpha(XrGState *gstate, double alpha);
+double
+_XrGStateGetAlpha(XrGState *gstate);
+
XrStatus
_XrGStateSetFillRule(XrGState *gstate, XrFillRule fill_rule);
@@ -500,6 +506,9 @@
void
_XrColorSetRGB(XrColor *color, double red, double green, double blue);
+
+void
+_XrColorGetRGB(XrColor *color, double *red, double *green, double *blue);
void
_XrColorSetAlpha(XrColor *color, double alpha);
More information about the Commit
mailing list