Changeset 5745 for trunk/stac/src/stacRead.c
- Timestamp:
- Dec 7, 2005, 4:04:22 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/stac/src/stacRead.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/stac/src/stacRead.c
r5743 r5745 124 124 psTrace("stac.read.map", 5, "Polynomial order: %d\n", order); 125 125 126 psPlaneTransform *map = psPlaneTransformAlloc(order + 1, order + 1); // The transformation126 psPlaneTransform *map = psPlaneTransformAlloc(order, order); // The transformation 127 127 // Set coefficient masks 128 for (int i = 0; i < order + 1; i++) {129 for (int j = 0; j < order + 1; j++) {128 for (int i = 0; i <= order; i++) { 129 for (int j = 0; j <= order; j++) { 130 130 if (i + j > order + 1) { 131 131 map->x->mask[i][j] = 1; … … 140 140 // Read x coefficients 141 141 psTrace("stac.read.map", 7, "x' = \n"); 142 for (int k = 0; k < order + 1; k++) {143 for (int j = 0; j < k + 1; j++) {142 for (int k = 0; k <= order; k++) { 143 for (int j = 0; j <= k; j++) { 144 144 int i = k - j; 145 145 if (fscanf(mapfp, "%lf", &map->x->coeff[i][j]) != 1) { … … 154 154 // Read y coefficients 155 155 psTrace("stac.read.maps", 7, "y' = \n"); 156 for (int k = 0; k < order + 1; k++) {157 for (int j = 0; j < k + 1; j++) {156 for (int k = 0; k <= order; k++) { 157 for (int j = 0; j <= k; j++) { 158 158 int i = k - j; 159 159 if (fscanf(mapfp, "%lf", &map->y->coeff[i][j]) != 1) { … … 188 188 } 189 189 // Read the file 190 sprintf(mapfile, "%s.map",filenames->data[i]);190 sprintf(mapfile, "%s.map", (const char*)filenames->data[i]); 191 191 maps->data[i] = stacReadMap(mapfile); 192 192 if (maps->data[i] == NULL) {
Note:
See TracChangeset
for help on using the changeset viewer.
