gerbv
2.10.1-dev~93f1b5
|
Go to the source code of this file.
This file contains high-level functions for the libgerbv library.
Definition in file gerbv.c.
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_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.
gboolean gerbv_endswith | ( | const char * | path, |
const char * | ext | ||
) |
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_open_layer_from_filename | ( | gerbv_project_t * | gerbvProject, |
const gchar * | filename | ||
) |
Open a file, parse the contents, and add a new layer to an existing project.
gerbvProject | the existing project to add the new layer to |
filename | the full pathname of the file to be parsed |
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_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.