Logo Search packages:      
Sourcecode: pcb2gcode version File versions  Download package

void GerberImporter::render ( Cairo::RefPtr< Cairo::ImageSurface >  surface,
const guint  dpi,
const double  min_x,
const double  min_y 
) throw (import_exception) [virtual]

Todo:
check wheter importing was successful

Implements LayerImporter.

Definition at line 95 of file gerberimporter.cpp.

{
    gerbv_render_info_t render_info;

    render_info.scaleFactorX  = dpi;
    render_info.scaleFactorY  = dpi;
    render_info.lowerLeftX    = min_x;
    render_info.lowerLeftY    = min_y;
    render_info.displayWidth  = surface->get_width();
    render_info.displayHeight = surface->get_height();
    render_info.renderType = GERBV_RENDER_TYPE_CAIRO_NORMAL;

    GdkColor color_saturated_white = { 0xFFFFFFFF, 0xFFFF, 0xFFFF, 0xFFFF };
    project->file[0]->color = color_saturated_white;

    cairo_t* cr = cairo_create( surface->cobj() );
    gerbv_render_layer_to_cairo_target( cr, project->file[0], &render_info );
    
    cairo_destroy(cr);

    /// @todo check wheter importing was successful
}

Generated by  Doxygen 1.6.0   Back to index