Compare commits
17 Commits
translatio
...
049e6c2a4c
Author | SHA1 | Date | |
---|---|---|---|
049e6c2a4c | |||
600e10e4d5 | |||
238f2cea82 | |||
554b73c406 | |||
4eebff04a4 | |||
04525611fa | |||
cb92d64ec3 | |||
37ff2080f9 | |||
e1b85d1a99 | |||
b0c9afdae5 | |||
f6abfada2c | |||
f135b42d8a | |||
058564326b | |||
fd1eac7fda | |||
2c91956b32 | |||
232d025211 | |||
e461b0be1d |
37
.github/workflows/cmake.yml
vendored
Normal file
37
.github/workflows/cmake.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: CMake
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: Release
|
||||
|
||||
jobs:
|
||||
build:
|
||||
# The CMake configure and build commands are platform agnostic and should work equally
|
||||
# well on Windows or Mac. You can convert this to a matrix build if you need
|
||||
# cross-platform coverage.
|
||||
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install system dependencies
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install libgtk-3-dev gettext
|
||||
|
||||
- name: Configure CMake
|
||||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
|
||||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||
|
||||
- name: Build
|
||||
# Build your program with the given configuration
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
@@ -1,5 +1,7 @@
|
||||
# GDS-Render Readme
|
||||
|
||||
[](https://github.com/0mhu/gds-render/actions/workflows/cmake.yml)
|
||||
|
||||
This software is a rendering programm for GDS2 layout files.
|
||||
The GDS2 format is mainly used in integrated circuit development.
|
||||
This program allows the conversion of a GDS file to a vector graphics file.
|
||||
|
@@ -30,7 +30,7 @@ Development is done with the following library versions:
|
||||
|
||||
| Cairographics | GLib2 | GTK3 |
|
||||
| ------------- | ---------- | --------- |
|
||||
| 1.17.3 | 2.60.6-1 | 3.24.10-1 |
|
||||
| 1.17.2 | 2.64.2 | 3.24.18 |
|
||||
|
||||
@section comp-instr Compilation Instructions
|
||||
@subsection linux-build General Linux Build Instruction
|
||||
@@ -47,7 +47,7 @@ Once cmake has finished, type
|
||||
make
|
||||
@endcode
|
||||
to build the program and
|
||||
|
||||
|
||||
@code
|
||||
make documentation
|
||||
@endcode
|
||||
@@ -59,7 +59,7 @@ The subfolder 'AUR' contains a PKGBUILD file to build an Archlinux/Pacman packag
|
||||
|
||||
@subsection comp-warnings Compiler Warnings
|
||||
|
||||
The compiler will throw the following warnings. Compiled with GCC 8.2.1.
|
||||
The compiler will throw the following warnings. Compiled with GCC 9.3.0.
|
||||
|
||||
| Warning | Assessment |
|
||||
| ------- | ---------- |
|
||||
|
@@ -187,7 +187,8 @@ static gboolean cell_store_filter_visible_func(GtkTreeModel *model, GtkTreeIter
|
||||
|
||||
gtk_tree_model_get(model, iter, CELL_SEL_CELL, &cell, CELL_SEL_LIBRARY, &lib, -1);
|
||||
|
||||
if (lib) {
|
||||
/* Show always, if this is a pure lib entry */
|
||||
if (lib && !cell) {
|
||||
result = TRUE;
|
||||
goto exit_filter;
|
||||
}
|
||||
@@ -690,19 +691,13 @@ static void on_select_all_layers_clicked(GtkWidget *button, gpointer user_data)
|
||||
layer_selector_select_all_layers(gui->layer_selector, TRUE);
|
||||
}
|
||||
|
||||
static void auto_naming_clicked(GtkWidget *button, gpointer user_data)
|
||||
static gboolean auto_naming_ask_for_override(GdsRenderGui *gui)
|
||||
{
|
||||
GdsRenderGui *gui;
|
||||
GtkDialog *dialog;
|
||||
gboolean overwrite;
|
||||
int dialog_result;
|
||||
(void)button;
|
||||
gint dialog_result;
|
||||
gboolean overwrite = FALSE;
|
||||
|
||||
gui = RENDERER_GUI(user_data);
|
||||
|
||||
/* Don't do anything if the selector is empty. */
|
||||
if (!layer_selector_contains_elements(gui->layer_selector))
|
||||
return;
|
||||
g_return_val_if_fail(RENDERER_IS_GUI(gui), FALSE);
|
||||
|
||||
/* Ask for overwrite */
|
||||
dialog = GTK_DIALOG(gtk_message_dialog_new(gui->main_window, GTK_DIALOG_USE_HEADER_BAR, GTK_MESSAGE_QUESTION,
|
||||
@@ -719,6 +714,25 @@ static void auto_naming_clicked(GtkWidget *button, gpointer user_data)
|
||||
}
|
||||
gtk_widget_destroy(GTK_WIDGET(dialog));
|
||||
|
||||
return overwrite;
|
||||
}
|
||||
|
||||
static void auto_naming_clicked(GtkWidget *button, gpointer user_data)
|
||||
{
|
||||
GdsRenderGui *gui;
|
||||
gboolean overwrite = FALSE;
|
||||
(void)button;
|
||||
|
||||
gui = RENDERER_GUI(user_data);
|
||||
|
||||
/* Don't do anything if the selector is empty. */
|
||||
if (!layer_selector_contains_elements(gui->layer_selector))
|
||||
return;
|
||||
|
||||
/* Ask, if names shall be overwritten, if they are not empty */
|
||||
if (layer_selector_num_of_named_elements(gui->layer_selector) > 0)
|
||||
overwrite = auto_naming_ask_for_override(gui);
|
||||
|
||||
layer_selector_auto_name_layers(gui->layer_selector, overwrite);
|
||||
}
|
||||
|
||||
|
@@ -65,7 +65,7 @@ void vector_2d_rotate(struct vector_2d *vec, double angle)
|
||||
sin_val = sin(angle);
|
||||
cos_val = cos(angle);
|
||||
|
||||
vector_2d_copy(&temp, vec);
|
||||
(void)vector_2d_copy(&temp, vec);
|
||||
|
||||
/* Apply rotation matrix */
|
||||
vec->x = (cos_val * temp.x) - (sin_val * temp.y);
|
||||
|
@@ -35,10 +35,17 @@
|
||||
#include <gds-render/gds-utils/gds-types.h>
|
||||
|
||||
/**
|
||||
* @brief calculate_cell_bounding_box Calculate bounding box of gds cell
|
||||
* @param box Resulting boundig box. Will be uüdated and not overwritten
|
||||
* @brief Calculate bounding box of a gds cell.
|
||||
*
|
||||
* This function updates a given bounding box with the dimensions of a
|
||||
* gds_cell. Please note that the handling of path miter points is not complete yet.
|
||||
* If a path object is the outmost object of your cell at any edge,
|
||||
* the resulting bounding box might be the wrong size. The devistion from the real size
|
||||
* is guaranteed to be within the width of the path object.
|
||||
*
|
||||
* @param box Resulting boundig box. Will be updated and not overwritten
|
||||
* @param cell Toplevel cell
|
||||
* @warning Path handling not yet implemented correctly.
|
||||
* @warning Handling of Path graphic objects not yet implemented correctly.
|
||||
*/
|
||||
void calculate_cell_bounding_box(union bounding_box *box, struct gds_cell *cell);
|
||||
|
||||
|
@@ -130,6 +130,13 @@ void layer_selector_auto_name_layers(LayerSelector *layer_selector, gboolean ove
|
||||
*/
|
||||
gboolean layer_selector_contains_elements(LayerSelector *layer_selector);
|
||||
|
||||
/**
|
||||
* @brief Get number of layer elements that are named
|
||||
* @param[in] layer_selector Layer selector
|
||||
* @return Number of layers with a name != NULL or != ""
|
||||
*/
|
||||
size_t layer_selector_num_of_named_elements(LayerSelector *layer_selector);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __LAYER_SELECTOR_H__ */
|
||||
|
@@ -38,7 +38,7 @@ G_DECLARE_FINAL_TYPE(CairoRenderer, cairo_renderer, GDS_RENDER, CAIRO_RENDERER,
|
||||
|
||||
#define GDS_RENDER_TYPE_CAIRO_RENDERER (cairo_renderer_get_type())
|
||||
|
||||
#define MAX_LAYERS (300) /**< \brief Maximum layer count the output renderer can process. Typically GDS only specifies up to 255 layers.*/
|
||||
#define MAX_LAYERS (5000) /**< \brief Maximum layer count the output renderer can process. Typically GDS only specifies up to 255 layers.*/
|
||||
|
||||
/**
|
||||
* @brief Create new CairoRenderer for SVG output
|
||||
|
@@ -238,6 +238,7 @@ static void color_palette_dispose(GObject *gobj)
|
||||
if (palette->color_array) {
|
||||
palette->color_array_length = 0;
|
||||
free(palette->color_array);
|
||||
palette->color_array = NULL;
|
||||
}
|
||||
|
||||
/* Chain up to parent class */
|
||||
|
@@ -822,12 +822,10 @@ void layer_selector_auto_color_layers(LayerSelector *layer_selector, ColorPalett
|
||||
unsigned int color_count;
|
||||
GdkRGBA color;
|
||||
|
||||
if (GDS_RENDER_IS_COLOR_PALETTE(palette) == FALSE || LAYER_IS_SELECTOR(layer_selector) == FALSE)
|
||||
return;
|
||||
if (global_alpha <= 0)
|
||||
return;
|
||||
if (GTK_IS_LIST_BOX(layer_selector->list_box) == FALSE)
|
||||
return;
|
||||
g_return_if_fail(GDS_RENDER_IS_COLOR_PALETTE(palette));
|
||||
g_return_if_fail(LAYER_IS_SELECTOR(layer_selector));
|
||||
g_return_if_fail(global_alpha > 0);
|
||||
g_return_if_fail(GTK_IS_LIST_BOX(layer_selector->list_box));
|
||||
|
||||
le_list = gtk_container_get_children(GTK_CONTAINER(layer_selector->list_box));
|
||||
|
||||
@@ -898,4 +896,31 @@ gboolean layer_selector_contains_elements(LayerSelector *layer_selector)
|
||||
return (layer_element_list ? TRUE : FALSE);
|
||||
}
|
||||
|
||||
size_t layer_selector_num_of_named_elements(LayerSelector *layer_selector)
|
||||
{
|
||||
GList *le_list;
|
||||
GList *le_list_ptr;
|
||||
LayerElement *le;
|
||||
const char *layer_name;
|
||||
size_t count = 0U;
|
||||
|
||||
g_return_val_if_fail(LAYER_IS_SELECTOR(layer_selector), 0U);
|
||||
|
||||
le_list = gtk_container_get_children(GTK_CONTAINER(layer_selector->list_box));
|
||||
|
||||
for (le_list_ptr = le_list; le_list_ptr != NULL; le_list_ptr = g_list_next(le_list_ptr)) {
|
||||
le = LAYER_ELEMENT(le_list_ptr->data);
|
||||
if (!le)
|
||||
continue;
|
||||
layer_name = layer_element_get_name(le);
|
||||
|
||||
if (layer_name && *layer_name) {
|
||||
/* Layer name is not empty. Count it */
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
@@ -370,7 +370,7 @@ static int latex_renderer_render_output(GdsOutputRenderer *renderer,
|
||||
l_renderer->pdf_layers, l_renderer->tex_standalone, renderer);
|
||||
fclose(tex_file);
|
||||
} else {
|
||||
g_error(_("Could not open LaTeX output file"));
|
||||
g_warning(_("Could not open LaTeX output file"));
|
||||
}
|
||||
|
||||
if (settings)
|
||||
|
Reference in New Issue
Block a user