Add preliminary status upograde outputs to cairo and latex renderers
This commit is contained in:
parent
a0d19bee39
commit
a10c09c674
@ -400,6 +400,7 @@ static int cairo_renderer_render_output(GdsOutputRenderer *renderer,
|
|||||||
else
|
else
|
||||||
pdf_file = output_file;
|
pdf_file = output_file;
|
||||||
|
|
||||||
|
gds_output_renderer_update_gui_status_from_async(renderer, "Rendering Cairo Output...");
|
||||||
ret = cairo_renderer_render_cell_to_vector_file(cell, layer_infos, pdf_file, svg_file, scale);
|
ret = cairo_renderer_render_cell_to_vector_file(cell, layer_infos, pdf_file, svg_file, scale);
|
||||||
|
|
||||||
if (settings)
|
if (settings)
|
||||||
|
@ -227,12 +227,18 @@ static void generate_graphics(FILE *tex_file, GList *graphics, GList *linfo, GSt
|
|||||||
* @param buffer Working buffer
|
* @param buffer Working buffer
|
||||||
* @param scale Scale output down by this value
|
* @param scale Scale output down by this value
|
||||||
*/
|
*/
|
||||||
static void render_cell(struct gds_cell *cell, GList *layer_infos, FILE *tex_file, GString *buffer, double scale)
|
static void render_cell(struct gds_cell *cell, GList *layer_infos, FILE *tex_file, GString *buffer, double scale,
|
||||||
|
GdsOutputRenderer *renderer)
|
||||||
{
|
{
|
||||||
|
GString *status;
|
||||||
GList *list_child;
|
GList *list_child;
|
||||||
struct gds_cell_instance *inst;
|
struct gds_cell_instance *inst;
|
||||||
|
|
||||||
|
status = g_string_new(NULL);
|
||||||
|
g_string_printf(status, "Generating cell %s", cell->name);
|
||||||
|
gds_output_renderer_update_gui_status_from_async(renderer, status->str);
|
||||||
|
g_string_free(status, TRUE);
|
||||||
|
|
||||||
/* Draw polygons of current cell */
|
/* Draw polygons of current cell */
|
||||||
generate_graphics(tex_file, cell->graphic_objs, layer_infos, buffer, scale);
|
generate_graphics(tex_file, cell->graphic_objs, layer_infos, buffer, scale);
|
||||||
|
|
||||||
@ -256,7 +262,7 @@ static void render_cell(struct gds_cell *cell, GList *layer_infos, FILE *tex_fil
|
|||||||
inst->magnification);
|
inst->magnification);
|
||||||
WRITEOUT_BUFFER(buffer);
|
WRITEOUT_BUFFER(buffer);
|
||||||
|
|
||||||
render_cell(inst->cell_ref, layer_infos, tex_file, buffer, scale);
|
render_cell(inst->cell_ref, layer_infos, tex_file, buffer, scale, renderer);
|
||||||
|
|
||||||
g_string_printf(buffer, "\\end{scope}\n");
|
g_string_printf(buffer, "\\end{scope}\n");
|
||||||
WRITEOUT_BUFFER(buffer);
|
WRITEOUT_BUFFER(buffer);
|
||||||
@ -271,7 +277,7 @@ static void render_cell(struct gds_cell *cell, GList *layer_infos, FILE *tex_fil
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int latex_render_cell_to_code(struct gds_cell *cell, GList *layer_infos, FILE *tex_file, double scale,
|
static int latex_render_cell_to_code(struct gds_cell *cell, GList *layer_infos, FILE *tex_file, double scale,
|
||||||
gboolean create_pdf_layers, gboolean standalone_document)
|
gboolean create_pdf_layers, gboolean standalone_document, GdsOutputRenderer *renderer)
|
||||||
{
|
{
|
||||||
GString *working_line;
|
GString *working_line;
|
||||||
|
|
||||||
@ -304,7 +310,7 @@ static int latex_render_cell_to_code(struct gds_cell *cell, GList *layer_infos,
|
|||||||
WRITEOUT_BUFFER(working_line);
|
WRITEOUT_BUFFER(working_line);
|
||||||
|
|
||||||
/* Generate graphics output */
|
/* Generate graphics output */
|
||||||
render_cell(cell, layer_infos, tex_file, working_line, scale);
|
render_cell(cell, layer_infos, tex_file, working_line, scale, renderer);
|
||||||
|
|
||||||
|
|
||||||
g_string_printf(working_line, "\\end{tikzpicture}\n");
|
g_string_printf(working_line, "\\end{tikzpicture}\n");
|
||||||
@ -344,7 +350,7 @@ static int latex_renderer_render_output(GdsOutputRenderer *renderer,
|
|||||||
tex_file = fopen(output_file, "w");
|
tex_file = fopen(output_file, "w");
|
||||||
if (tex_file) {
|
if (tex_file) {
|
||||||
ret = latex_render_cell_to_code(cell, layer_infos, tex_file, scale,
|
ret = latex_render_cell_to_code(cell, layer_infos, tex_file, scale,
|
||||||
l_renderer->pdf_layers, l_renderer->tex_standalone);
|
l_renderer->pdf_layers, l_renderer->tex_standalone, renderer);
|
||||||
fclose(tex_file);
|
fclose(tex_file);
|
||||||
} else {
|
} else {
|
||||||
g_error("Could not open LaTeX output file");
|
g_error("Could not open LaTeX output file");
|
||||||
|
Loading…
Reference in New Issue
Block a user