GDS-Render v1.2.1
layer-settings.h
Go to the documentation of this file.
1/*
2 * GDSII-Converter
3 * Copyright (C) 2019 Mario Hüttel <mario.huettel@gmx.net>
4 *
5 * This file is part of GDSII-Converter.
6 *
7 * GDSII-Converter is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * GDSII-Converter is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with GDSII-Converter. If not, see <http://www.gnu.org/licenses/>.
18 */
19
26#ifndef _LAYER_INFO_H_
27#define _LAYER_INFO_H_
28
29#include <gtk/gtk.h>
30
31G_BEGIN_DECLS
32
41{
42 int layer;
43 char *name;
45 GdkRGBA color;
46 int render;
47};
48
49G_DECLARE_FINAL_TYPE(LayerSettings, layer_settings, GDS_RENDER, LAYER_SETTINGS, GObject)
50
51#define GDS_RENDER_TYPE_LAYER_SETTINGS (layer_settings_get_type())
52
56#define CSV_LINE_MAX_LEN (1024)
57
62LayerSettings *layer_settings_new();
63
71int layer_settings_append_layer_info(LayerSettings *settings, struct layer_info *info);
72
77void layer_settings_clear(LayerSettings *settings);
78
85int layer_settings_remove_layer(LayerSettings *settings, int layer);
86
96GList *layer_settings_get_layer_info_list(LayerSettings *settings);
97
107int layer_settings_to_csv(LayerSettings *settings, const char *path);
108
119int layer_settings_load_from_csv(LayerSettings *settings, const char *path);
120
121G_END_DECLS
122
123#endif // _LAYER_INFO_H_
G_BEGIN_DECLS G_DECLARE_FINAL_TYPE(GdsRenderGui, gds_render_gui, RENDERER, GUI, GObject)
void layer_settings_clear(LayerSettings *settings)
Clear all layers in this settings object.
int layer_settings_to_csv(LayerSettings *settings, const char *path)
Write layer settings to a CSV file.
LayerSettings * layer_settings_new()
New LayerSettings object.
GList * layer_settings_get_layer_info_list(LayerSettings *settings)
Get a GList with layer_info structs.
int layer_settings_load_from_csv(LayerSettings *settings, const char *path)
Load new layer Settings from CSV.
int layer_settings_remove_layer(LayerSettings *settings, int layer)
Remove a specific layer number from the layer settings.
int layer_settings_append_layer_info(LayerSettings *settings, struct layer_info *info)
layer_settings_append_layer_info
Layer information.
int render
true: Render to output
char * name
Layer name.
int stacked_position
Position of layer in output.
GdkRGBA color
RGBA color used to render this layer.
int layer
Layer number.