Changeset 14500 for trunk/Ohana/src/kapa2
- Timestamp:
- Aug 15, 2007, 9:10:13 AM (19 years ago)
- Location:
- trunk/Ohana/src/kapa2
- Files:
-
- 4 edited
-
include/prototypes.h (modified) (1 diff)
-
src/CheckPipe.c (modified) (1 diff)
-
src/SetImageData.c (modified) (1 diff)
-
src/SetImageSize.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/kapa2/include/prototypes.h
r13479 r14500 67 67 int SetImageData PROTO((int sock)); 68 68 int GetImageData PROTO((int sock)); 69 int SetImageCoords PROTO((int sock)); 70 int GetImageCoords PROTO((int sock)); 71 int GetImageRange PROTO((int sock)); 69 72 70 73 int LoadVectorData PROTO((int sock, KapaGraphWidget *graph, int N, char *type)); -
trunk/Ohana/src/kapa2/src/CheckPipe.c
r13899 r14500 155 155 } 156 156 157 if (!strcmp (word, "SIMC")) { 158 SetImageCoords (sock); 159 KiiSendCommand (sock, 4, "DONE"); 160 FINISHED (TRUE); 161 } 162 163 if (!strcmp (word, "GIMC")) { 164 GetImageCoords (sock); 165 KiiSendCommand (sock, 4, "DONE"); 166 FINISHED (TRUE); 167 } 168 169 if (!strcmp (word, "GIMR")) { 170 GetImageRange (sock); 171 KiiSendCommand (sock, 4, "DONE"); 172 FINISHED (TRUE); 173 } 174 157 175 if (!strcmp (word, "GIMD")) { 158 176 GetImageData (sock); -
trunk/Ohana/src/kapa2/src/SetImageData.c
r13479 r14500 52 52 return (TRUE); 53 53 } 54 55 int SetImageCoords (int sock) { 56 57 int i; 58 double xmin, xmax, ymin, ymax; 59 Graphic *graphic; 60 Section *section; 61 KapaImageWidget *image; 62 63 graphic = GetGraphic(); 64 65 section = GetActiveSection(); 66 if (section->image == NULL) { 67 section->image = InitImage (); 68 SetSectionSizes (section); 69 } 70 image = section->image; 71 72 KiiScanMessage (sock, "%f %f %f %f", 73 &image[0].coords.pc1_1, &image[0].coords.pc2_2, 74 &image[0].coords.pc1_2, &image[0].coords.pc2_1); 75 76 KiiScanMessage (sock, "%s", image[0].coords.ctype); 77 78 KiiScanMessage (sock, "%lf %lf %f %f %f %f", 79 &image[0].coords.crval1, 80 &image[0].coords.crval2, 81 &image[0].coords.crpix1, 82 &image[0].coords.crpix2, 83 &image[0].coords.cdelt1, 84 &image[0].coords.cdelt2); 85 86 return (TRUE); 87 } 88 89 int GetImageCoords (int sock) { 90 91 Section *section; 92 KapaImageWidget *image; 93 94 section = GetActiveSection(); 95 if (section->image == NULL) { 96 section->image = InitImage (); 97 SetSectionSizes (section); 98 } 99 image = section->image; 100 101 KiiSendMessage (sock, "%g %g %g %g", 102 image[0].coords.pc1_1, image[0].coords.pc2_2, 103 image[0].coords.pc1_2, image[0].coords.pc2_1); 104 105 KiiSendMessage (sock, "%s", image[0].coords.ctype); 106 107 KiiSendMessage (sock, "%g %g %g %g %g %g", 108 image[0].coords.crval1, 109 image[0].coords.crval2, 110 image[0].coords.crpix1, 111 image[0].coords.crpix2, 112 image[0].coords.cdelt1, 113 image[0].coords.cdelt2); 114 115 return (TRUE); 116 } 117 118 int GetImageRange (int sock) { 119 120 Section *section; 121 KapaImageWidget *image; 122 double Xmin, Xmax, Ymin, Ymax; 123 124 section = GetActiveSection(); 125 if (section->image == NULL) { 126 section->image = InitImage (); 127 SetSectionSizes (section); 128 } 129 image = section->image; 130 131 Screen_to_Image (&Xmin, &Ymin, 0.0, 0.0, image); 132 Screen_to_Image (&Xmax, &Ymax, image[0].picture.dx, image[0].picture.dy, image); 133 134 KiiSendMessage (sock, "%g %g %g %g", Xmin, Xmax, Ymin, Ymax); 135 136 return (TRUE); 137 } 138 -
trunk/Ohana/src/kapa2/src/SetImageSize.c
r13479 r14500 77 77 image[0].text_dx = ZOOM_X; 78 78 image[0].text_dy = 6*textpad + 7*PAD1; 79 image[0].text_dyo = 3*textpad + 4*PAD1; 79 80 80 81 image[0].overlay_button[0].x = image[0].text_x; … … 144 145 image[0].text_dx = ZOOM_X; 145 146 image[0].text_dy = 6*textpad + 7*PAD1; 147 image[0].text_dyo = 3*textpad + 4*PAD1; 146 148 147 149 image[0].overlay_button[0].x = image[0].text_x; … … 209 211 image[0].text_dx = ZOOM_X; 210 212 image[0].text_dy = 6*textpad + 7*PAD1; 213 image[0].text_dyo = 3*textpad + 4*PAD1; 211 214 212 215 image[0].overlay_button[0].x = image[0].text_x; … … 274 277 image[0].text_dx = ZOOM_X; 275 278 image[0].text_dy = 6*textpad + 7*PAD1; 279 image[0].text_dyo = 3*textpad + 4*PAD1; 276 280 277 281 image[0].overlay_button[0].x = image[0].text_x;
Note:
See TracChangeset
for help on using the changeset viewer.
