Пример #1
0
void
hid_gerber_init ()
{
  memset (&gerber_hid, 0, sizeof (gerber_hid));

  common_nogui_init (&gerber_hid);
  common_draw_helpers_init (&gerber_hid);

  gerber_hid.struct_size         = sizeof (gerber_hid);
  gerber_hid.name                = "gerber";
  gerber_hid.description         = "RS-274X (Gerber) export";
  gerber_hid.exporter            = 1;

  gerber_hid.get_export_options  = gerber_get_export_options;
  gerber_hid.do_export           = gerber_do_export;
  gerber_hid.parse_arguments     = gerber_parse_arguments;
  gerber_hid.set_layer           = gerber_set_layer;
  gerber_hid.make_gc             = gerber_make_gc;
  gerber_hid.destroy_gc          = gerber_destroy_gc;
  gerber_hid.use_mask            = gerber_use_mask;
  gerber_hid.set_color           = gerber_set_color;
  gerber_hid.set_line_cap        = gerber_set_line_cap;
  gerber_hid.set_line_width      = gerber_set_line_width;
  gerber_hid.set_draw_xor        = gerber_set_draw_xor;
  gerber_hid.draw_line           = gerber_draw_line;
  gerber_hid.draw_arc            = gerber_draw_arc;
  gerber_hid.draw_rect           = gerber_draw_rect;
  gerber_hid.fill_circle         = gerber_fill_circle;
  gerber_hid.fill_polygon        = gerber_fill_polygon;
  gerber_hid.fill_rect           = gerber_fill_rect;
  gerber_hid.calibrate           = gerber_calibrate;
  gerber_hid.set_crosshair       = gerber_set_crosshair;

  hid_register_hid (&gerber_hid);
}
Пример #2
0
void
hid_batch_init ()
{
  memset (&batch_hid, 0, sizeof (HID));
  memset (&batch_graphics, 0, sizeof (HID_DRAW));

  common_nogui_init (&batch_hid);
  common_draw_helpers_init (&batch_graphics);

  batch_hid.struct_size           = sizeof (HID);
  batch_hid.name                  = "batch";
  batch_hid.description           = "Batch-mode GUI for non-interactive use.";
  batch_hid.gui                   = 1;

  batch_hid.get_export_options    = batch_get_export_options;
  batch_hid.do_export             = batch_do_export;
  batch_hid.parse_arguments       = batch_parse_arguments;
  batch_hid.invalidate_lr         = batch_invalidate_lr;
  batch_hid.invalidate_all        = batch_invalidate_all;
  batch_hid.set_layer             = batch_set_layer;
  batch_hid.calibrate             = batch_calibrate;
  batch_hid.shift_is_pressed      = batch_shift_is_pressed;
  batch_hid.control_is_pressed    = batch_control_is_pressed;
  batch_hid.mod1_is_pressed       = batch_mod1_is_pressed;
  batch_hid.get_coords            = batch_get_coords;
  batch_hid.set_crosshair         = batch_set_crosshair;
  batch_hid.add_timer             = batch_add_timer;
  batch_hid.stop_timer            = batch_stop_timer;
  batch_hid.watch_file            = batch_watch_file;
  batch_hid.unwatch_file          = batch_unwatch_file;
  batch_hid.add_block_hook        = batch_add_block_hook;
  batch_hid.stop_block_hook       = batch_stop_block_hook;
  batch_hid.attribute_dialog      = batch_attribute_dialog;
  batch_hid.show_item             = batch_show_item;

  batch_hid.graphics              = &batch_graphics;

  batch_graphics.make_gc          = batch_make_gc;
  batch_graphics.destroy_gc       = batch_destroy_gc;
  batch_graphics.use_mask         = batch_use_mask;
  batch_graphics.set_color        = batch_set_color;
  batch_graphics.set_line_cap     = batch_set_line_cap;
  batch_graphics.set_line_width   = batch_set_line_width;
  batch_graphics.set_draw_xor     = batch_set_draw_xor;
  batch_graphics.draw_line        = batch_draw_line;
  batch_graphics.draw_arc         = batch_draw_arc;
  batch_graphics.draw_rect        = batch_draw_rect;
  batch_graphics.fill_circle      = batch_fill_circle;
  batch_graphics.fill_polygon     = batch_fill_polygon;
  batch_graphics.fill_rect        = batch_fill_rect;

  hid_register_hid (&batch_hid);
#include "batch_lists.h"
}