IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 4214 for trunk/psLib/src/types


Ignore:
Timestamp:
Jun 10, 2005, 4:19:05 PM (21 years ago)
Author:
desonia
Message:

beefed up psImageTransform

Location:
trunk/psLib/src/types
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/types/psPixels.c

    r4212 r4214  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-06-10 21:46:46 $
     9 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-06-11 02:19:05 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    8989        pixels->n = pixels->nalloc;
    9090    }
     91
     92    return pixels;
     93}
     94
     95psPixels* p_psPixelsAppend(psPixels* pixels, int growth, psS32 x, psS32 y)
     96{
     97    if (growth < 1) {
     98        growth = 10;
     99    }
     100
     101    if ( (pixels == NULL) || (pixels->n >= pixels->nalloc) ) {
     102        pixels=psPixelsRealloc(pixels, pixels->nalloc+growth);
     103    }
     104
     105    int n = pixels->n;
     106
     107    pixels->data[n].x = x;
     108    pixels->data[n].y = y;
     109
     110    pixels->n++;
    91111
    92112    return pixels;
  • trunk/psLib/src/types/psPixels.h

    r4162 r4214  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-06-08 23:40:45 $
     9 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-06-11 02:19:05 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6262    psPixels* pixels,                  ///< psPixels to resize, or NULL to create new psPixels
    6363    int size                           ///< the size of the coordinate vectors
     64);
     65
     66/** Add a pixel location to a psPixels
     67 *
     68 *  @return psPixels*       psPixels with the value appended.
     69 */
     70psPixels* p_psPixelsAppend(
     71    psPixels* pixels,                  ///< psPixels to append new coordinate to.  NULL creates a new one.
     72    int growth,                        ///< number of elements to grow the psPixels list, if necessary.  if growth < 1, 10 is used.
     73    psS32 x,                           ///< x coordinate to append
     74    psS32 y                            ///< y coordinate to append
    6475);
    6576
Note: See TracChangeset for help on using the changeset viewer.