Index: /trunk/psLib/src/imageops/psImagePixelManip.c
===================================================================
--- /trunk/psLib/src/imageops/psImagePixelManip.c	(revision 4937)
+++ /trunk/psLib/src/imageops/psImagePixelManip.c	(revision 4938)
@@ -10,6 +10,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-08-31 21:58:22 $
+ *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-09-01 01:05:41 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -400,5 +400,5 @@
 void psImageMaskRegion(psImage *image,
                        psRegion *region,
-                       bool logical_and,
+                       const char *op,
                        psMaskType maskValue)
 {
@@ -414,8 +414,12 @@
             if (iy + image->row0 >= region->y1)
                 continue;
-            if (logical_and) {
+            if ( !strncmp(op, "&", 2) || !strncmp(op, "AND", 5) ) {
                 image->data.U8[iy][ix] &= maskValue;
-            } else {
+            } else if ( !strncmp(op, "|", 2) || !strncmp(op, "OR", 5) ) {
                 image->data.U8[iy][ix] |= maskValue;
+            } else if ( !strncmp(op, "=", 2) || !strncmp(op, "EQUAL", 5) ) {
+                image->data.U8[iy][ix] = maskValue;
+            } else if ( !strncmp(op, "^", 2) || !strncmp(op, "XOR", 5) ) {
+                image->data.U8[iy][ix] ^= maskValue;
             }
         }
@@ -427,5 +431,5 @@
 void psImageKeepRegion(psImage *image,
                        psRegion *region,
-                       bool logical_and,
+                       const char *op,
                        psMaskType maskValue)
 {
@@ -443,8 +447,12 @@
             continue;
 maskit:
-            if (logical_and) {
+            if ( !strncmp(op, "&", 2) || !strncmp(op, "AND", 5) ) {
                 image->data.U8[iy][ix] &= maskValue;
-            } else {
+            } else if ( !strncmp(op, "|", 2) || !strncmp(op, "OR", 5) ) {
                 image->data.U8[iy][ix] |= maskValue;
+            } else if ( !strncmp(op, "=", 2) || !strncmp(op, "EQUAL", 5) ) {
+                image->data.U8[iy][ix] = maskValue;
+            } else if ( !strncmp(op, "^", 2) || !strncmp(op, "XOR", 5) ) {
+                image->data.U8[iy][ix] ^= maskValue;
             }
         }
@@ -458,5 +466,5 @@
                        double y,
                        double radius,
-                       bool logical_and,
+                       const char *op,
                        psMaskType maskValue)
 {
@@ -473,8 +481,12 @@
             if (r2 > R2)
                 continue;
-            if (logical_and) {
+            if ( !strncmp(op, "&", 2) || !strncmp(op, "AND", 5) ) {
                 image->data.U8[iy][ix] &= maskValue;
-            } else {
+            } else if ( !strncmp(op, "|", 2) || !strncmp(op, "OR", 5) ) {
                 image->data.U8[iy][ix] |= maskValue;
+            } else if ( !strncmp(op, "=", 2) || !strncmp(op, "EQUAL", 5) ) {
+                image->data.U8[iy][ix] = maskValue;
+            } else if ( !strncmp(op, "^", 2) || !strncmp(op, "XOR", 5) ) {
+                image->data.U8[iy][ix] ^= maskValue;
             }
         }
@@ -488,5 +500,5 @@
                        double y,
                        double radius,
-                       bool logical_and,
+                       const char *op,
                        psMaskType maskValue)
 {
@@ -503,8 +515,12 @@
             if (r2 < R2)
                 continue;
-            if (logical_and) {
+            if ( !strncmp(op, "&", 2) || !strncmp(op, "AND", 5) ) {
                 image->data.U8[iy][ix] &= maskValue;
-            } else {
+            } else if ( !strncmp(op, "|", 2) || !strncmp(op, "OR", 5) ) {
                 image->data.U8[iy][ix] |= maskValue;
+            } else if ( !strncmp(op, "=", 2) || !strncmp(op, "EQUAL", 5) ) {
+                image->data.U8[iy][ix] = maskValue;
+            } else if ( !strncmp(op, "^", 2) || !strncmp(op, "XOR", 5) ) {
+                image->data.U8[iy][ix] ^= maskValue;
             }
         }
Index: /trunk/psLib/src/imageops/psImagePixelManip.h
===================================================================
--- /trunk/psLib/src/imageops/psImagePixelManip.h	(revision 4937)
+++ /trunk/psLib/src/imageops/psImagePixelManip.h	(revision 4938)
@@ -8,6 +8,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-08-31 21:58:22 $
+ *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-09-01 01:05:41 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -95,5 +95,5 @@
     psImage *image,                    ///< the image to set
     psRegion *region,                  ///< the specified region
-    bool logical_and,                  ///< the logical operation
+    const char *op,                    ///< the logical operation
     psMaskType maskValue               ///< the specified bits
 );
@@ -107,5 +107,5 @@
     psImage *image,                    ///< the image to set
     psRegion *region,                  ///< the specified region
-    bool logical_and,                  ///< the logical operation
+    const char *op,                    ///< the logical operation
     psMaskType maskValue               ///< the specified bits
 );
@@ -121,5 +121,5 @@
     double y,                          ///< the y coordinate of the circle's center
     double radius,                     ///< the radius of the specified circle
-    bool logical_and,                  ///< the logical operation
+    const char *op,                    ///< the logical operation
     psMaskType maskValue               ///< the specified bits
 );
@@ -135,5 +135,5 @@
     double y,                          ///< the y coordinate of the circle's center
     double radius,                     ///< the radius of the specified circle
-    bool logical_and,                  ///< the logical operation
+    const char *op,                    ///< the logical operation
     psMaskType maskValue               ///< the specified bits
 );
