| gerbv
    2.10.1-dev~180c67
    | 
Go to the source code of this file.
| Data Structures | |
| struct | error_list | 
| struct | gerbv_stats_t | 
| struct | drill_list | 
| struct | gerbv_drill_stats_t | 
| struct | gerbv_selection_info_t | 
| struct | gerbv_user_transformation_t | 
| struct | gerbv_render_size_t | 
| struct | gerbv_layer_t | 
| struct | gerbv_netstate_t | 
| struct | gerbv_net | 
| struct | gerbv_format | 
| struct | gerbv_image_info | 
| struct | gerbv_image_t | 
| struct | gerbv_fileinfo_t | 
| struct | gerbv_project_t | 
| struct | gerbv_layer_color | 
| struct | gerbv_render_info_t | 
| Typedefs | |
| typedef struct error_list | gerbv_error_list_t | 
| typedef struct drill_list | gerbv_drill_list_t | 
| typedef struct gerbv_net | gerbv_net_t | 
| typedef struct gerbv_format | gerbv_format_t | 
| typedef struct gerbv_image_info | gerbv_image_info_t | 
The main header file for the libgerbv library.
Definition in file gerbv.h.
| typedef struct drill_list gerbv_drill_list_t | 
Linked list of drills found in active layers. Used in reporting statistics
| typedef struct error_list gerbv_error_list_t | 
A linked list of errors found in the files
| typedef struct gerbv_format gerbv_format_t | 
Struct holding info about interpreting the Gerber files read e.g. leading zeros, etc. 
 
