gerbv
2.6A
|
Go to the source code of this file.
This file contains general files for handling the gerbv_image_t structure.
Definition in file gerb_image.c.
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().
void gerbv_destroy_image | ( | gerbv_image_t * | image | ) |
Free an image structure.
image | the image to free |
Definition at line 109 of file gerb_image.c.
References gerbv_image_t::amacro, gerbv_image_t::aperture, gerbv_net::cirseg, gerbv_image_t::drill_stats, gerbv_image_t::format, gerbv_drill_stats_destroy(), gerbv_image_t::gerbv_stats, gerbv_stats_destroy(), gerbv_image_t::info, gerbv_net::label, gerbv_image_t::layers, gerbv_image_t::netlist, gerbv_layer_t::next, gerbv_netstate_t::next, gerbv_net::next, and gerbv_image_t::states.
Referenced by gerbv_create_image(), gerbv_destroy_fileinfo(), gerbv_export_drill_file_from_image(), and gerbv_export_rs274x_file_from_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 562 of file gerb_image.c.
References gerbv_image_t::aperture, gerbv_image_t::layers, gerbv_image_t::netlist, gerbv_layer_t::next, gerbv_netstate_t::next, gerbv_net::next, and gerbv_image_t::states.
Referenced by merge_images().
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 752 of file gerb_image.c.
References gerbv_net::aperture, gerbv_net::aperture_state, gerbv_net::boundingBox, gerbv_net::cirseg, GERBV_APERTURE_STATE_ON, GERBV_INTERPOLATION_CCW_CIRCULAR, gerbv_net::interpolation, gerbv_net::start_x, gerbv_net::start_y, gerbv_net::stop_x, and gerbv_net::stop_y.
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 987 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 795 of file gerb_image.c.
References gerbv_net::aperture, gerbv_net::aperture_state, gerbv_net::boundingBox, GERBV_APERTURE_STATE_FLASH, GERBV_APERTURE_STATE_ON, GERBV_INTERPOLATION_LINEARx1, gerbv_net::interpolation, gerbv_net::start_x, gerbv_net::start_y, gerbv_net::stop_x, and gerbv_net::stop_y.
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 653 of file gerb_image.c.
References gerbv_net::aperture_state, gerbv_net::boundingBox, GERBV_APERTURE_STATE_OFF, GERBV_APERTURE_STATE_ON, GERBV_INTERPOLATION_LINEARx1, GERBV_INTERPOLATION_PAREA_END, GERBV_INTERPOLATION_PAREA_START, 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.
void gerbv_image_delete_net | ( | gerbv_net_t * | currentNet | ) |
Delete a net in an existing image.
currentNet | the net to delete |
Definition at line 606 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 524 of file gerb_image.c.
References gerbv_image_t::aperture, gerbv_create_image(), gerbv_image_t::info, gerbv_image_t::layers, gerbv_image_t::layertype, and gerbv_image_t::states.
Referenced by gerbv_export_drill_file_from_image(), gerbv_export_rs274x_file_from_image(), and merge_images().