Changeset 20936 for trunk/Ohana/src/opihi/dvo/imbox.c
- Timestamp:
- Dec 7, 2008, 3:31:01 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/dvo/imbox.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/dvo/imbox.c
r20212 r20936 36 36 37 37 /* project this image to screen display coords */ 38 ALLOCATE (Xvec.elements, float, 8);39 ALLOCATE (Yvec.elements, float, 8);38 SetVector (&Xvec, OPIHI_FLT, 8); 39 SetVector (&Yvec, OPIHI_FLT, 8); 40 40 41 41 while (gfits_fread_header (f, &header)) { … … 82 82 while (r > Rmid) r-= 360.0; 83 83 } 84 status |= fRD_to_XY (&Xvec.elements[2*j], &Yvec.elements[2*j], r, d, &graphmode.coords);84 status |= RD_to_XY (&Xvec.elements.Flt[2*j], &Yvec.elements.Flt[2*j], r, d, &graphmode.coords); 85 85 if (j > 0) { 86 Xvec.elements [2*j - 1] = Xvec.elements[2*j];87 Yvec.elements [2*j - 1] = Yvec.elements[2*j];86 Xvec.elements.Flt[2*j - 1] = Xvec.elements.Flt[2*j]; 87 Yvec.elements.Flt[2*j - 1] = Yvec.elements.Flt[2*j]; 88 88 } 89 89 } 90 Xvec.elements [7] = Xvec.elements[0];91 Yvec.elements [7] = Yvec.elements[0];90 Xvec.elements.Flt[7] = Xvec.elements.Flt[0]; 91 Yvec.elements.Flt[7] = Yvec.elements.Flt[0]; 92 92 InPic = FALSE; 93 93 for (j = 0; j < 8; j+=2) { 94 if ((Xvec.elements [j] >= graphmode.xmin) &&95 (Xvec.elements [j] <= graphmode.xmax) &&96 (Yvec.elements [j] >= graphmode.ymin) &&97 (Yvec.elements [j] <= graphmode.ymax))94 if ((Xvec.elements.Flt[j] >= graphmode.xmin) && 95 (Xvec.elements.Flt[j] <= graphmode.xmax) && 96 (Yvec.elements.Flt[j] >= graphmode.ymin) && 97 (Yvec.elements.Flt[j] <= graphmode.ymax)) 98 98 InPic = TRUE; 99 99 } 100 100 101 Xvec.Nelements = Xvec.Nelements = 8;101 Xvec.Nelements = Yvec.Nelements = 8; 102 102 if (InPic) { 103 103 graphmode.style = 2; /* points */ 104 104 graphmode.ptype = 100; /* connect pairs of points */ 105 105 graphmode.etype = 0; 106 PlotVectorPair (kapa, 8, Xvec.elements, Yvec.elements, &graphmode);106 PlotVectorPair (kapa, &Xvec, &Yvec, &graphmode); 107 107 } 108 108 skip: … … 112 112 } 113 113 fclose (f); 114 free (Xvec.elements );115 free (Yvec.elements );114 free (Xvec.elements.Flt); 115 free (Yvec.elements.Flt); 116 116 return (TRUE); 117 117
Note:
See TracChangeset
for help on using the changeset viewer.