| typedef struct gerbv_image_info gerbv_image_info_t | 
Struct holding info about a particular image
| typedef struct gerbv_net gerbv_net_t | 
The structure used to hold a geometric entity (line/polygon/etc)
The different aperture types available. Please keep these in sync with the aperture names defined in gerbv_aperture_type_name() in gerbv.c
| enum gerbv_coordinate_t | 
The interpolation methods available. Please keep these in sync with the interpolation names defined in gerbv_interpolation_name() in gerbv.c
| enum gerbv_layertype_t | 
The different layer types used
| enum gerbv_message_type_t | 
The different message types used in libgerbv
| enum gerbv_omit_zeros_t | 
The decimal point parsing style used
| enum gerbv_opcodes_t | 
The aperture macro commands
| enum gerbv_polarity_t | 
The different drawing polarities available
| enum gerbv_render_types_t | 
The different rendering modes available to libgerbv
| enum gerbv_selection_t | 
| enum gerbv_unit_t | 
| gerbv_image_t* gerbv_create_image | ( | gerbv_image_t * | image, | 
| const gchar * | type | ||
| ) | 
Allocate a new gerbv_image structure.
| image | the old image to free or NULL | 
| type | the type of image to create | 
Definition at line 46 of file gerb_image.c.
References gerbv_image_t::drill_stats, gerbv_destroy_image(), GERBV_POLARITY_DARK, gerbv_image_t::gerbv_stats, gerbv_image_t::info, gerbv_net::layer, gerbv_image_t::layers, gerbv_image_t::netlist, gerbv_layer_t::polarity, gerbv_netstate_t::scaleA, gerbv_netstate_t::scaleB, gerbv_net::state, gerbv_image_t::states, and gerbv_layer_t::stepAndRepeat.
Referenced by gerbv_image_duplicate_image(), and parse_gerb().
| gerbv_image_t* gerbv_create_rs274x_image_from_filename | ( | const gchar * | filename | ) | 
Parse a RS274X file and return the parsed image.
| filename | the filename of the file to be parsed | 
| void gerbv_destroy_fileinfo | ( | gerbv_fileinfo_t * | fileInfo | ) | 
Free a fileinfo structure.
| fileInfo | the fileinfo to free | 
Definition at line 203 of file gerbv.c.
References gerbv_fileinfo_t::fullPathname, gerbv_destroy_image(), gerbv_fileinfo_t::image, gerbv_fileinfo_t::name, and gerbv_fileinfo_t::privateRenderData.
Referenced by gerbv_destroy_project().
| void gerbv_destroy_image | ( | gerbv_image_t * | image | ) | 
Free an image structure.
| image | the image to free | 
Definition at line 104 of file gerb_image.c.
References gerbv_image_t::amacro, gerbv_image_t::aperture, and gerbv_netstate_t::next.
Referenced by gerbv_create_image(), and gerbv_destroy_fileinfo().
| void gerbv_destroy_project | ( | gerbv_project_t * | gerbvProject | ) | 
Free a project and all related variables.
| gerbvProject | the project to destroy | 
Definition at line 181 of file gerbv.c.
References gerbv_project_t::execname, gerbv_project_t::execpath, gerbv_project_t::file, gerbv_destroy_fileinfo(), gerbv_project_t::last_loaded, gerbv_project_t::path, and gerbv_project_t::project.
| void gerbv_drill_stats_add_layer | ( | gerbv_drill_stats_t * | accum_stats, | 
| gerbv_drill_stats_t * | input_stats, | ||
| int | this_layer | ||
| ) | 
Add stats gathered from specified layer to accumulatedd drill stats compiled from all layers
Definition at line 111 of file drill_stats.c.
Referenced by generate_drill_analysis().
| void gerbv_drill_stats_destroy | ( | gerbv_drill_stats_t * | stats | ) | 
Free the memory for a drill stats struct
Definition at line 101 of file drill_stats.c.
| gerbv_drill_stats_t* gerbv_drill_stats_new | ( | void | ) | 
Allocates a new drill_stats structure.
Create new struct for holding drill stats
Definition at line 48 of file drill_stats.c.
Referenced by generate_drill_analysis().
| gboolean gerbv_endswith | ( | const char * | path, | 
| const char * | ext | ||
| ) | 
| gboolean gerbv_export_drill_file_from_image | ( | const gchar * | filename, | 
| gerbv_image_t * | image, | ||
| gerbv_user_transformation_t * | transform | ||
| ) | 
Export an image to a new file in Excellon drill format.
| filename | the filename for the new file | 
| image | the image to export | 
| transform | the transformation to apply before exporting | 
Definition at line 43 of file export-drill.c.
References gerbv_net::aperture, gerbv_image_t::aperture, gerbv_net::aperture_state, GERBV_APERTURE_STATE_FLASH, GERBV_APTYPE_CIRCLE, gerbv_image_duplicate_image(), gerbv_image_t::netlist, and gerbv_net::next.
| gboolean gerbv_export_dxf_file_from_image | ( | const gchar * | filename, | 
| gerbv_image_t * | image, | ||
| gerbv_user_transformation_t * | transform | ||
| ) | 
Export an image to a new file in DXF format.
| filename | the filename for the new file | 
| image | the image to export | 
| transform | the transformation to apply before exporting | 
Definition at line 77 of file export-dxf.cpp.
References gerbv_image_duplicate_image().
| gboolean gerbv_export_geda_pcb_file_from_image | ( | const gchar * | filename, | 
| gerbv_image_t * | image, | ||
| gerbv_user_transformation_t * | transform | ||
| ) | 
Export an image to a new file in gEDA PCB format.
| filename | the filename for the new file | 
| image | the image to export | 
| transform | the transformation to apply before exporting | 
Definition at line 101 of file export-geda-pcb.c.
References gerbv_net::aperture, gerbv_image_t::aperture, gerbv_net::aperture_state, GERBV_APERTURE_STATE_FLASH, GERBV_APTYPE_CIRCLE, gerbv_image_duplicate_image(), GERBV_INTERPOLATION_PAREA_END, GERBV_INTERPOLATION_PAREA_START, gerbv_image_t::info, gerbv_net::interpolation, gerbv_image_t::netlist, gerbv_net::next, gerbv_net::start_x, gerbv_net::start_y, gerbv_net::stop_x, and gerbv_net::stop_y.
| gboolean gerbv_export_isel_drill_file_from_image | ( | const gchar * | filename, | 
| gerbv_image_t * | image, | ||
| gerbv_user_transformation_t * | transform | ||
| ) | 
Export an image to a new file in ISEL NCP drill format.
| filename | the filename for the new file | 
| image | the image to export | 
| transform | the transformation to apply before exporting | 
Definition at line 48 of file export-isel-drill.c.
References gerbv_net::aperture, gerbv_image_t::aperture, gerbv_net::aperture_state, GERBV_APERTURE_STATE_FLASH, GERBV_APTYPE_CIRCLE, gerbv_image_duplicate_image(), gerbv_image_t::netlist, and gerbv_net::next.
| void gerbv_export_pdf_file_from_project | ( | gerbv_project_t * | gerbvProject, | 
| gerbv_render_info_t * | renderInfo, | ||
| const gchar * | filename | ||
| ) | 
Render a project to a PDF file using user-specified render info.
| gerbvProject | the project to render | 
| renderInfo | the render settings for the rendered image | 
| filename | the filename for the exported PDF file | 
Definition at line 110 of file export-image.c.
References gerbv_render_info_t::displayHeight, and gerbv_render_info_t::displayWidth.
| void gerbv_export_pdf_file_from_project_autoscaled | ( | gerbv_project_t * | gerbvProject, | 
| const gchar * | filename | ||
| ) | 
Render a project to a PDF file, autoscaling the layers to fit inside the specified image dimensions.
| gerbvProject | the project to render | 
| filename | the filename for the exported PDF file | 
Definition at line 104 of file export-image.c.
| void gerbv_export_png_file_from_project | ( | gerbv_project_t * | gerbvProject, | 
| gerbv_render_info_t * | renderInfo, | ||
| const gchar * | filename | ||
| ) | 
Render a project to a PNG file using user-specified render info.
| gerbvProject | the project to render | 
| renderInfo | the render settings for the rendered image | 
| filename | the filename for the exported PNG file | 
Definition at line 89 of file export-image.c.
References gerbv_render_info_t::displayHeight, and gerbv_render_info_t::displayWidth.
Referenced by gerbv_export_png_file_from_project_autoscaled().
| void gerbv_export_png_file_from_project_autoscaled | ( | gerbv_project_t * | gerbvProject, | 
| int | widthInPixels, | ||
| int | heightInPixels, | ||
| const gchar * | filename | ||
| ) | 
Render a project to a PNG file, autoscaling the layers to fit inside the specified image dimensions.
| gerbvProject | the project to render | 
| widthInPixels | the width of the rendered picture (in pixels) | 
| heightInPixels | the height of the rendered picture (in pixels) | 
| filename | the filename for the exported PNG file | 
Definition at line 77 of file export-image.c.
References gerbv_export_png_file_from_project(), GERBV_RENDER_TYPE_CAIRO_HIGH_QUALITY, and gerbv_render_zoom_to_fit_display().
| void gerbv_export_postscript_file_from_project | ( | gerbv_project_t * | gerbvProject, | 
| gerbv_render_info_t * | renderInfo, | ||
| const gchar * | filename | ||
| ) | 
Render a project to a Postscript file using user-specified render info.
| gerbvProject | the project to render | 
| renderInfo | the render settings for the rendered image | 
| filename | the filename for the exported Postscript file | 
Definition at line 125 of file export-image.c.
References gerbv_render_info_t::displayHeight, and gerbv_render_info_t::displayWidth.
| void gerbv_export_postscript_file_from_project_autoscaled | ( | gerbv_project_t * | gerbvProject, | 
| const gchar * | filename | ||
| ) | 
Render a project to a Postscript file, autoscaling the layers to fit inside the specified image dimensions.
| gerbvProject | the project to render | 
| filename | the filename for the exported Postscript file | 
Definition at line 119 of file export-image.c.
| gboolean gerbv_export_rs274x_file_from_image | ( | const gchar * | filename, | 
| gerbv_image_t * | image, | ||
| gerbv_user_transformation_t * | transform | ||
| ) | 
Export an image to a new file in RS274X format.
| filename | the filename for the new file | 
| image | the image to export | 
| transform | the transformation to apply before exporting | 
Definition at line 190 of file export-rs274x.c.
References gerbv_image_duplicate_image(), GERBV_POLARITY_CLEAR, gerbv_image_t::info, and gerbv_user_transformation_t::rotation.
| void gerbv_export_svg_file_from_project | ( | gerbv_project_t * | gerbvProject, | 
| gerbv_render_info_t * | renderInfo, | ||
| const gchar * | filename | ||
| ) | 
Render a project to a file using user-specified render info.
| gerbvProject | the project to render | 
| renderInfo | the render settings for the rendered image | 
| filename | the filename for the exported file | 
Definition at line 139 of file export-image.c.
References gerbv_render_info_t::displayHeight, and gerbv_render_info_t::displayWidth.
| void gerbv_export_svg_file_from_project_autoscaled | ( | gerbv_project_t * | gerbvProject, | 
| const gchar * | filename | ||
| ) | 
Render a project to a SVG file, autoscaling the layers to fit inside the specified image dimensions.
| gerbvProject | the project to render | 
| filename | the filename for the exported file | 
Definition at line 133 of file export-image.c.
| gerbv_fileinfo_t* gerbv_get_fileinfo_for_image | ( | const gerbv_image_t * | image, | 
| const gerbv_project_t * | project | ||
| ) | 
Return found fileinfo for image, or NULL
Definition at line 1018 of file gerbv.c.
References gerbv_project_t::file, gerbv_fileinfo_t::image, and gerbv_project_t::last_loaded.
Referenced by gerbv_transform_coord_for_image().
| void gerbv_image_copy_image | ( | gerbv_image_t * | sourceImage, | 
| gerbv_user_transformation_t * | transform, | ||
| gerbv_image_t * | destinationImage | ||
| ) | 
Copy an image into an existing image, effectively merging the two together.
| sourceImage | the source image | 
| transform | the transformation to apply to the new image, or NULL for none | 
| destinationImage | the destination image to copy to | 
Definition at line 854 of file gerb_image.c.
References gerbv_image_t::aperture.
| void gerbv_image_create_arc_object | ( | gerbv_image_t * | image, | 
| gdouble | centerX, | ||
| gdouble | centerY, | ||
| gdouble | radius, | ||
| gdouble | startAngle, | ||
| gdouble | endAngle, | ||
| gdouble | lineWidth, | ||
| gerbv_aperture_type_t | apertureType | ||
| ) | 
Draw an arc on the specified image.
| image | the image to draw to | 
| centerX | the center X coordinate | 
| centerY | the center Y coordinate | 
| radius | the arc radius | 
| startAngle | the start angle (in CCW degrees) | 
| endAngle | the start angle (in CCW degrees) | 
| lineWidth | the width of the line to draw | 
| apertureType | the type of aperture to use (e.g. CIRCLE) | 
Definition at line 1029 of file gerb_image.c.
| void gerbv_image_create_dummy_apertures | ( | gerbv_image_t * | parsed_image | ) | 
Create any missing apertures in the specified image.
| parsed_image | the image to repair | 
Definition at line 1276 of file gerb_image.c.
References gerbv_net::aperture, gerbv_image_t::aperture, GERBV_APTYPE_CIRCLE, gerbv_image_t::netlist, and gerbv_net::next.
| void gerbv_image_create_line_object | ( | gerbv_image_t * | image, | 
| gdouble | startX, | ||
| gdouble | startY, | ||
| gdouble | endX, | ||
| gdouble | endY, | ||
| gdouble | lineWidth, | ||
| gerbv_aperture_type_t | apertureType | ||
| ) | 
Draw a line on the specified image.
| image | the image to draw to | 
| startX | the starting X coordinate | 
| startY | the starting Y coordinate | 
| endX | the ending X coordinate | 
| endY | the ending Y coordinate | 
| lineWidth | the width of the line to draw | 
| apertureType | the type of aperture to use (e.g. CIRCLE) | 
Definition at line 1072 of file gerb_image.c.
| void gerbv_image_create_rectangle_object | ( | gerbv_image_t * | image, | 
| gdouble | coordinateX, | ||
| gdouble | coordinateY, | ||
| gdouble | width, | ||
| gdouble | height | ||
| ) | 
Draw a filled rectangle on the specified image.
| image | the image to draw to | 
| coordinateX | the X coordinate of the lower left corner | 
| coordinateY | the Y coordinate of the lower left corner | 
| width | the width of the drawn rectangle | 
| height | the height of the drawn rectangle | 
Definition at line 934 of file gerb_image.c.
References gerbv_image_t::netlist, and gerbv_net::next.
| void gerbv_image_delete_net | ( | gerbv_net_t * | currentNet | ) | 
Delete a net in an existing image.
| currentNet | the net to delete | 
Definition at line 904 of file gerb_image.c.
References gerbv_net::aperture, gerbv_net::aperture_state, GERBV_APERTURE_STATE_OFF, GERBV_INTERPOLATION_DELETED, GERBV_INTERPOLATION_PAREA_END, GERBV_INTERPOLATION_PAREA_START, gerbv_net::interpolation, and gerbv_net::next.
| gerbv_image_t* gerbv_image_duplicate_image | ( | gerbv_image_t * | sourceImage, | 
| gerbv_user_transformation_t * | transform | ||
| ) | 
Duplicate an existing image and return the new copy.
| sourceImage | the source image | 
| transform | the transformation to apply to the new image, or NULL for none | 
Definition at line 815 of file gerb_image.c.
References gerbv_create_image(), gerbv_image_t::info, and gerbv_image_t::layertype.
Referenced by gerbv_export_drill_file_from_image(), gerbv_export_dxf_file_from_image(), gerbv_export_geda_pcb_file_from_image(), gerbv_export_isel_drill_file_from_image(), and gerbv_export_rs274x_file_from_image().
| void gerbv_open_layer_from_filename | ( | gerbv_project_t * | gerbvProject, | 
| const gchar * | filename | ||
| ) | 
| void gerbv_open_layer_from_filename_with_color | ( | gerbv_project_t * | gerbvProject, | 
| const gchar * | filename, | ||
| guint16 | red, | ||
| guint16 | green, | ||
| guint16 | blue, | ||
| guint16 | alpha | ||
| ) | 
Open a file, parse the contents, and add a new layer to an existing project while setting the color of the layer.
| gerbvProject | the existing project to add the new layer to | 
| filename | the full pathname of the file to be parsed | 
| red | the value for the red color component | 
| green | the value for the green color component | 
| blue | the value for the blue color component | 
| alpha | the value for the alpha color component | 
| void gerbv_render_layer_to_cairo_target | ( | cairo_t * | cr, | 
| gerbv_fileinfo_t * | fileInfo, | ||
| gerbv_render_info_t * | renderInfo | ||
| ) | 
| void gerbv_render_zoom_to_fit_display | ( | gerbv_project_t * | gerbvProject, | 
| gerbv_render_info_t * | renderInfo | ||
| ) | 
Calculate the zoom and translations to fit the rendered scene inside the given scene size.
| gerbvProject | the project to use for calculating | 
| renderInfo | the scene render pointer (updates the values in this parameter) | 
Definition at line 683 of file gerbv.c.
Referenced by gerbv_export_png_file_from_project_autoscaled(), and open_files().
| 
 | inline | 
