void DrawSVG::redraw() { clear(); // set canvas_to_screen transformation Matrix3x3 m_imp = norm_to_screen * viewport_imp[current_tab]->get_canvas_to_norm(); Matrix3x3 m_ref = norm_to_screen * viewport_ref[current_tab]->get_canvas_to_norm(); software_renderer_imp->set_canvas_to_screen( m_imp ); software_renderer_ref->set_canvas_to_screen( m_ref ); hardware_renderer->set_canvas_to_screen( m_ref ); switch (method) { case Hardware: hardware_renderer->draw_svg(*tabs[current_tab]); break; case Software: if (show_diff) { draw_diff(); return; } software_renderer->draw_svg(*tabs[current_tab]); display_pixels( &framebuffer[0] ); break; } }
void DrawSVG::render() { if (method == Hardware) { redraw(); } if (method == Software) { display_pixels(&framebuffer[0]); } if (show_zoom) { draw_zoom(); } }