From 0290a6c9d399ffde147c8b0e0b6f03055d65d744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Thu, 31 May 2018 00:04:14 +0200 Subject: [PATCH] Layer support added --- latex-output/latex-output.c | 3 ++- layer-selector.c | 1 + layer-selector.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/latex-output/latex-output.c b/latex-output/latex-output.c index c1cc80c..11f5a15 100644 --- a/latex-output/latex-output.c +++ b/latex-output/latex-output.c @@ -70,7 +70,8 @@ static gboolean write_layer_env(FILE *tex_file, GdkRGBA *color, int layer, GList color->red = inf->color.red; color->green = inf->color.green; color->blue = inf->color.blue; - g_string_printf(buffer, "\\begin{pgfonlayer}{l%d}\n\\begin{scope}[ocg={ref=%d, status=visible,name=%d}]\n", layer, layer, layer); + g_string_printf(buffer, "\\begin{pgfonlayer}{l%d}\n\\begin{scope}[ocg={ref=%d, status=visible,name={%s}]\n", + layer, layer, inf->name); WRITEOUT_BUFFER(buffer); return TRUE; } diff --git a/layer-selector.c b/layer-selector.c index 6b10f95..83ba335 100644 --- a/layer-selector.c +++ b/layer-selector.c @@ -67,6 +67,7 @@ GList *export_rendered_layer_info() layer_element_get_color(le, &linfo->color); linfo->layer = layer_element_get_layer(le); linfo->stacked_position = i; + linfo->name = layer_element_get_name(le); /* Append to list */ info_list = g_list_append(info_list, (gpointer)linfo); diff --git a/layer-selector.h b/layer-selector.h index 69a5a66..63d6723 100644 --- a/layer-selector.h +++ b/layer-selector.h @@ -26,6 +26,7 @@ struct layer_info { int layer; + char *name; int stacked_position; ///< Lower is bottom, higher is top GdkRGBA color; };