Changeset 5852 for trunk/Ohana/src/libkapa/include/kapa.h
- Timestamp:
- Dec 27, 2005, 3:23:01 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/libkapa/include/kapa.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libkapa/include/kapa.h
r5848 r5852 1 1 # ifndef KAPA_H 2 2 # define KAPA_H 3 4 # include <X11/Xlib.h> 5 # include <png.h> 3 6 4 7 typedef struct { … … 34 37 } KiiOverlayType; 35 38 39 typedef struct { 40 char *name; 41 float x; 42 float y; 43 float dx; 44 float dy; 45 } KapaSection; 46 47 typedef struct { 48 double xmin, xmax, ymin, ymax; 49 int style, ptype, ltype, etype, ebar, color; 50 double lweight, size; 51 Coords coords; 52 int flipeast, flipnorth; 53 char axis[8], labels[8], ticks[8]; 54 } Graphdata; 55 56 typedef struct { 57 int dx, dy, ascent; 58 unsigned char *bits; 59 } RotFont; 60 61 typedef struct { 62 RotFont *font; 63 char name[64]; 64 int size; 65 } FontSet; 66 67 typedef png_byte bDrawColor; 68 69 typedef struct { 70 int Nx, Ny; 71 bDrawColor **pixels; 72 } bDrawBuffer; 73 36 74 /* IOfuncs.c */ 37 75 int KiiSendMessage (int device, char *format, ...); 38 76 int KiiSendCommand (int device, int length, char *format, ...); 39 77 int KiiSendCommandV (int device, int length, char *format, va_list argp); 78 int KiiScanMessage (int device, char *format, ...); 79 int KiiSendData (int device, char *data, int Nbytes); 80 char *KiiRecvData (int device); 40 81 41 82 /* KiiOpen.c */ 42 83 int KiiOpen (char *kii_exec, char *name); 43 84 int KiiClose (int socket); 85 int KiiWait (char *sockpath); 44 86 45 87 /* KiiPicture.c */ 46 88 int KiiNewPicture1D (int fd, KiiImage *image, KiiDisplayMode *mode, Coords *coords); 47 89 int KiiNewPicture2D (int fd, KiiImage *image, KiiDisplayMode *mode, Coords *coords); 48 int KiiResize (int fd, int Nx, int Ny);49 int KiiCenter (int fd, double x, double y, int zoom);50 90 51 91 /* KiiOverlay.c */ … … 58 98 59 99 /* KiiConvert.c */ 60 int KiiJpeg (int fd, char *filename);61 100 int KiiPS (int fd, int scale, int raw, char *filename); 101 int KiiJPEG (int fd, char *filename); 102 int KapaPNG (int fd, char *filename); 103 int KapaPPM (int fd, char *filename); 62 104 63 105 /* KiiCursor.c */ … … 66 108 int KiiCursorRead (int fd, double *x, double *y, char *key); 67 109 110 /* KapaWindow.c */ 111 int KiiResize (int fd, int Nx, int Ny); 112 int KiiCenter (int fd, double x, double y, int zoom); 113 int KapaBox (int fd, Graphdata *graphdata); 114 int KapaClear (int fd, int ClearSection); 115 int KapaSetFont (int fd, char *name, int size); 116 int KapaSendLabel (int fd, char *string, int mode); 117 int KapaSendTextline (int fd, char *string, float x, float y, float angle); 118 int KapaSetLimits (int fd, Graphdata *graphmode); 119 int KapaSetSection (int fd, KapaSection *section); 120 int KapaSelectSection (int fd, char *name); 121 int KapaGetSection (int fd, char *name); 122 123 /* KapaColors */ 124 int KapaColorByName (char *name); 125 int KapaColormapSize (); 126 char *KapaColorRGBString (int N); 127 png_color *KapaPNGPalette (int *Npalette); 128 unsigned long *KapaX11colors (Display *display, Colormap colormap, unsigned long default_color, int *Ncolors); 129 130 /* RotFont.c */ 131 void InitRotFonts PROTO(()); 132 int SetRotFont PROTO((char *name, int size)); 133 char *GetRotFont PROTO((int *size)); 134 RotFont *GetRotFontData (double *scale); 135 int RotStrlen PROTO((char *c)); 136 137 /* DrawRotString.c */ 138 int DrawRotText PROTO((int x, int y, char *string, int pos, double angle)); 139 int DrawRotBitmap PROTO((int x, int y, int dx, int dy, unsigned char *bitmap, int mode, double angle, double scale)); 140 int DrawRotTextInit (Display *display, Window window, GC gc, unsigned long fore, unsigned long back); 141 142 143 /* PSRotFont.c */ 144 void PSRotText PROTO((FILE *f, int x, int y, char *string, int pos, double angle)); 145 void PSDumpRotSegment PROTO((FILE *f, char *segment, int *Nseg)); 146 void PSSetFont PROTO((FILE *f, char *name, int size)); 147 148 /* bDrawFuncs.c */ 149 bDrawBuffer *bDrawBufferCreate (int Nx, int Ny); 150 void bDrawBufferFree (bDrawBuffer *buffer); 151 void bDrawSetBuffer (bDrawBuffer *buffer); 152 void bDrawSetStyle (bDrawColor color, int lw, int lt); 153 void bDrawPoint (int x, int y); 154 void bDrawPointf (float x, float y); 155 156 void bDrawArc (double Xc, double Yc, double Xr, double Yr, double Ts, double Te); 157 void bDrawCircle (double Xc, double Yc, double radius); 158 void bDrawCircleFill (double xc, double yc, double radius); 159 160 void bDrawLine (double x1, double y1, double x2, double y2); 161 void bDrawLineWeight (int X1, int Y1, int X2, int Y2, int swapcoords); 162 void bDrawLineBresen (int X1, int Y1, int X2, int Y2, int swapcoords); 163 void bDrawLineHorizontal (int X1, int X2, int Y); 164 void bDrawLineVertical (int X, int Y1, int Y2); 165 166 void bDrawRectOpen (double x1, double y1, double x2, double y2); 167 void bDrawRectFill (double x1, double y1, double x2, double y2); 168 void bDrawTriOpen (double x1, double y1, double x2, double y2, double x3, double y3); 169 void bDrawTriFill (double x1, double y1, double x2, double y2, double x3, double y3); 170 171 /* bDrawRotFont.c */ 172 int bDrawRotText (int x, int y, char *string, int pos, double angle); 173 int bDrawRotBitmap (int x, int y, int dx, int dy, unsigned char *bitmap, int mode, double angle, double scale); 174 68 175 # endif
Note:
See TracChangeset
for help on using the changeset viewer.
