Index: /trunk/psLib/src/types/psPixels.c
===================================================================
--- /trunk/psLib/src/types/psPixels.c	(revision 5213)
+++ /trunk/psLib/src/types/psPixels.c	(revision 5214)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-09-26 22:35:53 $
+ *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-10-01 00:14:17 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -32,5 +32,6 @@
 
 // for use by qsort, etc.
-static int comparePixelCoord(psPixelCoord* coord1, psPixelCoord* coord2)
+static int comparePixelCoord(psPixelCoord* coord1,
+                             psPixelCoord* coord2)
 {
     // check row first
@@ -79,5 +80,6 @@
 
 
-psPixels* psPixelsRealloc(psPixels* pixels, long nalloc)
+psPixels* psPixelsRealloc(psPixels* pixels,
+                          long nalloc)
 {
     if (pixels == NULL) {
@@ -101,5 +103,8 @@
 }
 
-psPixels* p_psPixelsAppend(psPixels* pixels, long growth, int x, int y)
+psPixels* p_psPixelsAppend(psPixels* pixels,
+                           long growth,
+                           float x,
+                           float y)
 {
     if (growth < 1) {
@@ -111,5 +116,5 @@
     }
 
-    int n = pixels->n;
+    long n = pixels->n;
 
     pixels->data[n].x = x;
@@ -121,5 +126,6 @@
 }
 
-psPixels* psPixelsCopy(psPixels* out, const psPixels* pixels)
+psPixels* psPixelsCopy(psPixels* out,
+                       const psPixels* pixels)
 {
     if (pixels == NULL) {
@@ -137,5 +143,8 @@
 }
 
-psImage *psPixelsToMask(psImage *out, const psPixels *pixels, psRegion region, psMaskType maskVal)
+psImage *psPixelsToMask(psImage *out,
+                        const psPixels *pixels,
+                        psRegion region,
+                        psMaskType maskVal)
 {
     // check that the input pixel vector is valid
@@ -154,8 +163,8 @@
     }
 
-    int x0 = region.x0;
-    int x1 = region.x1;
-    int y0 = region.y0;
-    int y1 = region.y1;
+    float x0 = region.x0;
+    float x1 = region.x1;
+    float y0 = region.y0;
+    float y1 = region.y1;
 
     // determine the output image size
@@ -165,5 +174,5 @@
         psError(PS_ERR_BAD_PARAMETER_VALUE, true,
                 PS_ERRORTEXT_psPixels_REGION_INVALID,
-                y0,y1,x0,x1);
+                (int)y0,(int)y1,(int)x0,(int)x1);
         psFree(out);
         return NULL;
@@ -178,6 +187,6 @@
         return NULL;
     }
-    *(psS32*)&out->row0 = y0;
-    *(psS32*)&out->col0 = x0;
+    *(psS32*)&out->row0 = (int)y0;
+    *(psS32*)&out->col0 = (int)x0;
 
     // initialize image to all zeros
@@ -188,14 +197,14 @@
 
     // determine the length of the pixel vector
-    int length = pixels->n;
+    long length = pixels->n;
 
     // cycle through the vector of pixels and insert pixels into image
     psMaskType** outData = out->data.PS_TYPE_MASK_DATA;
     for (int p = 0; p < length; p++) {
-        psS32 x = data[p].x;
-        psS32 y = data[p].y;
+        float x = data[p].x;
+        float y = data[p].y;
         // pixel in region?
         if (x >= x0 && x < x1 && y >= y0 && y < y1) {
-            outData[y-y0][x-x0] |= maskVal;
+            outData[(int)(y-y0)][(int)(x-x0)] |= maskVal;
         }
     }
@@ -204,5 +213,7 @@
 }
 
