* change pointer tool to default, since it now actually does something
[geda-gerbv.git] / src / gerber.h
blob98f9ec8a1cd438cb4bdffe614a0fb4eb24a5b04f
1 /*
2 * gEDA - GNU Electronic Design Automation
3 * This files is a part of gerbv.
5 * Copyright (C) 2000-2002 Stefan Petersen (spe@stacken.kth.se)
7 * $Id$
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
24 /** \file gerber.h
25 \brief Header info for the RS274X parsing functions
26 \ingroup libgerbv
29 #ifndef GERBER_H
30 #define GERBER_H
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
36 #include <stdio.h>
37 #include <glib.h>
39 #include "gerb_file.h"
41 typedef struct gerb_state {
42 int curr_x;
43 int curr_y;
44 int prev_x;
45 int prev_y;
46 int delta_cp_x;
47 int delta_cp_y;
48 int curr_aperture;
49 int changed;
50 gerbv_aperture_state_t aperture_state;
51 gerbv_interpolation_t interpolation;
52 gerbv_interpolation_t prev_interpolation;
53 gerbv_net_t *parea_start_node;
54 gerbv_layer_t *layer;
55 gerbv_netstate_t *state;
56 int in_parea_fill;
57 int mq_on;
58 } gerb_state_t;
61 * parse gerber file pointed to by fd
63 gerbv_image_t *parse_gerb(gerb_file_t *fd, gchar *directoryPath);
64 gboolean gerber_is_rs274x_p(gerb_file_t *fd, gboolean *returnFoundBinary);
65 gboolean gerber_is_rs274d_p(gerb_file_t *fd);
66 gerbv_net_t *
67 gerber_create_new_net (gerbv_net_t *currentNet, gerbv_layer_t *layer, gerbv_netstate_t *state);
69 gboolean
70 gerber_create_new_aperture (gerbv_image_t *image, int *indexNumber,
71 gerbv_aperture_type_t apertureType, gdouble parameter1, gdouble parameter2);
72 #ifdef __cplusplus
74 #endif
76 #endif /* GERBER_H */