Rotate coordinate x and y buy angle in radians
Definition at line 1030 of file gerbv.c.
Referenced by gerbv_transform_coord().
| void gerbv_stats_add_layer | ( | gerbv_stats_t * | accum_stats, | 
| gerbv_stats_t * | input_stats, | ||
| int | this_layer | ||
| ) | 
Add stats gathered from specified layer to accumulated Gerber stats compiled from all layers
This fcn is called with a two gerbv_stats_t structs: accum_stats and input_stats. Accum_stats holds a list of stats accumulated for all layers. This will be reported in the report window. Input_stats holds a list of the stats for one particular layer to be added to the accumulated list. 
 
Definition at line 121 of file gerb_stats.c.
Referenced by generate_gerber_analysis().
| void gerbv_stats_destroy | ( | gerbv_stats_t * | stats | ) | 
Free the memory for a stats struct
Definition at line 104 of file gerb_stats.c.
| gerbv_stats_t* gerbv_stats_new | ( | void | ) | 
Allocates a new gerbv_stats structure.
Create new struct for holding Gerber stats
Definition at line 46 of file gerb_stats.c.
Referenced by generate_gerber_analysis(), and parse_gerb().
| void gerbv_transform_coord | ( | double * | x, | 
| double * | y, | ||
| const gerbv_user_transformation_t * | trans | ||
| ) | 
Transform coordinate x and y
Definition at line 1038 of file gerbv.c.
References gerbv_rotate_coord(), gerbv_user_transformation_t::mirrorAroundX, gerbv_user_transformation_t::mirrorAroundY, gerbv_user_transformation_t::rotation, gerbv_user_transformation_t::scaleX, gerbv_user_transformation_t::scaleY, gerbv_user_transformation_t::translateX, and gerbv_user_transformation_t::translateY.
Referenced by gerbv_transform_coord_for_image().
| int gerbv_transform_coord_for_image | ( | double * | x, | 
| double * | y, | ||
| const gerbv_image_t * | image, | ||
| const gerbv_project_t * | project | ||
| ) | 
Transform coordinate x and y for image in project
Definition at line 1056 of file gerbv.c.
References gerbv_get_fileinfo_for_image(), gerbv_transform_coord(), and gerbv_fileinfo_t::transform.