Changeset 2879 for trunk/psLib/src/mathtypes
- Timestamp:
- Jan 3, 2005, 4:34:58 PM (22 years ago)
- Location:
- trunk/psLib/src/mathtypes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/mathtypes/psImage.c
r2762 r2879 9 9 * @author Ross Harman, MHPCC 10 10 * 11 * @version $Revision: 1.5 5$ $Name: not supported by cvs2svn $12 * @date $Date: 200 4-12-20 21:39:42$11 * @version $Revision: 1.56 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-01-04 02:34:57 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 23 23 #include "psError.h" 24 24 #include "psImage.h" 25 #include "psString.h" 25 26 26 27 #include "psImageErrors.h" … … 146 147 147 148 return psRegionAlloc(col0,col1,row0,row1); 149 } 150 151 char* psRegionToString(psRegion* region) 152 { 153 char tmpText[256]; // big enough to store any region as text 154 155 if (region == NULL) { 156 psError(PS_ERR_BAD_PARAMETER_NULL, true, 157 PS_ERRORTEXT_psImage_REGION_NULL); 158 return NULL; 159 } 160 161 snprintf(tmpText,256,"[%g:%g,%g:%g]", 162 region->x0, region->x1, 163 region->y0, region->y1); 164 165 return psStringCopy(tmpText); 148 166 } 149 167 -
trunk/psLib/src/mathtypes/psImage.h
r2375 r2879 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.4 3$ $Name: not supported by cvs2svn $14 * @date $Date: 200 4-11-16 20:00:21$13 * @version $Revision: 1.44 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-01-04 02:34:57 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 103 103 ); 104 104 105 /** Create a n image of the specified size and type.106 * 107 * Uses psLib memory allocation functions to create a n image struct ofthe108 * specified size and type.109 * 110 * @return ps Image* : Pointer to psImage.105 /** Create a psRegion with the specified attributes. 106 * 107 * Uses psLib memory allocation functions to create a psRegion the 108 * specified x0, x1, y0, and y1. 109 * 110 * @return psRegion* : Pointer to psRegion. 111 111 * 112 112 */ … … 118 118 ); 119 119 120 /** Create a psRegion with the attribute values given as a string. 121 * 122 * Create a psRegion with the attribute values given as a string. The format 123 * shall be of the standard IRAF form '[x0:x1,y0:y1]' 124 * 125 * @return psRegion*: A new psRegion struct, or NULL is not successful. 126 */ 120 127 psRegion* psRegionFromString( 121 128 char* region ///< image rectangular region in the form '[x0:x1,y0:y1]' 129 ); 130 131 /** Create a string of the standard IRAF form '[x0:x1,y0:y1]' from a psRegion. 132 * 133 * @return char*: A new string representing the psRegion as text, or NULL 134 * is not successful. 135 */ 136 char* psRegionToString( 137 psRegion* region ///< the psRegion to convert to a string 122 138 ); 123 139
Note:
See TracChangeset
for help on using the changeset viewer.
