Changeset 6253 for trunk/psLib/test/astro/tst_psCoord.c
- Timestamp:
- Jan 30, 2006, 12:56:01 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/astro/tst_psCoord.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/astro/tst_psCoord.c
r6251 r6253 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1. 8$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-01-30 2 0:28:34$8 * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-01-30 22:56:01 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 396 396 } 397 397 398 input = psPixelsAlloc( 5);398 input = psPixelsAlloc(1); 399 399 /* for (int i = 0; i < 2; i++) { 400 400 input->data[i].x = i*1.0; … … 403 403 */ 404 404 input->data[0].x = 1.0; 405 input->data[0].y = 2.0;406 input->data[1].x = 1.0;407 input->data[1].y = 3.0;408 trans->x->nX = 1;405 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 409 trans->x->nY = 0; 410 trans->y->nX = 1;411 trans->y->nY = 0;410 trans->y->nX = 0; 411 trans->y->nY = 2; 412 412 trans->x->coeff[0][0] = 0; 413 trans->x->coeff[1][0] = 1 ;413 trans->x->coeff[1][0] = 1.0; 414 414 trans->y->coeff[0][0] = 0; 415 trans->y->coeff[1][0] = 2; 415 trans->y->coeff[0][0] = 0; 416 trans->y->coeff[0][2] = 0.5; 416 417 417 418 //Verify that the output pixels are what we expected 418 419 output = psPixelsTransform(output, input, trans); 419 printf("\n output return %ld pixels\n\n", output->n);420 int nExpected = 1;420 printf("\n output returned with %ld pixels\n\n", output->n); 421 int nExpected = 9; 421 422 if (output->n != nExpected) { 422 423 psError(PS_ERR_BAD_PARAMETER_SIZE, false, 423 424 "psPixelsTransform failed to return the expected number of pixels.\n"); 425 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); 427 } 424 428 return 3; 425 429 } 426 430 431 psFree(trans); 427 432 psFree(input); 428 433 psFree(output); 429 psFree(trans);430 434 431 435 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.
