Changeset 4214 for trunk/psLib/src/types
- Timestamp:
- Jun 10, 2005, 4:19:05 PM (21 years ago)
- Location:
- trunk/psLib/src/types
- Files:
-
- 2 edited
-
psPixels.c (modified) (2 diffs)
-
psPixels.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/types/psPixels.c
r4212 r4214 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06-1 0 21:46:46$9 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-11 02:19:05 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 89 89 pixels->n = pixels->nalloc; 90 90 } 91 92 return pixels; 93 } 94 95 psPixels* 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++; 91 111 92 112 return pixels; -
trunk/psLib/src/types/psPixels.h
r4162 r4214 7 7 * @author Robert DeSonia, MHPCC 8 8 * 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 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 62 62 psPixels* pixels, ///< psPixels to resize, or NULL to create new psPixels 63 63 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 */ 70 psPixels* 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 64 75 ); 65 76
Note:
See TracChangeset
for help on using the changeset viewer.
