aboutsummaryrefslogtreecommitdiffstats
path: root/src/fish.h
diff options
context:
space:
mode:
authorroot <>2009-02-08 16:49:14 +0000
committerroot <>2009-02-08 16:49:14 +0000
commit8646c6b2ddaf32ac7342cc8b61e559d46885af4f (patch)
tree226d8347d9c674ed6f2d0a185b904e5f57037c42 /src/fish.h
parent5d3e093d432a31fb8a8267cbf30f1ed892f49508 (diff)
downloadlibjwg-8646c6b2ddaf32ac7342cc8b61e559d46885af4f.tar.gz
libjwg-8646c6b2ddaf32ac7342cc8b61e559d46885af4f.tar.bz2
libjwg-8646c6b2ddaf32ac7342cc8b61e559d46885af4f.zip
*** empty log message ***
Diffstat (limited to 'src/fish.h')
-rw-r--r--src/fish.h102
1 files changed, 102 insertions, 0 deletions
diff --git a/src/fish.h b/src/fish.h
new file mode 100644
index 0000000..1a7a874
--- /dev/null
+++ b/src/fish.h
@@ -0,0 +1,102 @@
+#include <string.h>
+
+typedef struct {
+ float x,y;
+} Jwgpos;
+
+typedef struct {
+ Jwgpos *data;
+ int npts;
+} Jwgline;
+
+
+
+typedef struct {
+ float xc,yc;
+ float a,b,c,d;
+ float det;
+} Transform;
+
+BEGIN_OBJECT(Data)
+ int w,h;
+ int l;
+ float *data;
+END_OBJECT(Data);
+
+extern void Data_Destructor(Data);
+
+CREATOR(Data)=Obj_DefaultCreator;
+DESTRUCTOR(Data)=Data_Destructor;
+
+typedef struct {
+ float r,g,b;
+} Color;
+
+typedef struct {
+ float width;
+ Color color;
+} Pen;
+
+typedef struct {
+ float density;
+ Color color;
+} Brush;
+
+typedef struct {
+ int font;
+ Color color;
+ float height;
+} Ink;
+
+
+#define JWG_FM_XFIG 0
+#define JWG_FM_CGM 1
+
+#define JWG_DEFAULT_LINE_SIZE 4096
+
+BEGIN_OBJECT(Handle)
+ int serial;
+
+ struct Handle_struct *stack;
+
+ Data data;
+ Transform transform;
+
+ Brush brush;
+ Pen pen;
+ Ink ink;
+
+ int format;
+ FILE *file;
+
+ Jwgline current_line;
+ int current_line_size;
+
+ void *private;
+END_OBJECT(Handle)
+
+extern void Handle_Destructor(Handle);
+
+CREATOR(Handle)=Obj_DefaultCreator;
+DESTRUCTOR(Handle)=Handle_Destructor;
+
+extern void jwg_xform(Handle,Jwgpos *);
+extern void jwg_write_line(Handle,Jwgline *);
+extern void jwg_write_polygon(Handle,Jwgline *);
+
+extern float jwg_decompose_matrix(Transform,int);
+
+
+extern int jwg_create_handle(int *,char *,int);
+extern void jwg_pass_data(int *,float *,int *,int *,int *);
+extern void jwg_destory_data(int *);
+extern void jwg_set_xform(int *,float *,float *,float *,float *, float *, float *);
+extern void jwg_set_brush(int *, float *,float *,float *,float *);
+extern void jwg_set_pen(int *, float *,float *,float *,float *);
+extern void jwg_set_textcolor(int *,float *,float *,float *);
+extern void jwg_set_textheight(int *,float *);
+extern void jwg_draw_text(int *,float *,float *,char *,int);
+extern void jwg_contour(int *, float *,int *,int *);
+extern void jwg_draw_line(int *,float *,float *,int *);
+extern void jwg_draw_polygon(int *,float *,float *,int *);
+extern void jwg_destroy_handle(int *);