Changeset 7399
- Timestamp:
- Jun 7, 2006, 8:27:02 AM (20 years ago)
- Location:
- trunk/Ohana/src/libkapa
- Files:
-
- 2 edited
-
include/kapa.h (modified) (1 diff)
-
src/KapaWindow.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libkapa/include/kapa.h
r7080 r7399 113 113 int KapaBox (int fd, Graphdata *graphdata); 114 114 int KapaClear (int fd, int ClearSection); 115 int KapaInitGraph (Graphdata *graphdata); 116 int KapaPrepPlot (int fd, int Npts, Graphdata *graphmode); 117 int KapaPlotVector (int fd, int Npts, float *values); 115 118 int KapaSetFont (int fd, char *name, int size); 116 119 int KapaSendLabel (int fd, char *string, int mode); -
trunk/Ohana/src/libkapa/src/KapaWindow.c
r6232 r7399 33 33 KiiSendCommand (fd, 4, "ERAS"); 34 34 } 35 return (TRUE); 36 } 37 38 int KapaInitGraph (Graphdata *graphdata) { 39 40 graphdata[0].xmin = graphdata[0].ymin = 0.0; 41 graphdata[0].xmax = graphdata[0].ymax = 1.0; 42 graphdata[0].style = graphdata[0].ptype = 0; 43 graphdata[0].ltype = graphdata[0].color = 0; 44 graphdata[0].etype = graphdata[0].ebar = 0; 45 graphdata[0].lweight = graphdata[0].size = 1.0; 46 47 graphdata[0].coords.pc1_1 = graphdata[0].coords.pc2_2 = 1.0; 48 graphdata[0].coords.pc1_2 = graphdata[0].coords.pc2_1 = 0.0; 49 strcpy (graphdata[0].coords.ctype, "RA---LIN"); 50 graphdata[0].coords.crval1 = 0.0; 51 graphdata[0].coords.crval2 = 0.0; 52 graphdata[0].coords.crpix1 = 0.0; 53 graphdata[0].coords.crpix2 = 0.0; 54 graphdata[0].coords.cdelt1 = graphdata[0].coords.cdelt2 = 1.0; 55 graphdata[0].flipeast = TRUE; 56 graphdata[0].flipnorth = FALSE; 57 strcpy (graphdata[0].axis, "2222"); 58 strcpy (graphdata[0].ticks, "2222"); 59 strcpy (graphdata[0].labels, "2222"); 60 61 return (TRUE); 62 } 63 64 int KapaPrepPlot (int fd, int Npts, Graphdata *graphmode) { 65 66 /* tell kapa to look for the incoming image */ 67 KiiSendCommand (fd, 4, "PLOT"); 68 69 /* send Xgraph the plot details */ 70 KiiSendMessage (fd, "%8d %8d %d %d %d %d %d %f %f", 71 Npts, graphmode[0].style, 72 graphmode[0].ptype, graphmode[0].ltype, 73 graphmode[0].etype, graphmode[0].ebar, graphmode[0].color, 74 graphmode[0].lweight, graphmode[0].size); 75 KiiSendMessage (fd, "%g %g %g %g", 76 graphmode[0].xmin, graphmode[0].xmax, 77 graphmode[0].ymin, graphmode[0].ymax); 78 return (TRUE); 79 } 80 81 int KapaPlotVector (int fd, int Npts, float *values) { 82 83 int Nbytes; 84 85 Nbytes = Npts * sizeof (float); 86 write (fd, values, Nbytes); 35 87 return (TRUE); 36 88 }
Note:
See TracChangeset
for help on using the changeset viewer.
