64 #if defined(__cplusplus)
75 #include <gdk/gdkkeysyms.h>
77 #ifndef RENDER_USING_GDK
81 #define APERTURE_MIN 10
82 #define APERTURE_MAX 9999
89 #define APERTURE_PARAMETERS_MAX 102
90 #define INITIAL_SCALE 200
91 #define MAX_ERRMSGLEN 25
92 #define MAX_COORDLEN 28
93 #define MAX_DISTLEN 180
94 #define MAX_STATUSMSGLEN (MAX_ERRMSGLEN+MAX_COORDLEN+MAX_DISTLEN)
99 #define COORD2INS(c) (c)
100 #define COORD2MILS(c) ((c)*1000.0)
101 #define COORD2MMS(c) ((c)*25.4)
103 #define GERB_FATAL_ERROR(...) g_log(NULL, G_LOG_LEVEL_ERROR, __VA_ARGS__)
104 #define GERB_COMPILE_ERROR(...) g_log(NULL, G_LOG_LEVEL_CRITICAL, __VA_ARGS__)
105 #define GERB_COMPILE_WARNING(...) g_log(NULL, G_LOG_LEVEL_WARNING, __VA_ARGS__)
106 #define GERB_MESSAGE(...) g_log(NULL, G_LOG_LEVEL_MESSAGE, __VA_ARGS__)
189 typedef enum {GERBV_ENCODING_NONE,
190 GERBV_ENCODING_ASCII,
191 GERBV_ENCODING_EBCDIC,
193 GERBV_ENCODING_ISO_ASCII,
205 typedef enum {GERBV_KNOCKOUT_TYPE_NOKNOCKOUT,
206 GERBV_KNOCKOUT_TYPE_FIXEDKNOCK,
207 GERBV_KNOCKOUT_TYPE_BORDER
208 } gerbv_knockout_type_t;
210 typedef enum {GERBV_MIRROR_STATE_NOMIRROR,
211 GERBV_MIRROR_STATE_FLIPA,
212 GERBV_MIRROR_STATE_FLIPB,
213 GERBV_MIRROR_STATE_FLIPAB
214 } gerbv_mirror_state_t;
216 typedef enum {GERBV_AXIS_SELECT_NOSELECT,
217 GERBV_AXIS_SELECT_SWAPAB
218 } gerbv_axis_select_t;
220 typedef enum {GERBV_JUSTIFY_NOJUSTIFY,
221 GERBV_JUSTIFY_LOWERLEFT,
222 GERBV_JUSTIFY_CENTERJUSTIFY
223 } gerbv_image_justify_type_t;
255 } gerbv_HID_Attr_Val;
261 { HID_Label, HID_Integer, HID_Real, HID_String,
262 HID_Boolean, HID_Enum, HID_Mixed, HID_Path
264 int min_val, max_val;
265 gerbv_HID_Attr_Val default_val;
266 const char **enumerations;
275 } gerbv_HID_Attribute;
286 typedef struct instruction {
292 struct instruction *next;
293 } gerbv_instruction_t;
295 typedef struct amacro {
297 gerbv_instruction_t *program;
298 unsigned int nuf_push;
302 typedef struct gerbv_simplified_amacro {
304 double parameter[APERTURE_PARAMETERS_MAX];
305 struct gerbv_simplified_amacro *next;
306 } gerbv_simplified_amacro_t;
308 typedef struct gerbv_aperture {
310 gerbv_amacro_t *amacro;
311 gerbv_simplified_amacro_t *simplified;
312 double parameter[APERTURE_PARAMETERS_MAX];
319 typedef struct gerbv_aperture_list {
325 struct gerbv_aperture_list *next;
326 } gerbv_aperture_list_t;
331 gerbv_aperture_list_t *aperture_list;
332 gerbv_aperture_list_t *D_code_list;
438 } gerbv_selection_item_t;
447 GArray *selectedNodeArray;
471 typedef struct gerbv_cirseg {
480 typedef struct gerbv_step_and_repeat {
485 } gerbv_step_and_repeat_t;
488 gboolean firstInstance;
489 gerbv_knockout_type_t type;
563 gerbv_encoding_t encoding;
564 double imageRotation;
565 gerbv_image_justify_type_t imageJustifyTypeA;
566 gerbv_image_justify_type_t imageJustifyTypeB;
567 gdouble imageJustifyOffsetA;
568 gdouble imageJustifyOffsetB;
569 gdouble imageJustifyOffsetActualA;
570 gdouble imageJustifyOffsetActualB;
581 gerbv_HID_Attribute *attr_list;
588 gerbv_aperture_t *aperture[APERTURE_MAX];
682 gerbv_image_delete_selected_nets (
gerbv_image_t *sourceImage, GArray *selectedNodeArray);
685 gerbv_image_reduce_area_of_selected_objects (GArray *selectionArray, gdouble areaReduction, gint paneRows,
686 gint paneColumns, gdouble paneSeparation);
689 gerbv_image_move_selected_objects (GArray *selectionArray, gdouble translationX,
690 gdouble translationY);
728 gerbv_save_layer_from_index(
gerbv_project_t *gerbvProject, gint index, gchar *filename);
743 gerbv_change_layer_order(
gerbv_project_t *gerbvProject, gint oldPosition, gint newPosition);
747 gchar *filename, gchar *baseName,
int idx,
int reload);
749 gerbv_open_image(
gerbv_project_t *gerbvProject,
char *filename,
int idx,
int reload,
750 gerbv_HID_Attribute *fattr,
int n_fattr, gboolean forceLoadFile);
765 gerbv_render_to_pixmap_using_gdk (
gerbv_project_t *gerbvProject, GdkPixmap *pixmap,
767 GdkColor *selectionColor);
769 #ifndef RENDER_USING_GDK
771 gerbv_render_all_layers_to_cairo_target_for_vector_output (
gerbv_project_t *gerbvProject,
775 gerbv_render_all_layers_to_cairo_target (
gerbv_project_t *gerbvProject, cairo_t *cr,
786 gerbv_render_cairo_set_scale_and_translation(cairo_t *cr,
gerbv_render_info_t *renderInfo);
793 gerbv_get_tool_diameter(
int toolNumber
797 gerbv_process_tools_file(
const char *toolFileName
806 gchar
const* filename
814 gchar
const* filename
821 gchar
const* filename
829 gchar
const* filename
836 gchar
const* filename
844 gchar
const* filename
851 gchar
const* filename
859 gchar
const* filename
954 gerbv_attribute_destroy_HID_attribute (gerbv_HID_Attribute *attributeList,
int n_attr);
956 gerbv_HID_Attribute *
957 gerbv_attribute_dup (gerbv_HID_Attribute *,
int);
959 #if defined(__cplusplus)