Layer support added

This commit is contained in:
Mario Hüttel 2018-05-31 00:04:14 +02:00
parent 9b7073604b
commit 0290a6c9d3
3 changed files with 4 additions and 1 deletions

View File

@ -70,7 +70,8 @@ static gboolean write_layer_env(FILE *tex_file, GdkRGBA *color, int layer, GList
color->red = inf->color.red; color->red = inf->color.red;
color->green = inf->color.green; color->green = inf->color.green;
color->blue = inf->color.blue; 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); WRITEOUT_BUFFER(buffer);
return TRUE; return TRUE;
} }

View File

@ -67,6 +67,7 @@ GList *export_rendered_layer_info()
layer_element_get_color(le, &linfo->color); layer_element_get_color(le, &linfo->color);
linfo->layer = layer_element_get_layer(le); linfo->layer = layer_element_get_layer(le);
linfo->stacked_position = i; linfo->stacked_position = i;
linfo->name = layer_element_get_name(le);
/* Append to list */ /* Append to list */
info_list = g_list_append(info_list, (gpointer)linfo); info_list = g_list_append(info_list, (gpointer)linfo);

View File

@ -26,6 +26,7 @@
struct layer_info struct layer_info
{ {
int layer; int layer;
char *name;
int stacked_position; ///< Lower is bottom, higher is top int stacked_position; ///< Lower is bottom, higher is top
GdkRGBA color; GdkRGBA color;
}; };