Changeset 6268 for trunk/psLib/test/astro/tst_psCoord.c
- Timestamp:
- Jan 31, 2006, 1:24:21 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/astro/tst_psCoord.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/astro/tst_psCoord.c
r6253 r6268 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1. 9$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-01-3 0 22:56:01 $8 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-01-31 23:24:21 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 377 377 psPixels *input = NULL; 378 378 psPixels *output = NULL; 379 psPlaneTransform *trans = psPlaneTransformAlloc( 2, 0);379 psPlaneTransform *trans = psPlaneTransformAlloc(1, 3); 380 380 381 381 //Return NULL for NULL input pixels … … 396 396 } 397 397 398 input = psPixelsAlloc(1); 399 /* for (int i = 0; i < 2; i++) { 400 input->data[i].x = i*1.0; 401 input->data[i].y = i*1.0; 402 } 403 */ 398 input = psPixelsAlloc(2); 404 399 input->data[0].x = 1.0; 405 400 input->data[0].y = 1.0; 406 // input->data[1].x = 1.0; 407 // input->data[1].y = 6.0; 408 trans->x->nX = 2; 409 trans->x->nY = 0; 410 trans->y->nX = 0; 411 trans->y->nY = 2; 401 input->data[1].x = 1.0; 402 input->data[1].y = 6.0; 412 403 trans->x->coeff[0][0] = 0; 413 404 trans->x->coeff[1][0] = 1.0; … … 418 409 //Verify that the output pixels are what we expected 419 410 output = psPixelsTransform(output, input, trans); 420 printf("\n output returned with %ld pixels\n\n", output->n);421 411 int nExpected = 9; 422 412 if (output->n != nExpected) { 423 413 psError(PS_ERR_BAD_PARAMETER_SIZE, false, 424 414 "psPixelsTransform failed to return the expected number of pixels.\n"); 415 printf("\n output returned with %ld pixels\n\n", output->n); 425 416 for (int i = 0; i < output->n; i++) { 426 printf(" (%6.2lf, %6.2lf) pixel %d\n", output->data[i].x, output->data[i].y, i );417 printf(" (%6.2lf, %6.2lf) pixel %d\n", output->data[i].x, output->data[i].y, i+1); 427 418 } 428 419 return 3;
Note:
See TracChangeset
for help on using the changeset viewer.