-psPixels* psPixelsFromMask(psPixels* out, const psImage* mask, psMaskType maskVal)
+psPixels* psPixelsFromMask(psPixels* out,
+                           const psImage* mask,
+                           psMaskType maskVal)
 {
     if (mask == NULL) {
@@ -227,5 +238,5 @@
     // total pixels, so it is best to just start with a guess and resize if
     // necessary
-    int minPixels = numRows*numCols/100; // initial guess, 1% of pixels masked
+    long minPixels = numRows*numCols/100; // initial guess, 1% of pixels masked
     if (minPixels < 32) { // enforce a minimum size
         minPixels = 32;
@@ -241,5 +252,5 @@
 
     // find the mask pixels in the image
-    int numPixels = 0;
+    long numPixels = 0;
     psPixelCoord* data = out->data;
     int nalloc = out->nalloc;
@@ -266,5 +277,6 @@
 }
 
-psPixels* psPixelsConcatenate(psPixels *out,const psPixels *pixels)
+psPixels* psPixelsConcatenate(psPixels *out,
+                              const psPixels *pixels)
 {
     if (pixels == NULL) {
@@ -274,5 +286,5 @@
     }
 
-    int pixelsN = pixels->n;
+    long pixelsN = pixels->n;
     psPixelCoord* pixelsData = pixels->data;
 
@@ -284,5 +296,5 @@
 
     // make sure the out is large enough to fit the result
-    int outN = out->n;
+    long outN = out->n;
     out = psPixelsRealloc(out,outN + pixelsN);
     psPixelCoord* outData = out->data;
@@ -294,6 +306,6 @@
     // add non-duplicate values in pixels to out
     psPixelCoord pCoord;
-    int end = outN;
-    for (int n = 0; n < pixelsN; n++) {
+    long end = outN;
+    for (long n = 0; n < pixelsN; n++) {
         pCoord = pixelsData[n];
         if (bsearch(&pCoord, outData, outN, sizeof(psPixelCoord),
@@ -318,5 +330,5 @@
     }
 
-    int n = pixels->n;
+    long n = pixels->n;
     psPixelCoord* data = pixels->data;
 
@@ -326,6 +338,6 @@
     }
 
-    for (int i = 0; i < n; i++) {
-        fprintf (fd, "(%d,%d)\n", data[i].x, data[i].y);
+    for (long i = 0; i < n; i++) {
+        fprintf (fd, "(%f,%f)\n", data[i].x, data[i].y);
     }
     fprintf (fd, "\n");
Index: /trunk/psLib/src/types/psPixels.h
===================================================================
--- /trunk/psLib/src/types/psPixels.h	(revision 5213)
+++ /trunk/psLib/src/types/psPixels.h	(revision 5214)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-09-26 22:35:53 $
+ *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-10-01 00:14:17 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -24,6 +24,6 @@
 typedef struct
 {
-    int x;                             ///< x coordinate
-    int y;                             ///< y coordinate
+    float x;                             ///< x coordinate
+    float y;                             ///< y coordinate
 }
 psPixelCoord;
@@ -86,6 +86,6 @@
     long growth,
     ///< number of elements to grow the psPixels list, if necessary.  if growth < 1, 10 is used.
-    int x,                             ///< x coordinate to append
-    int y                              ///< y coordinate to append
+    float x,                             ///< x coordinate to append
+    float y                              ///< y coordinate to append
 );
 
Index: /trunk/psLib/test/types/tst_psPixels.c
===================================================================
--- /trunk/psLib/test/types/tst_psPixels.c	(revision 5213)
+++ /trunk/psLib/test/types/tst_psPixels.c	(revision 5214)
@@ -5,7 +5,7 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.2 $
+ *  @version $Revision: 1.3 $
  *           $Name: not supported by cvs2svn $
- *  @date $Date: 2005-09-23 00:04:36 $
+ *  @date $Date: 2005-10-01 00:14:17 $
  *
  *  Copyright 2005 Maui High Performance Computing Center, University of Hawaii
@@ -88,10 +88,10 @@
     if (p1->n != p1->nalloc) {
         psError(PS_ERR_UNKNOWN, true,
-                "psPixelsAlloc failed to set n = %d", p1->nalloc);
+                "psPixelsAlloc failed to set n = %ld", p1->nalloc);
         return 13;
     }
     if (p1->nalloc != 1) {
         psError(PS_ERR_UNKNOWN, true,
-                "psPixelsAlloc failed to set nalloc = 1 (%d)",
+                "psPixelsAlloc failed to set nalloc = 1 (%ld)",
                 p1->nalloc);
         return 14;
@@ -117,10 +117,10 @@
     if (p2->n != p2->nalloc) {
         psError(PS_ERR_UNKNOWN, true,
-                "psPixelsAlloc failed to set n = %d", p2->nalloc);
+                "psPixelsAlloc failed to set n = %ld", p2->nalloc);
         return 13;
     }
     if (p2->nalloc != 10) {
         psError(PS_ERR_UNKNOWN, true,
-                "psPixelsAlloc failed to set nalloc = 1 (%d)",
+                "psPixelsAlloc failed to set nalloc = 1 (%ld)",
                 p2->nalloc);
         return 14;
@@ -192,5 +192,5 @@
         if (p0->data[i].x != i || p0->data[i].y != 100+i) {
             psError(PS_ERR_UNKNOWN, true,
-                    "The value of pixel %d was not preserved (%d,%d) vs (%d,%d).",
+                    "The value of pixel %d was not preserved (%f,%f) vs (%d,%d).",
                     i, p0->data[i].x, p0->data[i].y, i, 100+i);
             return 15;
@@ -284,8 +284,8 @@
         return 3;
     }
-    for (int i = 0; i < out1->n; i++) {
+    for (long i = 0; i < out1->n; i++) {
         if (out1->data[i].x != in1->data[i].x || out1->data[i].y != in1->data[i].y) {
             psError(PS_ERR_UNKNOWN, true,
-                    "failed to copy the values correctly at index %d", i);
+                    "failed to copy the values correctly at index %ld", i);
             return 4;
         }
@@ -402,13 +402,13 @@
     if (pixels->n != numRows) {
         psError(PS_ERR_UNKNOWN, false,
-                "wrong number of pixels in list.  Got %d, should be %d.",
+                "wrong number of pixels in list.  Got %ld, should be %d.",
                 pixels->n, numRows);
         return 2;
     }
 
-    for (int i = 0; i < pixels->n; i++) {
-        if (mask->data.PS_TYPE_MASK_DATA[pixels->data[i].y][pixels->data[i].x] != 1) {
+    for (long i = 0; i < pixels->n; i++) {
+        if (mask->data.PS_TYPE_MASK_DATA[(int)pixels->data[i].y][(int)pixels->data[i].x] != 1) {
             psError(PS_ERR_UNKNOWN, false,
-                    "Item in psPixels list (%d,%d) didn't coorespond to a masked value in image",
+                    "Item in psPixels list (%f,%f) didn't coorespond to a masked value in image",
                     pixels->data[i].x, pixels->data[i].y);
             return 3;
@@ -468,8 +468,8 @@
         return 3;
     }
-    for (int i = 0; i < pixels2->n; i++) {
+    for (long i = 0; i < pixels2->n; i++) {
         if (pixels2->data[i].x != pixels->data[i].x || pixels2->data[i].y != pixels->data[i].y) {
             psError(PS_ERR_UNKNOWN, true,
-                    "failed to copy the values correctly at index %d", i);
+                    "failed to copy the values correctly at index %ld", i);
             return 4;
         }
@@ -486,5 +486,5 @@
     if (pixels3->n != 15) {
         psError(PS_ERR_UNKNOWN, true,
-                "pixels3->n != 15, == %d", pixels3->n);
+                "pixels3->n != 15, == %ld", pixels3->n);
         return 11;
     }
@@ -526,5 +526,5 @@
     out = psPixelsGet(in, 1);
     if ( out.x != 3 || out.y != 13 ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psPixelsGet return incorrect values %d,%d",
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psPixelsGet return incorrect values %f,%f",
                 out.x, out.y);
         return 4;
@@ -538,5 +538,5 @@
     out = psPixelsGet(in, 0);
     if (out.x != 1 || out.y != 2) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psPixelsGet return incorrect values %d,%d",
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psPixelsGet return incorrect values %f,%f",
                 out.x, out.y);
         return 6;
