gerb_image.c File Reference


Detailed Description

This file contains general files for handling the gerbv_image_t structure.

Definition in file gerb_image.c.

Go to the source code of this file.

Functions

gerbv_image_tgerbv_create_image (gerbv_image_t *image, const gchar *type)
void gerbv_destroy_image (gerbv_image_t *image)
gerbv_image_tgerbv_image_duplicate_image (gerbv_image_t *sourceImage, gerbv_user_transformation_t *transform)
void gerbv_image_copy_image (gerbv_image_t *sourceImage, gerbv_user_transformation_t *transform, gerbv_image_t *destinationImage)
void gerbv_image_delete_net (gerbv_net_t *currentNet)
void gerbv_image_create_rectangle_object (gerbv_image_t *image, gdouble coordinateX, gdouble coordinateY, gdouble width, gdouble height)
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)
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)
gerbv_net_tgerbv_image_return_next_renderable_object (gerbv_net_t *oldNet)


Function Documentation

gerbv_image_t* gerbv_create_image ( gerbv_image_t image,
const gchar *  type 
)

Allocate a new gerbv_image structure.

Returns:
the newly created image
Parameters:
image  the old image to free or NULL
type  the type of image to create
Examples:
example5.c.

Definition at line 49 of file gerb_image.c.

References gerbv_destroy_image(), and GERBV_POLARITY_DARK.

Referenced by gerbv_image_duplicate_image(), and parse_gerb().

void gerbv_destroy_image ( gerbv_image_t 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.

Parameters:
sourceImage  the source image
transform  the transformation to apply to the new image, or NULL for none
destinationImage  the destination image to copy to
Examples:
example2.c.

Definition at line 541 of file gerb_image.c.

References gerbv_image_t::aperture, gerbv_image_t::layers, gerbv_image_t::netlist, gerbv_net::next, gerbv_layer_t::next, gerbv_netstate_t::next, and gerbv_image_t::states.

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.

Parameters:
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)
Examples:
example5.c.

Definition at line 710 of file gerb_image.c.

References gerbv_net::aperture, gerbv_net::aperture_state, 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_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.

Parameters:
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)
Examples:
example5.c.

Definition at line 738 of file gerb_image.c.

References gerbv_net::aperture, gerbv_net::aperture_state, 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.

Parameters:
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
Examples:
example5.c.

Definition at line 632 of file gerb_image.c.

References gerbv_net::aperture_state, 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.

Parameters:
currentNet  the net to delete
Examples:
example4.c.

Definition at line 585 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.

Returns:
the newly created image
Parameters:
sourceImage  the source image
transform  the transformation to apply to the new image, or NULL for none
Examples:
example2.c.

Definition at line 506 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, gerbv_image_info::name, gerbv_image_info::plotterFilm, gerbv_image_t::states, and gerbv_image_info::type.

gerbv_net_t* gerbv_image_return_next_renderable_object ( gerbv_net_t oldNet  ) 

Return the next net entry which corresponds to a unique visible object.

Definition at line 907 of file gerb_image.c.

References GERBV_INTERPOLATION_PAREA_END, GERBV_INTERPOLATION_PAREA_START, gerbv_net::interpolation, and gerbv_net::next.


Generated on Tue Aug 19 00:14:50 2008 for gerbv by  doxygen 1.5.6