Changeset 5846 for trunk/Ohana/src/opihi/cmd.astro/outline.c
- Timestamp:
- Dec 27, 2005, 5:06:32 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/cmd.astro/outline.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.astro/outline.c
r3693 r5846 145 145 /* code to draw dots on Ximage */ 146 146 { 147 char *buffer, *line; 148 int Nline, Nimage, Ximage; 147 int Nimage, Ximage; 149 148 float xp, yp, x, y; 150 149 float dx, dy, theta, t, dt; 150 int Noverlay, NOVERLAY; 151 KiiOverlay *overlay; 151 152 152 153 Nimage = -1; 153 154 if (!GetImage (&Ximage, &Nimage)) return (FALSE); 154 155 155 ALLOCATE (buffer, char, 65536); /* space for 512 lines of 128 bytes */ 156 bzero (buffer, 65536); 157 ALLOCATE (line, char, 1024); /* space to read the file */ 158 Nline = 0; 159 160 SendGraphCommand (Ximage, 4, "LOAD"); 161 SendGraphCommand (Ximage, 16, "OVER %9d ", 0); 162 156 Noverlay = 0; 157 NOVERLAY = 1000; 158 ALLOCATE (overlay, KiiOverlay, Noverlay); 159 163 160 dx = par[2]; 164 161 dy = par[3]; … … 173 170 y = xp * sin (theta * RAD_DEG) + yp * cos (theta * RAD_DEG) + par[1]; 174 171 175 sprintf (&buffer[Nline*128], "%15s %20.10f %20.10f %20.10f %20.10f ", "BOX", x, y, 1.0, 1.0); 176 Nline ++; 177 178 if (Nline >= 510) { 179 SendGraphCommand (Ximage, 16, "NLINES %7d ", Nline); 180 write (Ximage, buffer, Nline*128); 181 bzero (buffer, 65536); 182 Nline = 0; 183 } 184 } 185 186 SendGraphCommand (Ximage, 16, "NLINES %7d ", Nline); 187 write (Ximage, buffer, Nline*128); 188 SendGraphCommand (Ximage, 16, "DONE"); 189 190 free (buffer); 191 free (line); 192 172 overlay[Noverlay].type = KII_OVERLAY_BOX; 173 overlay[Noverlay].x = x; 174 overlay[Noverlay].y = y; 175 overlay[Noverlay].dx = 1.0; 176 overlay[Noverlay].dy = 1.0; 177 178 Noverlay ++; 179 CHECK_REALLOCATE (overlay, KiiOverlay, NOVERLAY, Noverlay, 1000); 180 } 181 KiiLoadOverlay (Ximage, overlay, Noverlay, "red"); 182 free (overlay); 193 183 } 194 184
Note:
See TracChangeset
for help on using the changeset viewer.
