Main Page | Modules | File List | Related Pages

g2_FIG_P.h

00001 /*****************************************************************************
00002 **  This is part of the g2 library
00003 **  Copyright (C) 1998  Ljubomir Milanovic & Horst Wagner
00004 **
00005 **  This program is free software; you can redistribute it and/or modify
00006 **  it under the terms of the GNU General Public License (version 2) as
00007 **  published by the Free Software Foundation.
00008 **
00009 **  This program is distributed in the hope that it will be useful,
00010 **  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 **  GNU General Public License for more details.
00013 **
00014 **  You should have received a copy of the GNU General Public License
00015 **  along with this program; if not, write to the Free Software
00016 **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017 ******************************************************************************/
00018 #ifndef _G2_FIG_P_H
00019 #define _G2_FIG_P_H
00020 
00021 #include "g2_FIG.h"
00022 
00023 #include <stdio.h>
00024 
00025 typedef struct _g2_FIG_inks {
00026     unsigned char red;
00027     unsigned char green;
00028     unsigned char blue;
00029 } g2_FIG_inks;
00030 
00031 typedef struct _g2_FIG_device {
00032     FILE           *fp;           /* output file pointer */
00033     int            pen_color;     /* current pen */
00034     int            thickness;     /* line thickness */
00035     int            font_size;     /* font size */
00036     int            line_style;    /* line style according to fig format */
00037     int            style_val;     /* line style value acc. to fig format */
00038 
00039     g2_FIG_inks    inks[512];      /* 512 user defined colors */
00040     int            N_inks;         /* number of allocated colors */
00041     fpos_t         color_file_pos; /* file position of colors, ftell */
00042 } g2_FIG_device;
00043 
00044 
00045 
00046 int g2_FIG_write_file_header(g2_FIG_device *figd);
00047 int g2_FIG_delete(int pid, void *pdp);
00048 int g2_FIG_ink(int pid, void *pdp,
00049               double red, double green, double blue);
00050 int g2_FIG_pen(int pid, void *pdp, int color);
00051 int g2_FIG_set_background(int pid, void *pdp, int color);
00052 int g2_FIG_reset_palette(int pid, void *pdp);
00053 int g2_FIG_clear_palette(int pid, void *pdp);
00054 int g2_FIG_set_line_width(int pid, void *pdp, int w);
00055 int g2_FIG_set_dash(int pid, void *pdp, int N, int *data);
00056 int g2_FIG_set_font_size(int pid, void *pdp, int size);
00057 int g2_FIG_clear(int pid, void *pdp);
00058 int g2_FIG_flush(int pid, void *pdp);
00059 int g2_FIG_plot(int pid, void *pdp, int x, int y);
00060 int g2_FIG_line(int pid, void *pdp, int x1, int y1, int x2, int y2);
00061 int g2_FIG_poly_line(int pid, void *pdp, int N, int *points);
00062 int g2_FIG_polygon(int pid, void *pdp, int N, int *points);
00063 int g2_FIG_filled_polygon(int pid, void *pdp, int N, int *points);
00064 int g2_FIG_arc(int pid, void *pdp,
00065               int x, int y,
00066               int r1, int r2,
00067               double a1, double a2);
00068 int g2_FIG_filled_arc(int pid, void *pdp,
00069                      int x, int y,
00070                      int r1, int r2,
00071                      double a1, double a2);
00072 int g2_FIG_ellipse(int pid, void *pdp,
00073                   int x, int y,
00074                   int r1, int r2);
00075 int g2_FIG_filled_ellipse(int pid, void *pdp,
00076                          int x, int y,
00077                          int r1, int r2);
00078 int g2_FIG_draw_string(int pid, void *pdp,
00079                       int x, int y, const char *text);
00080 
00081 #endif /* _G2_FIG_P_H */
00082 

Generated on Thu Apr 8 23:32:49 2004 for g2 by doxygen 1.3.6