Compare commits
99 Commits
58a0bd85c4
...
v1.2.2
Author | SHA1 | Date | |
---|---|---|---|
f6c65d9c7a | |||
d43bec2cea | |||
05a1ef9014 | |||
a36b78b237 | |||
ac87cafa37 | |||
091729841a | |||
28368e8a32 | |||
2b3cc8222a | |||
c23150b819 | |||
049e6c2a4c | |||
600e10e4d5 | |||
238f2cea82 | |||
91706ccf2e | |||
17e7239e54 | |||
554b73c406 | |||
4eebff04a4 | |||
04525611fa | |||
cb92d64ec3 | |||
37ff2080f9 | |||
e1b85d1a99 | |||
b0c9afdae5 | |||
f6abfada2c | |||
f135b42d8a | |||
058564326b | |||
fd1eac7fda | |||
2c91956b32 | |||
232d025211 | |||
ceeb67355d | |||
ba51a437a4 | |||
e461b0be1d | |||
42f1636860 | |||
d29109e516 | |||
b784f28d4c | |||
94851570e9 | |||
f4fa1bd4e5 | |||
2e7bb03c17 | |||
39ff0dec1a | |||
74f9663bde | |||
330285cc2f | |||
24ae5e4d5b | |||
f7d15c7267 | |||
00d02b8291 | |||
75e01b80c8 | |||
89f9a638c6 | |||
7b1722661c | |||
5a43a8a4bf | |||
f11e11e6a7 | |||
0c5dd3c8e7 | |||
77a3a0da5a | |||
f8b0b63937 | |||
2d389342fd | |||
1ca04aaa71 | |||
b8fc904af5 | |||
fdfa478fed | |||
c0182220f1 | |||
798262383e | |||
0bfe8df92f | |||
de9066f181 | |||
87bc60bed0 | |||
20d72a5edb | |||
9e8d0b4611 | |||
4550815901 | |||
e3b6ee66ef | |||
f3786cf282 | |||
c085a62036 | |||
55799b2266 | |||
4970585cee | |||
c6483dbebd | |||
86342da2a2 | |||
ce8386799b | |||
374e3b54c0 | |||
3651296c3a | |||
5fe21f1d73 | |||
2d7103abbb | |||
392d7e1b3c | |||
2fddfa475b | |||
e6603d4c13 | |||
80730ab9c4 | |||
2b0e2095e6 | |||
0c20db39bd | |||
1b1f742ae1 | |||
3b6837b886 | |||
efb1af7ee0 | |||
fa1a78e54c | |||
0417784877 | |||
c186d3cdb3 | |||
f02a720f99 | |||
374a893dda | |||
83a7848c14 | |||
7977ee7c8b | |||
e7f0f904e8 | |||
48eb2c296f | |||
3d5c4daad9 | |||
9899b94db6 | |||
f153485996 | |||
f15e82b5dc | |||
daf12a7d8c | |||
11f2068b76 | |||
24d66e74fe |
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,7 +1,7 @@
|
||||
# Maintainer: Mario Hüttel <mario (dot) huettel (!) gmx (dot) net>
|
||||
|
||||
pkgname=gds-render
|
||||
pkgver=20191020.403.448de30
|
||||
pkgver=v1.2_10_g00d02b8
|
||||
pkgrel=1
|
||||
pkgdesc="Conversion tool for converting GDS layout files into TikZ Code and PDF"
|
||||
arch=('i686' 'x86_64')
|
||||
@@ -15,8 +15,8 @@ sha1sums=('SKIP')
|
||||
|
||||
pkgver () {
|
||||
_date=`date +"%Y%m%d"`
|
||||
cd "${srcdir}/${pkgname}-git"
|
||||
echo "$_date.$(git rev-list --count master).$(git rev-parse --short master)"
|
||||
cd "${srcdir}/${pkgname}-git/version"
|
||||
echo "$(echo "$(sh ./generate-version-string.sh)" | sed 's/-/_/g')"
|
||||
}
|
||||
|
||||
build () {
|
||||
|
@@ -30,10 +30,9 @@ pkg_search_module(GLIB REQUIRED glib-2.0)
|
||||
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
|
||||
pkg_check_modules(CAIRO REQUIRED cairo)
|
||||
|
||||
include_directories(${GLIB_INCLUDE_DIRS} ${GTK3_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
add_subdirectory(plugins)
|
||||
|
||||
add_compile_options(-Wall -Wextra -Wold-style-declaration -Wuninitialized -Wmaybe-uninitialized -Wunused-parameter)
|
||||
|
||||
IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
message("${Yellow}Debug mode for translations used!${ColorReset}")
|
||||
add_definitions(-DGETTEXT_PACKAGE=\"gds-render\" -DLOCALEDATADIR=\"${CMAKE_CURRENT_BINARY_DIR}/translations/output\")
|
||||
@@ -43,14 +42,7 @@ else(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
add_definitions(-DGETTEXT_PACKAGE=\"gds-render\" -DLOCALEDATADIR=\"/usr/share\")
|
||||
ENDIF(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
|
||||
add_subdirectory(resources)
|
||||
add_subdirectory(doxygen)
|
||||
add_subdirectory(translations)
|
||||
add_subdirectory(version)
|
||||
|
||||
include_directories(${GLIB_INCLUDE_DIRS} ${GTK3_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
link_directories(${GLIB_LINK_DIRS} ${GTK3_LINK_DIRS} ${CAIRO_LINK_DIRS})
|
||||
add_definitions(${GLIB2_CFLAGS_OTHER})
|
||||
|
||||
aux_source_directory("widgets" LAYER_SOURCES)
|
||||
aux_source_directory("cell-selector" CELL_SELECTOR_SOURCES)
|
||||
@@ -70,15 +62,33 @@ set(SOURCE
|
||||
${LAYER_SELECTOR_SOURCES}
|
||||
)
|
||||
|
||||
add_executable(${PROJECT_NAME} ${SOURCE} ${CMAKE_CURRENT_BINARY_DIR}/resources/resources.c)
|
||||
set(SOURCE_GENERATED
|
||||
${CMAKE_CURRENT_BINARY_DIR}/resources/resources.c
|
||||
)
|
||||
|
||||
link_directories(${GLIB_LINK_DIRS} ${GTK3_LINK_DIRS} ${CAIRO_LINK_DIRS})
|
||||
SET_SOURCE_FILES_PROPERTIES(${SOURCE_GENERATED} PROPERTIES GENERATED 1)
|
||||
|
||||
add_subdirectory(test)
|
||||
|
||||
add_compile_options(-Wall -Wextra -Wold-style-declaration -Wuninitialized -Wmaybe-uninitialized -Wunused-parameter)
|
||||
|
||||
add_subdirectory(resources)
|
||||
add_subdirectory(doxygen)
|
||||
add_subdirectory(translations)
|
||||
add_subdirectory(version)
|
||||
|
||||
link_directories(${GLIB_LINK_DIRS} ${GTK3_LINK_DIRS} ${CAIRO_LINK_DIRS})
|
||||
add_definitions(${GLIB2_CFLAGS_OTHER})
|
||||
|
||||
add_executable(${PROJECT_NAME} ${SOURCE} ${SOURCE_GENERATED})
|
||||
add_dependencies(${PROJECT_NAME} glib-resources)
|
||||
add_dependencies(${PROJECT_NAME} version)
|
||||
add_dependencies(${PROJECT_NAME} translations)
|
||||
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/resources/resources.c PROPERTIES GENERATED 1)
|
||||
target_link_libraries(${PROJECT_NAME} ${GLIB_LDFLAGS} ${GTK3_LDFLAGS} ${CAIRO_LDFLAGS} m version ${CMAKE_DL_LIBS})
|
||||
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
RUNTIME
|
||||
DESTINATION bin
|
||||
)
|
||||
target_link_libraries(${PROJECT_NAME} ${GLIB_LDFLAGS} ${GTK3_LDFLAGS} ${CAIRO_LDFLAGS} m version ${CMAKE_DL_LIBS})
|
||||
|
||||
add_custom_target(documentation DEPENDS doxygen)
|
||||
|
@@ -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.
|
||||
|
@@ -88,11 +88,13 @@ static void lib_cell_renderer_set_property(GObject *object,
|
||||
g_value_init(&val, G_TYPE_STRING);
|
||||
g_value_set_string(&val, ((struct gds_library *)g_value_get_pointer(value))->name);
|
||||
g_object_set_property(object, "text", &val);
|
||||
g_value_unset(&val);
|
||||
break;
|
||||
case PROP_CELL:
|
||||
g_value_init(&val, G_TYPE_STRING);
|
||||
g_value_set_string(&val, ((struct gds_cell *)g_value_get_pointer(value))->name);
|
||||
g_object_set_property(object, "text", &val);
|
||||
g_value_unset(&val);
|
||||
break;
|
||||
case PROP_ERROR_LEVEL:
|
||||
/* Set cell color according to error level */
|
||||
@@ -100,6 +102,7 @@ static void lib_cell_renderer_set_property(GObject *object,
|
||||
convert_error_level_to_color(&color, g_value_get_uint(value));
|
||||
g_value_set_boxed(&val, &color);
|
||||
g_object_set_property(object, "foreground-rgba", &val);
|
||||
g_value_unset(&val);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, param_id, pspec);
|
||||
|
@@ -56,7 +56,7 @@ static int create_renderers(char **renderers,
|
||||
char **output_file_names,
|
||||
gboolean tex_layers,
|
||||
gboolean tex_standalone,
|
||||
const char *so_path,
|
||||
const struct external_renderer_params *ext_params,
|
||||
GList **renderer_list,
|
||||
LayerSettings *layer_settings)
|
||||
{
|
||||
@@ -100,11 +100,13 @@ static int create_renderers(char **renderers,
|
||||
} else if (!strcmp(current_renderer, "svg")) {
|
||||
output_renderer = GDS_RENDER_OUTPUT_RENDERER(cairo_renderer_new_svg());
|
||||
} else if (!strcmp(current_renderer, "ext")) {
|
||||
if (!so_path) {
|
||||
if (!ext_params->so_path) {
|
||||
fprintf(stderr, _("Please specify shared object for external renderer. Will ignore this renderer.\n"));
|
||||
continue;
|
||||
}
|
||||
output_renderer = GDS_RENDER_OUTPUT_RENDERER(external_renderer_new_with_so(so_path));
|
||||
output_renderer = GDS_RENDER_OUTPUT_RENDERER(
|
||||
external_renderer_new_with_so_and_param(ext_params->so_path,
|
||||
ext_params->cli_params));
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
@@ -138,7 +140,7 @@ int command_line_convert_gds(const char *gds_name,
|
||||
char **renderers,
|
||||
char **output_file_names,
|
||||
const char *layer_file,
|
||||
const char *so_path,
|
||||
struct external_renderer_params *ext_param,
|
||||
gboolean tex_standalone,
|
||||
gboolean tex_layers,
|
||||
double scale)
|
||||
@@ -153,6 +155,10 @@ int command_line_convert_gds(const char *gds_name,
|
||||
LayerSettings *layer_sett;
|
||||
GdsOutputRenderer *current_renderer;
|
||||
|
||||
const struct gds_library_parsing_opts gds_parsing_options = {
|
||||
.simplified_polygons = 1,
|
||||
};
|
||||
|
||||
/* Check if parameters are valid */
|
||||
if (!gds_name || !cell_name || !output_file_names || !layer_file || !renderers) {
|
||||
printf(_("Probably missing argument. Check --help option\n"));
|
||||
@@ -165,13 +171,13 @@ int command_line_convert_gds(const char *gds_name,
|
||||
|
||||
/* Create renderers */
|
||||
if (create_renderers(renderers, output_file_names, tex_layers, tex_standalone,
|
||||
so_path, &renderer_list, layer_sett))
|
||||
ext_param, &renderer_list, layer_sett))
|
||||
goto ret_destroy_layer_mapping;
|
||||
|
||||
|
||||
/* Load GDS */
|
||||
clear_lib_list(&libs);
|
||||
res = parse_gds_from_file(gds_name, &libs);
|
||||
res = parse_gds_from_file(gds_name, &libs, &gds_parsing_options);
|
||||
if (res)
|
||||
goto ret_destroy_library_list;
|
||||
|
||||
|
@@ -1,10 +1,19 @@
|
||||
find_package(Doxygen)
|
||||
|
||||
if (DOXYGEN_FOUND)
|
||||
add_custom_target(doxygen
|
||||
add_custom_target(documentation DEPENDS doxygen doxygen-pdf)
|
||||
|
||||
add_custom_target(doxygen
|
||||
COMMAND ./build-doxygen.sh "${PROJECT_BINARY_DIR}"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMENT "Generating documentation with Doxygen")
|
||||
|
||||
add_custom_target(
|
||||
doxygen-pdf
|
||||
COMMAND make
|
||||
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/latex"
|
||||
DEPENDS doxygen
|
||||
)
|
||||
else (DOXYGEN_FOUND)
|
||||
message("Doxygen needs to be installed to generate the doxygen documentation")
|
||||
message("Doxygen needs to be installed to generate the doxygen documentation")
|
||||
endif (DOXYGEN_FOUND)
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# Doxyfile 1.8.16
|
||||
# Doxyfile 1.8.17
|
||||
|
||||
# This file describes the settings to be used by the documentation system
|
||||
# doxygen (www.doxygen.org) for a project.
|
||||
@@ -309,7 +309,7 @@ OPTIMIZE_OUTPUT_SLICE = NO
|
||||
# parses. With this tag you can assign which parser to use for a given
|
||||
# extension. Doxygen has a built-in mapping, but you can override or extend it
|
||||
# using this tag. The format is ext=language, where ext is a file extension, and
|
||||
# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
|
||||
# language is one of the parsers supported by doxygen: IDL, Java, JavaScript,
|
||||
# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice,
|
||||
# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran:
|
||||
# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser
|
||||
@@ -535,8 +535,8 @@ HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
|
||||
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
|
||||
# (class|struct|union) declarations. If set to NO, these declarations will be
|
||||
# included in the documentation.
|
||||
# declarations. If set to NO, these declarations will be included in the
|
||||
# documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
@@ -851,8 +851,10 @@ INPUT_ENCODING = UTF-8
|
||||
# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
|
||||
# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
|
||||
# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
|
||||
# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
|
||||
# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, *.qsf and *.ice.
|
||||
# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment),
|
||||
# *.doc (to be provided as doxygen C comment), *.txt (to be provided as doxygen
|
||||
# C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f, *.for, *.tcl, *.vhd,
|
||||
# *.vhdl, *.ucf, *.qsf and *.ice.
|
||||
|
||||
FILE_PATTERNS = *.c \
|
||||
*.cc \
|
||||
@@ -928,7 +930,7 @@ EXCLUDE_SYMLINKS = NO
|
||||
# Note that the wildcards are matched against the file with absolute path, so to
|
||||
# exclude all test directories for example use the pattern */test/*
|
||||
|
||||
EXCLUDE_PATTERNS =
|
||||
EXCLUDE_PATTERNS = */test/*
|
||||
|
||||
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
|
||||
# (namespaces, classes, functions, etc.) that should be excluded from the
|
||||
@@ -1265,9 +1267,9 @@ HTML_TIMESTAMP = NO
|
||||
|
||||
# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
|
||||
# documentation will contain a main index with vertical navigation menus that
|
||||
# are dynamically created via Javascript. If disabled, the navigation index will
|
||||
# are dynamically created via JavaScript. If disabled, the navigation index will
|
||||
# consists of multiple levels of tabs that are statically embedded in every HTML
|
||||
# page. Disable this option to support browsers that do not have Javascript,
|
||||
# page. Disable this option to support browsers that do not have JavaScript,
|
||||
# like the Qt help browser.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
@@ -1555,8 +1557,14 @@ FORMULA_FONTSIZE = 10
|
||||
|
||||
FORMULA_TRANSPARENT = YES
|
||||
|
||||
# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands
|
||||
# to create new LaTeX commands to be used in formulas as building blocks. See
|
||||
# the section "Including formulas" for details.
|
||||
|
||||
FORMULA_MACROFILE =
|
||||
|
||||
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
|
||||
# https://www.mathjax.org) which uses client side Javascript for the rendering
|
||||
# https://www.mathjax.org) which uses client side JavaScript for the rendering
|
||||
# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
|
||||
# installed or if you want to formulas look prettier in the HTML output. When
|
||||
# enabled you may also need to install MathJax separately and configure the path
|
||||
@@ -1626,7 +1634,7 @@ MATHJAX_CODEFILE =
|
||||
SEARCHENGINE = YES
|
||||
|
||||
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
|
||||
# implemented using a web server instead of a web client using Javascript. There
|
||||
# implemented using a web server instead of a web client using JavaScript. There
|
||||
# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
|
||||
# setting. When disabled, doxygen will generate a PHP script for searching and
|
||||
# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
|
||||
@@ -1766,7 +1774,7 @@ PAPER_TYPE = a4
|
||||
# If left blank no extra packages will be included.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
EXTRA_PACKAGES =
|
||||
EXTRA_PACKAGES = amsmath
|
||||
|
||||
# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
|
||||
# generated LaTeX document. The header should contain everything until the first
|
||||
|
@@ -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 |
|
||||
| ------- | ---------- |
|
||||
|
@@ -9,7 +9,18 @@
|
||||
* Property Name | Description
|
||||
* -----------------|----------------------------------------------------------------
|
||||
* shared-object-path | Path to the shared object used for rendering
|
||||
* param-string | Command line parameters passed to external renderer's init function
|
||||
*
|
||||
* All these properties have to be set for rendering.
|
||||
*
|
||||
* @section ExternalRendererFuncs Necessary Functions
|
||||
*
|
||||
* The following functions and variables are necessary for an external renderer to implement:
|
||||
*
|
||||
* Code Define | Prototype | Description
|
||||
* ---------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------
|
||||
* @ref EXTERNAL_LIBRARY_RENDER_FUNCTION | int EXTERNAL_LIBRARY_RENDER_FUNCTION(struct gds_cell *toplevel, GList *layer_info_list, const char *output_file_name, double scale) | Render cell to output file
|
||||
* @ref EXTERNAL_LIBRARY_INIT_FUNCTION | int EXTERNAL_LIBRARY_INIT_FUNCTION(const char *option_string, const char *version_string) | Init function. Executed before rendering. This is given the command line parameters specified for the external renderer and the version string of the currently running gds-render program.
|
||||
* @ref EXTERNAL_LIBRARY_FORK_REQUEST | int EXTERNAL_LIBRARY_FORK_REQUEST; | The pure presence of this integer results in the execution inside a subprocess of hte whole shared object's code
|
||||
*
|
||||
*/
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 33 KiB |
6
doxygen/plugins.dox
Normal file
6
doxygen/plugins.dox
Normal file
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* @defgroup plugins External Renderer Plugins
|
||||
*
|
||||
* These plugins can be loaded with the @ref ExternalRenderer
|
||||
*
|
||||
*/
|
@@ -35,6 +35,6 @@ It is possible to export the layer configurations so they can be used later on.
|
||||
|
||||
The cell selector on the left shows the GDS Libraries and Cells. The cells are marked green if all references inside the cell could be found. If not all references could be found, the cell is marked orange. This doens't show if child cells have missing childs. Only one level of the hierarchy is checked in order to make it easier to spot an errorneous cell. Cells with missing child cells are still renderable but `--` obviously `--` faulty. If a cell or any sub-cell contains a reference loop, the cell is marked red. In this case it can't be selected for rendering.
|
||||
|
||||
In the above image the cell is green; so everything is okay.
|
||||
|
||||
In the above image one cell is green; so everything is okay. And the other one is red, which indicates a reference loop. This cell cannot be selected for rendering!
|
||||
*/
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
The version number of this application consists of a given version in the format of 'v1.0'.
|
||||
Where the first number indicates a major release and the second number indicates minor changes.
|
||||
|
||||
Versions, including release candidates and path-levels, are tagged in git.
|
||||
Versions, including release candidates and patch-levels, are tagged in git.
|
||||
|
||||
@subsection rc Release Candidates
|
||||
Release candidates are software versions that seem stable and functional to become a new version but testing is not fully finished. These versions are marked with an '-rcX', where X is the number of the release candidate.
|
||||
|
107
gds-render-gui.c
107
gds-render-gui.c
@@ -48,8 +48,6 @@ enum cell_store_columns {
|
||||
CELL_SEL_LIBRARY = 0,
|
||||
CELL_SEL_CELL,
|
||||
CELL_SEL_CELL_ERROR_STATE, /**< Used for cell color and selectability */
|
||||
CELL_SEL_MODDATE,
|
||||
CELL_SEL_ACCESSDATE,
|
||||
CELL_SEL_COLUMN_COUNT /**< @brief Not a column. Used to determine count of columns */
|
||||
};
|
||||
|
||||
@@ -116,25 +114,6 @@ static gboolean on_window_close(gpointer window, GdkEvent *event, gpointer user)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief generate string from gds_time_field
|
||||
* @param date Date to convert
|
||||
* @return String with date
|
||||
*/
|
||||
static GString *generate_string_from_date(struct gds_time_field *date)
|
||||
{
|
||||
GString *str;
|
||||
|
||||
str = g_string_new_len(NULL, 50);
|
||||
g_string_printf(str, "%02u.%02u.%u - %02u:%02u",
|
||||
(unsigned int)date->day,
|
||||
(unsigned int)date->month,
|
||||
(unsigned int)date->year,
|
||||
(unsigned int)date->hour,
|
||||
(unsigned int)date->minute);
|
||||
return str;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function only allows valid cells to be selected
|
||||
* @param selection
|
||||
@@ -208,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;
|
||||
}
|
||||
@@ -237,14 +217,12 @@ exit_filter:
|
||||
*/
|
||||
int gds_render_gui_setup_cell_selector(GdsRenderGui *self)
|
||||
{
|
||||
GtkCellRenderer *render_dates;
|
||||
GtkCellRenderer *render_cell;
|
||||
GtkCellRenderer *render_lib;
|
||||
GtkTreeViewColumn *column;
|
||||
|
||||
self->cell_tree_store = gtk_tree_store_new(CELL_SEL_COLUMN_COUNT, G_TYPE_POINTER,
|
||||
G_TYPE_POINTER, G_TYPE_UINT,
|
||||
G_TYPE_STRING, G_TYPE_STRING);
|
||||
G_TYPE_POINTER, G_TYPE_UINT);
|
||||
|
||||
/* Searching */
|
||||
self->cell_filter = GTK_TREE_MODEL_FILTER(
|
||||
@@ -258,7 +236,6 @@ int gds_render_gui_setup_cell_selector(GdsRenderGui *self)
|
||||
|
||||
gtk_tree_view_set_model(self->cell_tree_view, GTK_TREE_MODEL(self->cell_filter));
|
||||
|
||||
render_dates = gtk_cell_renderer_text_new();
|
||||
render_cell = lib_cell_renderer_new();
|
||||
render_lib = lib_cell_renderer_new();
|
||||
|
||||
@@ -269,12 +246,6 @@ int gds_render_gui_setup_cell_selector(GdsRenderGui *self)
|
||||
"error-level", CELL_SEL_CELL_ERROR_STATE, NULL);
|
||||
gtk_tree_view_append_column(self->cell_tree_view, column);
|
||||
|
||||
column = gtk_tree_view_column_new_with_attributes(_("Mod. Date"), render_dates, "text", CELL_SEL_MODDATE, NULL);
|
||||
gtk_tree_view_append_column(self->cell_tree_view, column);
|
||||
|
||||
column = gtk_tree_view_column_new_with_attributes(_("Acc. Date"), render_dates, "text", CELL_SEL_ACCESSDATE, NULL);
|
||||
gtk_tree_view_append_column(self->cell_tree_view, column);
|
||||
|
||||
/* Callback for selection
|
||||
* This prevents selecting a library
|
||||
*/
|
||||
@@ -305,10 +276,12 @@ static void on_load_gds(gpointer button, gpointer user)
|
||||
gint dialog_result;
|
||||
int gds_result;
|
||||
char *filename;
|
||||
GString *mod_date;
|
||||
GString *acc_date;
|
||||
unsigned int cell_error_level;
|
||||
|
||||
const struct gds_library_parsing_opts gds_parsing_options = {
|
||||
.simplified_polygons = 1,
|
||||
};
|
||||
|
||||
self = RENDERER_GUI(user);
|
||||
if (!self)
|
||||
return;
|
||||
@@ -338,7 +311,7 @@ static void on_load_gds(gpointer button, gpointer user)
|
||||
clear_lib_list(&self->gds_libraries);
|
||||
|
||||
/* Parse new GDSII file */
|
||||
gds_result = parse_gds_from_file(filename, &self->gds_libraries);
|
||||
gds_result = parse_gds_from_file(filename, &self->gds_libraries, &gds_parsing_options);
|
||||
|
||||
/* Delete file name afterwards */
|
||||
g_free(filename);
|
||||
@@ -354,30 +327,17 @@ static void on_load_gds(gpointer button, gpointer user)
|
||||
/* Create top level iter */
|
||||
gtk_tree_store_append(self->cell_tree_store, &libiter, NULL);
|
||||
|
||||
/* Convert dates to String */
|
||||
mod_date = generate_string_from_date(&gds_lib->mod_time);
|
||||
acc_date = generate_string_from_date(&gds_lib->access_time);
|
||||
|
||||
gtk_tree_store_set(self->cell_tree_store, &libiter,
|
||||
CELL_SEL_LIBRARY, gds_lib,
|
||||
CELL_SEL_MODDATE, mod_date->str,
|
||||
CELL_SEL_ACCESSDATE, acc_date->str,
|
||||
-1);
|
||||
|
||||
/* Check this library. This might take a while */
|
||||
(void)gds_tree_check_cell_references(gds_lib);
|
||||
(void)gds_tree_check_reference_loops(gds_lib);
|
||||
/* Delete GStrings including string data. */
|
||||
/* Cell store copies String type data items */
|
||||
g_string_free(mod_date, TRUE);
|
||||
g_string_free(acc_date, TRUE);
|
||||
|
||||
for (cell = gds_lib->cells; cell != NULL; cell = cell->next) {
|
||||
gds_c = (struct gds_cell *)cell->data;
|
||||
gtk_tree_store_append(self->cell_tree_store, &celliter, &libiter);
|
||||
/* Convert dates to String */
|
||||
mod_date = generate_string_from_date(&gds_c->mod_time);
|
||||
acc_date = generate_string_from_date(&gds_c->access_time);
|
||||
|
||||
/* Get the checking results for this cell */
|
||||
cell_error_level = 0;
|
||||
@@ -391,15 +351,9 @@ static void on_load_gds(gpointer button, gpointer user)
|
||||
/* Add cell to tree store model */
|
||||
gtk_tree_store_set(self->cell_tree_store, &celliter,
|
||||
CELL_SEL_CELL, gds_c,
|
||||
CELL_SEL_MODDATE, mod_date->str,
|
||||
CELL_SEL_ACCESSDATE, acc_date->str,
|
||||
CELL_SEL_CELL_ERROR_STATE, cell_error_level,
|
||||
CELL_SEL_LIBRARY, gds_c->parent_library,
|
||||
-1);
|
||||
|
||||
/* Delete GStrings including string data. */
|
||||
/* Cell store copies String type data items */
|
||||
g_string_free(mod_date, TRUE);
|
||||
g_string_free(acc_date, TRUE);
|
||||
} /* for cells */
|
||||
} /* for libraries */
|
||||
|
||||
@@ -602,21 +556,13 @@ static void on_convert_clicked(gpointer button, gpointer user)
|
||||
g_signal_connect(render_engine, "async-finished", G_CALLBACK(async_rendering_finished_callback),
|
||||
self);
|
||||
|
||||
activity_bar_set_busy(self->activity_status_bar, "Rendering cell...");
|
||||
/* TODO: Replace this with asynchronous rendering. However, this fixes issue #19 */
|
||||
activity_bar_set_busy(self->activity_status_bar, _("Rendering cell..."));
|
||||
|
||||
g_signal_connect(render_engine, "progress-changed",
|
||||
G_CALLBACK(async_rendering_status_update_callback), self);
|
||||
gds_output_renderer_render_output_async(render_engine, cell_to_render, sett->scale);
|
||||
|
||||
|
||||
//self->button_state_data.rendering_active = FALSE;
|
||||
|
||||
//g_object_unref(render_engine);
|
||||
}
|
||||
|
||||
g_free(file_name);
|
||||
|
||||
} else {
|
||||
gtk_widget_destroy(dialog);
|
||||
}
|
||||
@@ -749,19 +695,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,
|
||||
@@ -778,6 +718,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);
|
||||
}
|
||||
|
||||
|
@@ -40,6 +40,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <math.h>
|
||||
#include <cairo.h>
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
#include <gds-render/gds-utils/gds-parser.h>
|
||||
|
||||
@@ -79,6 +80,7 @@ enum gds_record {
|
||||
STRANS = 0x1A01,
|
||||
BOX = 0x2D00,
|
||||
LAYER = 0x0D02,
|
||||
DATATYPE = 0x0E02,
|
||||
WIDTH = 0x0F03,
|
||||
PATHTYPE = 0x2102,
|
||||
COLROW = 0x1302,
|
||||
@@ -264,7 +266,8 @@ static uint16_t gds_convert_unsigned_int16(const char *data)
|
||||
* @param library_ptr Return of newly created library.
|
||||
* @return Newly created list pointer
|
||||
*/
|
||||
static GList *append_library(GList *curr_list, struct gds_library **library_ptr)
|
||||
static GList *append_library(GList *curr_list, const struct gds_library_parsing_opts *opts,
|
||||
struct gds_library **library_ptr)
|
||||
{
|
||||
struct gds_library *lib;
|
||||
|
||||
@@ -274,6 +277,8 @@ static GList *append_library(GList *curr_list, struct gds_library **library_ptr)
|
||||
lib->name[0] = 0;
|
||||
lib->unit_in_meters = GDS_DEFAULT_UNITS; // Default. Will be overwritten
|
||||
lib->cell_names = NULL;
|
||||
/* Copy the settings into the library */
|
||||
memcpy(&lib->parsing_opts, opts, sizeof(struct gds_library_parsing_opts));
|
||||
} else
|
||||
return NULL;
|
||||
if (library_ptr)
|
||||
@@ -486,20 +491,102 @@ static void parse_reference_list(gpointer gcell_ref, gpointer glibrary)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Scans cell references inside cell
|
||||
This function searches all the references in \p gcell and updates the gds_cell_instance::cell_ref field in each instance
|
||||
* @brief Simplify graphics objects
|
||||
* @param graphics gfx struct
|
||||
* @param user_data GDS library
|
||||
*/
|
||||
static void simplify_graphics(gpointer graphics, gpointer user_data)
|
||||
{
|
||||
struct gds_graphics *gfx;
|
||||
const struct gds_point *first_vertex = NULL;
|
||||
const struct gds_point *prev_vertex = NULL;
|
||||
const struct gds_point *current_vertex;
|
||||
GList *vertex_iter;
|
||||
GList *next_iter;
|
||||
(void)user_data;
|
||||
size_t processed_count = 0U;
|
||||
size_t removed_count = 0U;
|
||||
|
||||
gfx = (struct gds_graphics *)graphics;
|
||||
if (gfx->gfx_type == GRAPHIC_POLYGON) {
|
||||
GDS_INF("\t\t\tPolygon found\n");
|
||||
|
||||
/* Loop over all vertices */
|
||||
for (vertex_iter = gfx->vertices; vertex_iter;) {
|
||||
current_vertex = (const struct gds_point *)vertex_iter->data;
|
||||
next_iter = g_list_next(vertex_iter);
|
||||
processed_count++;
|
||||
|
||||
if (vertex_iter == gfx->vertices) {
|
||||
/* This is the first vertex */
|
||||
first_vertex = current_vertex;
|
||||
prev_vertex = NULL;
|
||||
}
|
||||
|
||||
if (prev_vertex) {
|
||||
if (current_vertex->x == prev_vertex->x && current_vertex->y == prev_vertex->y) {
|
||||
/* Vertex is the same as the previous one */
|
||||
GDS_INF("\t\t\t\tDuplicate vertex (%d,%d). Removing...\n",
|
||||
current_vertex->x, current_vertex->y);
|
||||
|
||||
/* Delete the current one from the list */
|
||||
gfx->vertices = g_list_remove_link(gfx->vertices, vertex_iter);
|
||||
|
||||
/* Free the data */
|
||||
if (vertex_iter->data)
|
||||
free(vertex_iter->data);
|
||||
vertex_iter->data = NULL;
|
||||
g_list_free_1(vertex_iter);
|
||||
removed_count++;
|
||||
} else if (!g_list_next(vertex_iter)) {
|
||||
/* This is the last element in the list */
|
||||
if (current_vertex->x == first_vertex->x &&
|
||||
current_vertex->y == first_vertex->y) {
|
||||
GDS_INF("\t\t\t\tLast vertex is identical to first vertex (%d,%d). Removing\n",
|
||||
current_vertex->x, current_vertex->y);
|
||||
gfx->vertices = g_list_remove_link(gfx->vertices, vertex_iter);
|
||||
if (vertex_iter->data)
|
||||
free(vertex_iter->data);
|
||||
g_list_free_1(vertex_iter);
|
||||
removed_count++;
|
||||
} else {
|
||||
GDS_WARN("First vertex is not coincident with first vertex, although the GDS file format specifies this. However, this is not a problem.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
vertex_iter = next_iter;
|
||||
prev_vertex = current_vertex;
|
||||
}
|
||||
GDS_INF("\t\t\tProcessed %zu vertices. %zu removed.\n", processed_count, removed_count);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Scans cell and resolves references and simplifies polygons
|
||||
* This function searches all the references in \p gcell and updates the gds_cell_instance::cell_ref field in each instance
|
||||
*
|
||||
* @param gcell pointer cast of #gds_cell *
|
||||
* @param library Library where the cell references are searched in
|
||||
*/
|
||||
static void scan_cell_reference_dependencies(gpointer gcell, gpointer library)
|
||||
static void scan_cell_references_and_polygons(gpointer gcell, gpointer library)
|
||||
{
|
||||
struct gds_cell *cell = (struct gds_cell *)gcell;
|
||||
struct gds_library *my_lib = (struct gds_library *)library;
|
||||
int simplify_polygons;
|
||||
|
||||
simplify_polygons = my_lib->parsing_opts.simplified_polygons;
|
||||
|
||||
GDS_INF("\tScanning cell: %s\n", cell->name);
|
||||
|
||||
GDS_INF("\t\tCell references\n");
|
||||
/* Scan all library references */
|
||||
g_list_foreach(cell->child_cells, parse_reference_list, library);
|
||||
|
||||
|
||||
GDS_INF("\t\tSimplifying Polygons%s\n", simplify_polygons ? "" : ": skipped");
|
||||
if (simplify_polygons) {
|
||||
g_list_foreach(cell->graphic_objs, simplify_graphics, library);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -515,7 +602,7 @@ static void scan_library_references(gpointer library_list_item, gpointer user)
|
||||
(void)user;
|
||||
|
||||
GDS_INF("Scanning Library: %s\n", lib->name);
|
||||
g_list_foreach(lib->cells, scan_cell_reference_dependencies, lib);
|
||||
g_list_foreach(lib->cells, scan_cell_references_and_polygons, lib);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -597,7 +684,7 @@ static void convert_aref_to_sref(struct gds_cell_array_instance *aref, struct gd
|
||||
/* Iterate over columns and rows */
|
||||
for (col = 0; col < aref->columns; col++) {
|
||||
for (row = 0; row < aref->rows; row++) {
|
||||
/* Create new instance for this row/column and aconfigure data */
|
||||
/* Create new instance for this row/column and configure data */
|
||||
container_cell->child_cells = append_cell_ref(container_cell->child_cells, &sref_inst);
|
||||
if (!sref_inst) {
|
||||
GDS_ERROR("Appending cell ref failed!");
|
||||
@@ -615,7 +702,8 @@ static void convert_aref_to_sref(struct gds_cell_array_instance *aref, struct gd
|
||||
GDS_INF("Converted AREF to SREFs\n");
|
||||
}
|
||||
|
||||
int parse_gds_from_file(const char *filename, GList **library_list)
|
||||
int parse_gds_from_file(const char *filename, GList **library_list,
|
||||
const struct gds_library_parsing_opts *parsing_options)
|
||||
{
|
||||
char *workbuff;
|
||||
int read;
|
||||
@@ -695,7 +783,7 @@ int parse_gds_from_file(const char *filename, GList **library_list)
|
||||
/* if begin: Allocate structures */
|
||||
switch (rec_type) {
|
||||
case BGNLIB:
|
||||
lib_list = append_library(lib_list, ¤t_lib);
|
||||
lib_list = append_library(lib_list, parsing_options, ¤t_lib);
|
||||
if (lib_list == NULL) {
|
||||
GDS_ERROR("Allocating memory failed");
|
||||
run = -3;
|
||||
@@ -769,7 +857,7 @@ int parse_gds_from_file(const char *filename, GList **library_list)
|
||||
run = -4;
|
||||
break;
|
||||
}
|
||||
GDS_INF("\tEntering boundary/Box\n");
|
||||
GDS_INF("\tEntering boundary of type %s\n", rec_type==BOUNDARY ? "polygon" : "box");
|
||||
break;
|
||||
case SREF:
|
||||
if (current_cell == NULL) {
|
||||
@@ -804,7 +892,9 @@ int parse_gds_from_file(const char *filename, GList **library_list)
|
||||
break;
|
||||
case ENDEL:
|
||||
if (current_graphics != NULL) {
|
||||
GDS_INF("\tLeaving %s\n", (current_graphics->gfx_type == GRAPHIC_POLYGON ? "boundary" : "path"));
|
||||
GDS_INF("\tLeaving %s\n", (current_graphics->gfx_type == GRAPHIC_POLYGON ? "boundary"
|
||||
: (current_graphics->gfx_type == GRAPHIC_PATH ? "path"
|
||||
: "box")));
|
||||
current_graphics = NULL;
|
||||
}
|
||||
if (current_s_reference != NULL) {
|
||||
@@ -823,11 +913,11 @@ int parse_gds_from_file(const char *filename, GList **library_list)
|
||||
|
||||
} else if (current_s_reference) {
|
||||
if (rec_data_length != 8) {
|
||||
GDS_WARN("Instance has weird coordinates. Rendered output might be screwed!");
|
||||
GDS_WARN("Instance has weird coordinates. Rendered output might be wrong!");
|
||||
}
|
||||
} else if (current_a_reference) {
|
||||
if (rec_data_length != (3*(4+4)))
|
||||
GDS_WARN("Array instance has weird coordinates. Rendered output might be screwed!");
|
||||
GDS_WARN("Array instance has weird coordinates. Rendered output might be wrong!");
|
||||
}
|
||||
break;
|
||||
case AREF:
|
||||
@@ -866,6 +956,7 @@ int parse_gds_from_file(const char *filename, GList **library_list)
|
||||
case LIBNAME:
|
||||
case SNAME:
|
||||
case LAYER:
|
||||
case DATATYPE:
|
||||
case STRNAME:
|
||||
break;
|
||||
default:
|
||||
@@ -1002,6 +1093,16 @@ int parse_gds_from_file(const char *filename, GList **library_list)
|
||||
}
|
||||
GDS_INF("\t\tAdded layer %d\n", (int)current_graphics->layer);
|
||||
break;
|
||||
case DATATYPE:
|
||||
if (!current_graphics) {
|
||||
GDS_WARN("Datatype has to be defined inside graphics object. Probably unknown object. Implement it yourself!");
|
||||
break;
|
||||
}
|
||||
current_graphics->datatype = gds_convert_signed_int16(workbuff);
|
||||
if (current_graphics->datatype < 0)
|
||||
GDS_WARN("Datatype negative!");
|
||||
GDS_INF("\t\tAdded datatype %d\n", (int)current_graphics->datatype);
|
||||
break;
|
||||
case MAG:
|
||||
if (rec_data_length != 8) {
|
||||
GDS_WARN("Magnification is not an 8 byte real. Results may be wrong");
|
||||
|
@@ -34,7 +34,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gds-render/gds-utils/gds-tree-checker.h>
|
||||
|
||||
int gds_tree_check_cell_references(struct gds_library *lib)
|
||||
@@ -54,7 +54,7 @@ int gds_tree_check_cell_references(struct gds_library *lib)
|
||||
|
||||
/* Check if this list element is broken. This should never happen */
|
||||
if (!cell) {
|
||||
fprintf(stderr, "Broken cell list item found. Will continue.\n");
|
||||
fprintf(stderr, _("Broken cell list item found. Will continue.\n"));
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ int gds_tree_check_cell_references(struct gds_library *lib)
|
||||
|
||||
/* Check if broken. This should not happen */
|
||||
if (!cell_inst) {
|
||||
fprintf(stderr, "Broken cell list item found in cell %s. Will continue.\n",
|
||||
fprintf(stderr, _("Broken cell list item found in cell %s. Will continue.\n"),
|
||||
cell->name);
|
||||
continue;
|
||||
}
|
||||
@@ -185,7 +185,7 @@ int gds_tree_check_reference_loops(struct gds_library *lib)
|
||||
*/
|
||||
if (res == 0)
|
||||
fprintf(stderr,
|
||||
"Visited cell list should be empty. This is a bug. Please report this.\n");
|
||||
_("Visited cell list should be empty. This is a bug. Please report this.\n"));
|
||||
g_list_free(visited_cells);
|
||||
visited_cells = NULL;
|
||||
}
|
||||
|
@@ -37,7 +37,7 @@
|
||||
#define MAX(a, b) (((a) > (b)) ? (a) : (b)) /**< @brief Return bigger number */
|
||||
#define ABS_DBL(a) ((a) < 0 ? -(a) : (a))
|
||||
|
||||
void bounding_box_calculate_polygon(GList *vertices, conv_generic_to_vector_2d_t conv_func, union bounding_box *box)
|
||||
void bounding_box_calculate_from_polygon(GList *vertices, conv_generic_to_vector_2d_t conv_func, union bounding_box *box)
|
||||
{
|
||||
double xmin = DBL_MAX, xmax = -DBL_MAX, ymin = DBL_MAX, ymax = -DBL_MAX;
|
||||
struct vector_2d temp_vec;
|
||||
@@ -68,7 +68,7 @@ void bounding_box_calculate_polygon(GList *vertices, conv_generic_to_vector_2d_t
|
||||
box->vectors.upper_right.y = ymax;
|
||||
}
|
||||
|
||||
void bounding_box_update_box(union bounding_box *destination, union bounding_box *update)
|
||||
void bounding_box_update_with_box(union bounding_box *destination, union bounding_box *update)
|
||||
{
|
||||
if (!destination || !update)
|
||||
return;
|
||||
@@ -145,14 +145,12 @@ static void calculate_path_miter_points(struct vector_2d *a, struct vector_2d *b
|
||||
vector_2d_subtract(m2, m2, &v_vec);
|
||||
}
|
||||
|
||||
void bounding_box_calculate_path_box(GList *vertices, double thickness,
|
||||
void bounding_box_update_with_path(GList *vertices, double thickness,
|
||||
conv_generic_to_vector_2d_t conv_func, union bounding_box *box)
|
||||
{
|
||||
GList *vertex_iterator;
|
||||
struct vector_2d pt;
|
||||
|
||||
/* printf("Warning! Function %s not yet implemented correctly!\n", __func__); */
|
||||
|
||||
if (!vertices || !box)
|
||||
return;
|
||||
|
||||
@@ -173,7 +171,7 @@ void bounding_box_calculate_path_box(GList *vertices, double thickness,
|
||||
}
|
||||
}
|
||||
|
||||
void bounding_box_update_point(union bounding_box *destination, conv_generic_to_vector_2d_t conv_func, void *pt)
|
||||
void bounding_box_update_with_point(union bounding_box *destination, conv_generic_to_vector_2d_t conv_func, void *pt)
|
||||
{
|
||||
struct vector_2d point;
|
||||
|
||||
@@ -191,24 +189,40 @@ void bounding_box_update_point(union bounding_box *destination, conv_generic_to_
|
||||
destination->vectors.upper_right.y = MAX(destination->vectors.upper_right.y, point.y);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Apply transformations onto bounding box.
|
||||
* @param scale Scaling factor
|
||||
* @param rotation_deg Roation of bounding box around the origin in degrees (counterclockwise)
|
||||
* @param flip_at_x Flip the boundig box on the x axis before rotating.
|
||||
* @param box Bounding box the operations should be applied to.
|
||||
*/
|
||||
void bounding_box_get_all_points(struct vector_2d *points, union bounding_box *box)
|
||||
{
|
||||
if (!points || !box)
|
||||
return;
|
||||
|
||||
points[0].x = box->vectors.lower_left.x;
|
||||
points[0].y = box->vectors.lower_left.y;
|
||||
points[1].x = box->vectors.upper_right.x;
|
||||
points[1].y = box->vectors.lower_left.y;
|
||||
points[2].x = box->vectors.upper_right.x;
|
||||
points[2].y = box->vectors.upper_right.y;
|
||||
points[3].x = box->vectors.lower_left.x;
|
||||
points[3].y = box->vectors.upper_right.y;
|
||||
}
|
||||
|
||||
void bounding_box_apply_transform(double scale, double rotation_deg, bool flip_at_x, union bounding_box *box)
|
||||
{
|
||||
int i;
|
||||
struct vector_2d input_points[4];
|
||||
|
||||
/* Due to linearity, the order of the operations does not matter.
|
||||
* flip must be applied before rotation as defined by the GDS format
|
||||
*/
|
||||
for (i = 0; i < 2; i++) {
|
||||
box->vector_array[i].y *= (flip_at_x ? -1 : 1);
|
||||
vector_2d_rotate(&box->vector_array[i], rotation_deg * M_PI / 180);
|
||||
vector_2d_scale(&box->vector_array[i], scale);
|
||||
if (!box)
|
||||
return;
|
||||
|
||||
bounding_box_get_all_points(input_points, box);
|
||||
|
||||
/* Reset box */
|
||||
bounding_box_prepare_empty(box);
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
input_points[i].y *= (flip_at_x ? -1 : 1);
|
||||
vector_2d_rotate(&input_points[i], rotation_deg * M_PI / 180.0);
|
||||
vector_2d_scale(&input_points[i], scale);
|
||||
|
||||
bounding_box_update_with_point(box, NULL, &input_points[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -53,7 +53,7 @@ static void update_box_with_gfx(union bounding_box *box, struct gds_graphics *gf
|
||||
case GRAPHIC_BOX:
|
||||
/* Expected fallthrough */
|
||||
case GRAPHIC_POLYGON:
|
||||
bounding_box_calculate_polygon(gfx->vertices,
|
||||
bounding_box_calculate_from_polygon(gfx->vertices,
|
||||
(conv_generic_to_vector_2d_t)&convert_gds_point_to_2d_vector,
|
||||
¤t_box);
|
||||
break;
|
||||
@@ -63,7 +63,7 @@ static void update_box_with_gfx(union bounding_box *box, struct gds_graphics *gf
|
||||
* Please be aware if paths are the outmost elements of your cell.
|
||||
* You might end up with a completely wrong calculated cell size.
|
||||
*/
|
||||
bounding_box_calculate_path_box(gfx->vertices, gfx->width_absolute,
|
||||
bounding_box_update_with_path(gfx->vertices, gfx->width_absolute,
|
||||
(conv_generic_to_vector_2d_t)&convert_gds_point_to_2d_vector,
|
||||
¤t_box);
|
||||
break;
|
||||
@@ -74,7 +74,7 @@ static void update_box_with_gfx(union bounding_box *box, struct gds_graphics *gf
|
||||
}
|
||||
|
||||
/* Update box with results */
|
||||
bounding_box_update_box(box, ¤t_box);
|
||||
bounding_box_update_with_box(box, ¤t_box);
|
||||
}
|
||||
|
||||
void calculate_cell_bounding_box(union bounding_box *box, struct gds_cell *cell)
|
||||
@@ -113,7 +113,7 @@ void calculate_cell_bounding_box(union bounding_box *box, struct gds_cell *cell)
|
||||
temp_box.vectors.upper_right.y += sub_cell->origin.y;
|
||||
|
||||
/* update the parent's box */
|
||||
bounding_box_update_box(box, &temp_box);
|
||||
bounding_box_update_with_box(box, &temp_box);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -33,6 +33,21 @@
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
/**
|
||||
* @brief External renderer paramameters to command line renderer
|
||||
*/
|
||||
struct external_renderer_params {
|
||||
/**
|
||||
* @brief Path to shared object
|
||||
*/
|
||||
char *so_path;
|
||||
|
||||
/**
|
||||
* @brief Command line parameters given
|
||||
*/
|
||||
char *cli_params;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Convert GDS according to command line parameters
|
||||
* @param gds_name Path to GDS File
|
||||
@@ -40,7 +55,7 @@
|
||||
* @param renderers Renderer ids
|
||||
* @param output_file_names Output file names
|
||||
* @param layer_file Layer mapping file
|
||||
* @param so_path Shared object
|
||||
* @param ext_param Settings for external library renderer
|
||||
* @param tex_standalone Standalone TeX
|
||||
* @param tex_layers TeX OCR layers
|
||||
* @param scale Scale value
|
||||
@@ -51,7 +66,7 @@ int command_line_convert_gds(const char *gds_name,
|
||||
char **renderers,
|
||||
char **output_file_names,
|
||||
const char *layer_file,
|
||||
const char *so_path,
|
||||
struct external_renderer_params *ext_param,
|
||||
gboolean tex_standalone,
|
||||
gboolean tex_layers,
|
||||
double scale);
|
||||
|
@@ -48,9 +48,11 @@
|
||||
*
|
||||
* @param[in] filename Path to the GDS file
|
||||
* @param[in,out] library_array GList Pointer.
|
||||
* @param[in] parsing_options Parsing options.
|
||||
* @return 0 if successful
|
||||
*/
|
||||
int parse_gds_from_file(const char *filename, GList **library_array);
|
||||
int parse_gds_from_file(const char *filename, GList **library_array,
|
||||
const struct gds_library_parsing_opts *parsing_options);
|
||||
|
||||
/**
|
||||
* @brief Deletes all libraries including cells, references etc.
|
||||
|
@@ -58,7 +58,7 @@ enum graphics_type
|
||||
enum path_type {PATH_FLUSH = 0, PATH_ROUNDED = 1, PATH_SQUARED = 2}; /**< Path line caps */
|
||||
|
||||
/**
|
||||
* @brief A point in the 2D plane. Sometimes reffered to as vertex
|
||||
* @brief A point in the 2D plane. Sometimes referred to as vertex
|
||||
*/
|
||||
struct gds_point {
|
||||
int x;
|
||||
@@ -101,7 +101,7 @@ struct gds_graphics {
|
||||
enum path_type path_render_type; /**< @brief Line cap */
|
||||
int width_absolute; /**< @brief Width. Not used for objects other than paths */
|
||||
int16_t layer; /**< @brief Layer the graphic object is on */
|
||||
uint16_t datatype;
|
||||
int16_t datatype; /**< @brief Data type of graphic object */
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -129,6 +129,13 @@ struct gds_cell {
|
||||
struct gds_cell_checks checks; /**< @brief Checking results */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Options, hwo this liobrary was parsed.
|
||||
*/
|
||||
struct gds_library_parsing_opts {
|
||||
int simplified_polygons; /**< @brief Polygons have been simplified. Coincident end point removed. */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief GDS Toplevel library
|
||||
*/
|
||||
@@ -136,6 +143,7 @@ struct gds_library {
|
||||
char name[CELL_NAME_MAX];
|
||||
struct gds_time_field mod_time;
|
||||
struct gds_time_field access_time;
|
||||
struct gds_library_parsing_opts parsing_opts;
|
||||
double unit_in_meters; /**< Length of a database unit in meters */
|
||||
GList *cells; /**< List of #gds_cell that contains all cells in this library*/
|
||||
GList *cell_names /**< List of strings that contains all cell names */;
|
||||
|
@@ -35,23 +35,118 @@
|
||||
#include <gds-render/geometric/vector-operations.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
/**
|
||||
* @brief Union describing a bounding box
|
||||
*
|
||||
* Two ways of accessing a bounding box are possible.
|
||||
*
|
||||
* Either, use the "named" vectors struct to specifically access the points
|
||||
* @code
|
||||
* lower_left = box.vectors.lower_left;
|
||||
* upper right = box.vectors.upper_right;
|
||||
* @endcode
|
||||
*
|
||||
* or use the iterable vector array:
|
||||
* @code
|
||||
* for (i = 0; i < 2; i++)
|
||||
* box.vector_array[i] = points[i];
|
||||
* @endcode
|
||||
*/
|
||||
union bounding_box {
|
||||
/** Coordinate System is (y up | x right) */
|
||||
/**
|
||||
* @brief Location vectors of upper right and lower left bounding box points
|
||||
* @note Coordinate System is (y up | x right)
|
||||
*/
|
||||
struct _vectors {
|
||||
/** @brief Lower left point of the bounding box */
|
||||
struct vector_2d lower_left;
|
||||
/** @brief Upper right point of the bounding box */
|
||||
struct vector_2d upper_right;
|
||||
} vectors;
|
||||
/**
|
||||
* @brief Array of vectors representing a bounding box
|
||||
* @note This is more convenient for iterating
|
||||
*/
|
||||
struct vector_2d vector_array[2];
|
||||
};
|
||||
|
||||
/*
|
||||
* @brief Pointer to a function that takes any pointer and converts this object to a vector_2d struct
|
||||
*/
|
||||
typedef void (*conv_generic_to_vector_2d_t)(void *, struct vector_2d *);
|
||||
|
||||
void bounding_box_calculate_polygon(GList *vertices, conv_generic_to_vector_2d_t conv_func, union bounding_box *box);
|
||||
void bounding_box_update_box(union bounding_box *destination, union bounding_box *update);
|
||||
/**
|
||||
* @brief Calculate bounding box of polygon
|
||||
* @param vertices List of vertices that describe the polygon
|
||||
* @param conv_func Conversion function to convert vertices to vector_2d structs.
|
||||
* @param box Box to write to. This box is not updated! All previous data is discarded
|
||||
*/
|
||||
void bounding_box_calculate_from_polygon(GList *vertices, conv_generic_to_vector_2d_t conv_func, union bounding_box *box);
|
||||
|
||||
/**
|
||||
* @brief Update an exisitng bounding box with another one.
|
||||
* @param destination Target box to update
|
||||
* @param update Box to update the target with
|
||||
*/
|
||||
void bounding_box_update_with_box(union bounding_box *destination, union bounding_box *update);
|
||||
|
||||
/**
|
||||
* @brief Prepare an empty bounding box.
|
||||
*
|
||||
* Updating this specially prepared box, results in a bounding box that is the same size as the update
|
||||
*
|
||||
* @param box Box to preapre
|
||||
*/
|
||||
void bounding_box_prepare_empty(union bounding_box *box);
|
||||
void bounding_box_update_point(union bounding_box *destination, conv_generic_to_vector_2d_t conv_func, void *pt);
|
||||
|
||||
/**
|
||||
* @brief Update bounding box with a point
|
||||
* @param destination Bounding box to update
|
||||
* @param conv_func Conversion function to convert \p pt to a vector_2d. May be NULL
|
||||
* @param pt Point to update bounding box with
|
||||
*/
|
||||
void bounding_box_update_with_point(union bounding_box *destination, conv_generic_to_vector_2d_t conv_func, void *pt);
|
||||
|
||||
/**
|
||||
* @brief Return all four corner points of a bounding box
|
||||
* @param[out] points Array of 4 vector_2d structs that has to be allocated by the caller
|
||||
* @param box Bounding box
|
||||
*/
|
||||
void bounding_box_get_all_points(struct vector_2d *points, union bounding_box *box);
|
||||
|
||||
/**
|
||||
* @brief Apply transformations onto bounding box.
|
||||
*
|
||||
* All corner points \f$ \vec{P_i} \f$ of the bounding box are transformed to output points \f$ \vec{P_o} \f$ by:
|
||||
*
|
||||
* \f$ \vec{P_o} = s \cdot \begin{pmatrix}\cos\left(\phi\right) & -\sin\left(\phi\right)\\ \sin\left(\phi\right) & \cos\left(\phi\right)\end{pmatrix} \cdot \begin{pmatrix} 1 & 0 \\ 0 & -1^{m} \end{pmatrix} \cdot \vec{P_i} \f$, with:
|
||||
*
|
||||
* * \f$s\f$: Scale
|
||||
* * \f$m\f$: 1, if flipped_at_x is True, else 0
|
||||
* * \f$\phi\f$: Rotation angle in radians. The conversion degrees => radians is done internally
|
||||
*
|
||||
* The result is the bounding box generated around all output points
|
||||
*
|
||||
* @param scale Scaling factor
|
||||
* @param rotation_deg Rotation of bounding box around the origin in degrees (counterclockwise)
|
||||
* @param flip_at_x Flip the boundig box on the x axis before rotating.
|
||||
* @param box Bounding box the operations should be applied to.
|
||||
* @note Keep in mind, that this bounding box is actually the bounding box of the rotated boundig box and not the object itself.
|
||||
* It might be too big.
|
||||
*/
|
||||
void bounding_box_apply_transform(double scale, double rotation_deg, bool flip_at_x, union bounding_box *box);
|
||||
void bounding_box_calculate_path_box(GList *vertices, double thickness, conv_generic_to_vector_2d_t conv_func, union bounding_box *box);
|
||||
|
||||
/**
|
||||
* @brief Calculate the bounding box of a path and update the given bounding box
|
||||
* @param vertices Vertices the path is made up of
|
||||
* @param thickness Thisckness of the path
|
||||
* @param conv_func Conversion function for vertices to vector_2d structs
|
||||
* @param box Bounding box to write results in.
|
||||
* @warning This function is not yet implemented correctly. Miter points of paths are not taken into account.
|
||||
* If a path is the outmost object of your cell _and_ it is not parallel to one of the coordinate axes,
|
||||
* the calculated bounding box size might be off. In other cases it should be reasonable close to the real bounding box.
|
||||
*/
|
||||
void bounding_box_update_with_path(GList *vertices, double thickness, conv_generic_to_vector_2d_t conv_func, union bounding_box *box);
|
||||
|
||||
#endif /* _BOUNDING_BOX_H_ */
|
||||
|
||||
|
@@ -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__ */
|
||||
|
@@ -41,7 +41,7 @@ struct layer_info
|
||||
{
|
||||
int layer; /**< @brief Layer number */
|
||||
char *name; /**< @brief Layer name. */
|
||||
int stacked_position; ///< @brief Position of layer in output @warning This parameter is not used by any renderer so far @note Lower is bottom, higher is top
|
||||
int stacked_position; /**< @brief Position of layer in output @warning This parameter is not used by any renderer so far @note Lower is bottom, higher is top */
|
||||
GdkRGBA color; /**< @brief RGBA color used to render this layer */
|
||||
int render; /**< @brief true: Render to output */
|
||||
};
|
||||
|
@@ -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
|
||||
|
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* GDSII-Converter
|
||||
* Copyright (C) 2018 Mario Hüttel <mario.huettel@gmx.net>
|
||||
*
|
||||
* This file is part of GDSII-Converter.
|
||||
*
|
||||
* GDSII-Converter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* GDSII-Converter is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GDSII-Converter. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __EXTERNAL_RENDERER_INTERFACES_H__
|
||||
#define __EXTERNAL_RENDERER_INTERFACES_H__
|
||||
|
||||
#ifndef xstr
|
||||
|
||||
#define xstr(a) str(a)
|
||||
#define str(a) #a
|
||||
|
||||
#endif /* xstr */
|
||||
|
||||
/**
|
||||
* @addtogroup ExternalRenderer
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief This define is used to export a function from a shared object
|
||||
*/
|
||||
#define EXPORT_FUNC __attribute__((visibility("default")))
|
||||
|
||||
/**
|
||||
* @brief Function name expected to be found in external library for rendering.
|
||||
*
|
||||
* The function has to be defined as follows:
|
||||
* @code
|
||||
* int EXTERNAL_LIBRARY_RENDER_FUNCTION(struct gds_cell *toplevel, GList *layer_info_list, const char *output_file_name, double scale);
|
||||
* @endcode
|
||||
*/
|
||||
#define EXTERNAL_LIBRARY_RENDER_FUNCTION exported_render_cell_to_file
|
||||
|
||||
/**
|
||||
* @brief Function name expected to be found in external library for initialization.
|
||||
*
|
||||
* @code
|
||||
* int EXTERNAL_LIBRARY_INIT_FUNCTION(const char *option_string, const char *version_string);
|
||||
* @endcode
|
||||
*/
|
||||
#define EXTERNAL_LIBRARY_INIT_FUNCTION exported_init
|
||||
|
||||
/**
|
||||
* @brief Global integer specified by an external renderer to signal, that the init and render functions shall be executed in a subprocess
|
||||
*
|
||||
* The pure presence of this symbol name causes forking. The content of this variable is don't care.
|
||||
* @note Use this if you mess with the internal structures of gds-render
|
||||
*/
|
||||
#define EXTERNAL_LIBRARY_FORK_REQUEST exported_fork_request
|
||||
|
||||
/**
|
||||
* @brief Define for declaring the exported functions.
|
||||
*
|
||||
* This not only helps with the declaration but also makes the symbols visible, so they can be called form outside the library
|
||||
*/
|
||||
#define EXPORTED_FUNC_DECL(FUNC) EXPORT_FUNC FUNC
|
||||
|
||||
/** @} */
|
||||
|
||||
#endif /* __EXTERNAL_RENDERER_INTERFACES_H__ */
|
@@ -33,6 +33,7 @@
|
||||
|
||||
#include <gds-render/output-renderers/gds-output-renderer.h>
|
||||
#include <gds-render/gds-utils/gds-types.h>
|
||||
#include <gds-render/output-renderers/external-renderer-interfaces.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@@ -40,16 +41,6 @@ G_BEGIN_DECLS
|
||||
|
||||
G_DECLARE_FINAL_TYPE(ExternalRenderer, external_renderer, GDS_RENDER, EXTERNAL_RENDERER, GdsOutputRenderer)
|
||||
|
||||
/**
|
||||
* @brief function name expected to be found in external library.
|
||||
*
|
||||
* The function has to be defined as follows:
|
||||
* @code
|
||||
* int EXTERNAL_LIBRARY_FUNCTION(struct gds_cell *toplevel, GList *layer_info_list, const char *output_file_name, double scale)
|
||||
* @endcode
|
||||
*/
|
||||
#define EXTERNAL_LIBRARY_FUNCTION "render_cell_to_file"
|
||||
|
||||
/**
|
||||
* @brief Create new ExternalRenderer object
|
||||
* @return New object
|
||||
@@ -59,9 +50,10 @@ ExternalRenderer *external_renderer_new();
|
||||
/**
|
||||
* @brief Create new ExternalRenderer object with specified shared object path
|
||||
* @param so_path Path to shared object, the rendering function is searched in
|
||||
* @param param_string Command line parameter string passed to external renderer
|
||||
* @return New object.
|
||||
*/
|
||||
ExternalRenderer *external_renderer_new_with_so(const char *so_path);
|
||||
ExternalRenderer *external_renderer_new_with_so_and_param(const char *so_path, const char *param_string);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
@@ -77,9 +77,9 @@ static void layer_settings_class_init(LayerSettingsClass *klass)
|
||||
* @brief Copy layer_info struct
|
||||
*
|
||||
* This function copies a layer info struct.
|
||||
* Be aware, that it does not only copy the pointer to the
|
||||
* layer name, but instead duplicates the string.
|
||||
*
|
||||
* @note Be aware, that it does not only copy the pointer to the
|
||||
* layer name, but instead duplicates the string.
|
||||
* @param info Info to copy
|
||||
* @return new layer_info struct
|
||||
*/
|
||||
|
31
main.c
31
main.c
@@ -23,8 +23,6 @@
|
||||
* @author Mario Hüttel <mario.huettel@gmx.net>
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <glib.h>
|
||||
@@ -160,7 +158,6 @@ static void gapp_activate(GApplication *app, gpointer user_data)
|
||||
{
|
||||
GtkWindow *main_window;
|
||||
GdsRenderGui *gui;
|
||||
|
||||
struct application_data * const appdata = (struct application_data *)user_data;
|
||||
|
||||
gui = gds_render_gui_new();
|
||||
@@ -265,9 +262,12 @@ int main(int argc, char **argv)
|
||||
gchar *cellname = NULL;
|
||||
gchar **renderer_args = NULL;
|
||||
gboolean version = FALSE, pdf_standalone = FALSE, pdf_layers = FALSE;
|
||||
gchar *custom_library_path = NULL;
|
||||
int scale = 1000;
|
||||
int app_status = 0;
|
||||
struct external_renderer_params so_render_params;
|
||||
|
||||
so_render_params.so_path = NULL;
|
||||
so_render_params.cli_params = NULL;
|
||||
|
||||
bindtextdomain(GETTEXT_PACKAGE, LOCALEDATADIR "/locale");
|
||||
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
|
||||
@@ -284,9 +284,11 @@ int main(int argc, char **argv)
|
||||
{"cell", 'c', 0, G_OPTION_ARG_STRING, &cellname, _("Cell to render"), "NAME" },
|
||||
{"tex-standalone", 'a', 0, G_OPTION_ARG_NONE, &pdf_standalone, _("Create standalone TeX"), NULL },
|
||||
{"tex-layers", 'l', 0, G_OPTION_ARG_NONE, &pdf_layers, _("Create PDF Layers (OCG)"), NULL },
|
||||
{"custom-render-lib", 'P', 0, G_OPTION_ARG_FILENAME, &custom_library_path,
|
||||
"Path to a custom shared object, that implements the " EXTERNAL_LIBRARY_FUNCTION " function", "PATH"},
|
||||
{NULL}
|
||||
{"custom-render-lib", 'P', 0, G_OPTION_ARG_FILENAME, &so_render_params.so_path,
|
||||
_("Path to a custom shared object, that implements the necessary rendering functions"), "PATH"},
|
||||
{"render-lib-params", 'W', 0, G_OPTION_ARG_STRING, &so_render_params.cli_params,
|
||||
_("Argument string passed to render lib"), NULL},
|
||||
{NULL, 0, 0, 0, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
context = g_option_context_new(_(" FILE - Convert GDS file <FILE> to graphic"));
|
||||
@@ -298,6 +300,8 @@ int main(int argc, char **argv)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
g_option_context_free(context);
|
||||
|
||||
if (version) {
|
||||
print_version();
|
||||
goto ret_status;
|
||||
@@ -318,14 +322,17 @@ int main(int argc, char **argv)
|
||||
|
||||
app_status =
|
||||
command_line_convert_gds(gds_name, cellname, renderer_args, output_paths, mappingname,
|
||||
custom_library_path, pdf_standalone, pdf_layers, scale);
|
||||
&so_render_params, pdf_standalone, pdf_layers, scale);
|
||||
|
||||
} else {
|
||||
app_status = start_gui(argc, argv);
|
||||
}
|
||||
|
||||
ret_status:
|
||||
/* If necessary, free command line parameters */
|
||||
/* If necessary, free command line parameters.
|
||||
* This is only really necessary for automated mem-leak testing.
|
||||
* Omitting these frees would be perfectly fine.
|
||||
*/
|
||||
if (output_paths)
|
||||
g_strfreev(output_paths);
|
||||
if (renderer_args)
|
||||
@@ -334,8 +341,10 @@ ret_status:
|
||||
g_free(mappingname);
|
||||
if (cellname)
|
||||
free(cellname);
|
||||
if (custom_library_path)
|
||||
free(custom_library_path);
|
||||
if (so_render_params.so_path)
|
||||
free(so_render_params.so_path);
|
||||
if (so_render_params.cli_params)
|
||||
g_free(so_render_params.cli_params);
|
||||
|
||||
return app_status;
|
||||
}
|
||||
|
@@ -31,6 +31,7 @@
|
||||
#include <cairo.h>
|
||||
#include <cairo-pdf.h>
|
||||
#include <cairo-svg.h>
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
#include <gds-render/output-renderers/cairo-renderer.h>
|
||||
#include <sys/wait.h>
|
||||
@@ -267,19 +268,27 @@ static int cairo_renderer_render_cell_to_vector_file(GdsOutputRenderer *renderer
|
||||
//process_id = -1;
|
||||
if (process_id < 0) {
|
||||
/* This should not happen */
|
||||
fprintf(stderr, "Fatal error: Cairo Renderer: Could not spawn child process!");
|
||||
fprintf(stderr, _("Fatal error: Cairo Renderer: Could not spawn child process!"));
|
||||
exit(-2);
|
||||
} else if (process_id > 0) {
|
||||
/* Woohoo... Successfully dumped the shitty code to an unknowing victim */
|
||||
goto ret_parent;
|
||||
}
|
||||
|
||||
/* Close stdin and (stdout and stderr may live on) */
|
||||
/* We are now in a separate process just for rendering the output image.
|
||||
* You may print a log message to the activity bar of the gui by writing a line
|
||||
* teminated with '\n' to comm_pipe[1]. This will be handled by the parent process.
|
||||
* Directly calling the update function
|
||||
* gds_output_renderer_update_async_progress()
|
||||
* does not have any effect because this is a separate process.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Close stdin and (stdout and stderr may live on)
|
||||
*/
|
||||
close(0);
|
||||
//close(1);
|
||||
close(comm_pipe[0]);
|
||||
|
||||
|
||||
layers = (struct cairo_layer *)calloc(MAX_LAYERS, sizeof(struct cairo_layer));
|
||||
|
||||
/* Clear layers */
|
||||
@@ -317,7 +326,7 @@ static int cairo_renderer_render_cell_to_vector_file(GdsOutputRenderer *renderer
|
||||
linfo = (struct layer_info *)info_list->data;
|
||||
|
||||
if (linfo->layer >= MAX_LAYERS) {
|
||||
printf("Layer outside of Spec.\n");
|
||||
printf(_("Layer number too high / outside of spec.\n"));
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -327,7 +336,7 @@ static int cairo_renderer_render_cell_to_vector_file(GdsOutputRenderer *renderer
|
||||
/* Print size */
|
||||
cairo_recording_surface_ink_extents(layers[linfo->layer].rec, &rec_x0, &rec_y0,
|
||||
&rec_width, &rec_height);
|
||||
dprintf(comm_pipe[1], "Size of layer %d%s%s%s: <%lf x %lf> @ (%lf | %lf)\n",
|
||||
dprintf(comm_pipe[1], _("Size of layer %d%s%s%s: <%lf x %lf> @ (%lf | %lf)\n"),
|
||||
linfo->layer,
|
||||
(linfo->name && linfo->name[0] ? " (" : ""),
|
||||
(linfo->name && linfo->name[0] ? linfo->name : ""),
|
||||
@@ -362,16 +371,16 @@ static int cairo_renderer_render_cell_to_vector_file(GdsOutputRenderer *renderer
|
||||
for (info_list = layer_infos; info_list != NULL; info_list = g_list_next(info_list)) {
|
||||
linfo = (struct layer_info *)info_list->data;
|
||||
|
||||
dprintf(comm_pipe[1], "Exporting layer %d to file\n", linfo->layer);
|
||||
|
||||
if (linfo->layer >= MAX_LAYERS) {
|
||||
printf("Layer outside of Spec.\n");
|
||||
printf(_("Layer outside of spec.\n"));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!linfo->render)
|
||||
continue;
|
||||
|
||||
dprintf(comm_pipe[1], _("Exporting layer %d to file\n"), linfo->layer);
|
||||
|
||||
if (pdf_file && pdf_cr) {
|
||||
cairo_set_source_surface(pdf_cr, layers[linfo->layer].rec, -xmin, -ymin);
|
||||
cairo_paint_with_alpha(pdf_cr, linfo->color.alpha);
|
||||
@@ -405,7 +414,7 @@ ret_clear_layers:
|
||||
}
|
||||
free(layers);
|
||||
|
||||
printf("Cairo export finished. It might still be buggy!\n");
|
||||
printf(_("Cairo export finished. It might still be buggy!\n"));
|
||||
|
||||
/* Suspend child process */
|
||||
exit(0);
|
||||
@@ -463,7 +472,7 @@ static int cairo_renderer_render_output(GdsOutputRenderer *renderer,
|
||||
else
|
||||
pdf_file = output_file;
|
||||
|
||||
gds_output_renderer_update_async_progress(renderer, "Rendering Cairo Output...");
|
||||
gds_output_renderer_update_async_progress(renderer, _("Rendering Cairo Output..."));
|
||||
ret = cairo_renderer_render_cell_to_vector_file(renderer, cell, layer_infos, pdf_file, svg_file, scale);
|
||||
|
||||
if (settings)
|
||||
|
@@ -30,16 +30,23 @@
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/wait.h>
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
#include <gds-render/output-renderers/external-renderer.h>
|
||||
#include <gds-render/version.h>
|
||||
|
||||
#define FORCE_FORK 0U /**< @brief if != 0, then forking is forced regardless of the shared object's settings */
|
||||
|
||||
struct _ExternalRenderer {
|
||||
GdsOutputRenderer parent;
|
||||
char *shared_object_path;
|
||||
char *cli_param_string;
|
||||
};
|
||||
|
||||
enum {
|
||||
PROP_SO_PATH = 1, /**< @brief Shared object path property */
|
||||
PROP_PARAM_STRING, /** @brief Shared object renderer parameter string from CLI */
|
||||
N_PROPERTIES /**< @brief Used to get property count */
|
||||
};
|
||||
|
||||
@@ -52,18 +59,23 @@ G_DEFINE_TYPE(ExternalRenderer, external_renderer, GDS_RENDER_TYPE_OUTPUT_RENDER
|
||||
* @param output_file Destination file
|
||||
* @param scale the scaling value to scale the output cell down by.
|
||||
* @param so_path Path to shared object
|
||||
* @param params Parameters passed to EXTERNAL_LIBRARY_INIT_FUNCTION
|
||||
* @return 0 if successful
|
||||
*/
|
||||
static int external_renderer_render_cell(struct gds_cell *toplevel_cell, GList *layer_info_list,
|
||||
const char *output_file, double scale, const char *so_path)
|
||||
const char *output_file, double scale, const char *so_path, const char *params)
|
||||
{
|
||||
int (*so_render_func)(struct gds_cell *, GList *, const char *, double) = NULL;
|
||||
int (*so_init_func)(const char *, const char *) = NULL;
|
||||
void *so_handle = NULL;
|
||||
char *error_msg;
|
||||
int forking_req;
|
||||
int ret = 0;
|
||||
pid_t fork_pid = 0;
|
||||
int forked_status;
|
||||
|
||||
if (!so_path) {
|
||||
fprintf(stderr, "Path to shared object not set!\n");
|
||||
fprintf(stderr, _("Path to shared object not set!\n"));
|
||||
return -3000;
|
||||
}
|
||||
|
||||
@@ -74,26 +86,61 @@ static int external_renderer_render_cell(struct gds_cell *toplevel_cell, GList *
|
||||
/* Load shared object */
|
||||
so_handle = dlopen(so_path, RTLD_LAZY);
|
||||
if (!so_handle) {
|
||||
fprintf(stderr, "Could not load external library '%s'\nDetailed error is:\n%s\n", so_path, dlerror());
|
||||
fprintf(stderr, _("Could not load external library '%s'\nDetailed error is:\n%s\n"), so_path, dlerror());
|
||||
return -2000;
|
||||
}
|
||||
|
||||
/* Load symbol from library */
|
||||
/* Load rendering symbol from library */
|
||||
so_render_func = (int (*)(struct gds_cell *, GList *, const char *, double))
|
||||
dlsym(so_handle, EXTERNAL_LIBRARY_FUNCTION);
|
||||
dlsym(so_handle, xstr(EXTERNAL_LIBRARY_RENDER_FUNCTION));
|
||||
error_msg = dlerror();
|
||||
if (error_msg != NULL) {
|
||||
fprintf(stderr, "Rendering function not found in library:\n%s\n", error_msg);
|
||||
fprintf(stderr, _("Rendering function not found in library:\n%s\n"), error_msg);
|
||||
goto ret_close_so_handle;
|
||||
}
|
||||
|
||||
/* Execute */
|
||||
if (so_render_func) {
|
||||
g_message("Calling external renderer.");
|
||||
ret = so_render_func(toplevel_cell, layer_info_list, output_file, scale);
|
||||
g_message("External renderer finished.");
|
||||
/* Load the init function */
|
||||
so_init_func = (int (*)(const char *, const char *))dlsym(so_handle, xstr(EXTERNAL_LIBRARY_INIT_FUNCTION));
|
||||
error_msg = dlerror();
|
||||
if (error_msg != NULL) {
|
||||
fprintf(stderr, _("Init function not found in library:\n%s\n"), error_msg);
|
||||
goto ret_close_so_handle;
|
||||
}
|
||||
|
||||
/* Check if forking is requested */
|
||||
if (dlsym(so_handle, xstr(EXTERNAL_LIBRARY_FORK_REQUEST)))
|
||||
forking_req = 1;
|
||||
else if (FORCE_FORK)
|
||||
forking_req = 1;
|
||||
else
|
||||
forking_req = 0;
|
||||
|
||||
/* Execute */
|
||||
|
||||
g_message(_("Calling external renderer."));
|
||||
|
||||
if (forking_req)
|
||||
fork_pid = fork();
|
||||
if (fork_pid != 0)
|
||||
goto end_forked;
|
||||
|
||||
ret = so_init_func(params, _app_version_string);
|
||||
if (!ret)
|
||||
ret = so_render_func(toplevel_cell, layer_info_list, output_file, scale);
|
||||
|
||||
/* If we are in a separate process, terminate here */
|
||||
if (forking_req)
|
||||
exit(ret);
|
||||
|
||||
/* The forked paths end here */
|
||||
end_forked:
|
||||
if (forking_req) {
|
||||
waitpid(fork_pid, &forked_status, 0);
|
||||
ret = WEXITSTATUS(forked_status);
|
||||
}
|
||||
|
||||
g_message(_("External renderer finished."));
|
||||
|
||||
ret_close_so_handle:
|
||||
dlclose(so_handle);
|
||||
return ret;
|
||||
@@ -116,7 +163,8 @@ static int external_renderer_render_output(GdsOutputRenderer *renderer,
|
||||
if (settings)
|
||||
layer_infos = layer_settings_get_layer_info_list(settings);
|
||||
|
||||
ret = external_renderer_render_cell(cell, layer_infos, output_file, scale, ext_renderer->shared_object_path);
|
||||
ret = external_renderer_render_cell(cell, layer_infos, output_file, scale, ext_renderer->shared_object_path,
|
||||
ext_renderer->cli_param_string);
|
||||
if (settings)
|
||||
g_object_unref(settings);
|
||||
|
||||
@@ -133,6 +181,9 @@ static void external_renderer_get_property(GObject *obj, guint property_id, GVal
|
||||
case PROP_SO_PATH:
|
||||
g_value_set_string(value, self->shared_object_path);
|
||||
break;
|
||||
case PROP_PARAM_STRING:
|
||||
g_value_set_string(value, self->cli_param_string);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, property_id, pspec);
|
||||
break;
|
||||
@@ -151,6 +202,11 @@ static void external_renderer_set_property(GObject *obj, guint property_id, cons
|
||||
g_free(self->shared_object_path);
|
||||
self->shared_object_path = g_value_dup_string(value);
|
||||
break;
|
||||
case PROP_PARAM_STRING:
|
||||
if (self->cli_param_string)
|
||||
g_free(self->cli_param_string);
|
||||
self->cli_param_string = g_value_dup_string(value);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, property_id, pspec);
|
||||
break;
|
||||
@@ -159,7 +215,9 @@ static void external_renderer_set_property(GObject *obj, guint property_id, cons
|
||||
|
||||
static void external_renderer_dispose(GObject *self_obj)
|
||||
{
|
||||
ExternalRenderer *self = GDS_RENDER_EXTERNAL_RENDERER(self_obj);
|
||||
ExternalRenderer *self;
|
||||
|
||||
self = GDS_RENDER_EXTERNAL_RENDERER(self_obj);
|
||||
|
||||
if (self->shared_object_path) {
|
||||
g_free(self->shared_object_path);
|
||||
@@ -189,9 +247,15 @@ static void external_renderer_class_init(ExternalRendererClass *klass)
|
||||
|
||||
/* Setup properties */
|
||||
external_renderer_properties[PROP_SO_PATH] =
|
||||
g_param_spec_string("shared-object-path",
|
||||
"Shared object file path",
|
||||
"Path to the shared object to search rendering function in.",
|
||||
g_param_spec_string(N_("shared-object-path"),
|
||||
N_("Shared object file path"),
|
||||
N_("Path to the shared object to search rendering function in."),
|
||||
NULL,
|
||||
G_PARAM_READWRITE);
|
||||
external_renderer_properties[PROP_PARAM_STRING] =
|
||||
g_param_spec_string(N_("param-string"),
|
||||
N_("Shared object renderer parameter string"),
|
||||
N_("Command line arguments passed to the external shared object renderer"),
|
||||
NULL,
|
||||
G_PARAM_READWRITE);
|
||||
g_object_class_install_properties(oclass, N_PROPERTIES, external_renderer_properties);
|
||||
@@ -200,6 +264,7 @@ static void external_renderer_class_init(ExternalRendererClass *klass)
|
||||
static void external_renderer_init(ExternalRenderer *self)
|
||||
{
|
||||
self->shared_object_path = NULL;
|
||||
self->cli_param_string = NULL;
|
||||
}
|
||||
|
||||
ExternalRenderer *external_renderer_new()
|
||||
@@ -207,9 +272,10 @@ ExternalRenderer *external_renderer_new()
|
||||
return g_object_new(GDS_RENDER_TYPE_EXTERNAL_RENDERER, NULL);
|
||||
}
|
||||
|
||||
ExternalRenderer *external_renderer_new_with_so(const char *so_path)
|
||||
ExternalRenderer *external_renderer_new_with_so_and_param(const char *so_path, const char *param_string)
|
||||
{
|
||||
return g_object_new(GDS_RENDER_TYPE_EXTERNAL_RENDERER, "shared-object-path", so_path, NULL);
|
||||
return g_object_new(GDS_RENDER_TYPE_EXTERNAL_RENDERER, N_("shared-object-path"), so_path,
|
||||
N_("param-string"), param_string, NULL);
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
@@ -28,6 +28,7 @@
|
||||
*/
|
||||
|
||||
#include <gds-render/output-renderers/gds-output-renderer.h>
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
struct renderer_params {
|
||||
struct gds_cell *cell;
|
||||
@@ -70,7 +71,7 @@ static int gds_output_renderer_render_dummy(GdsOutputRenderer *renderer,
|
||||
(void)cell;
|
||||
(void)scale;
|
||||
|
||||
g_warning("Output renderer does not define a render_output function!");
|
||||
g_warning(_("Output renderer does not define a render_output function!"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -99,6 +100,11 @@ static void gds_output_renderer_dispose(GObject *self_obj)
|
||||
if (priv->output_file)
|
||||
g_free(priv->output_file);
|
||||
|
||||
if (priv->idle_function_parameters.status_message) {
|
||||
g_free(priv->idle_function_parameters.status_message);
|
||||
priv->idle_function_parameters.status_message = NULL;
|
||||
}
|
||||
|
||||
g_clear_object(&priv->layer_settings);
|
||||
|
||||
/* Chain up to parent class */
|
||||
@@ -168,17 +174,17 @@ static void gds_output_renderer_class_init(GdsOutputRendererClass *klass)
|
||||
|
||||
/* Setup properties */
|
||||
gds_output_renderer_properties[PROP_OUTPUT_FILE] =
|
||||
g_param_spec_string("output-file", "output file", "Output file for renderer",
|
||||
g_param_spec_string(N_("output-file"), N_("output file"), N_("Output file for renderer"),
|
||||
NULL, G_PARAM_READWRITE);
|
||||
gds_output_renderer_properties[PROP_LAYER_SETTINGS] =
|
||||
g_param_spec_object("layer-settings", "Layer Settings object",
|
||||
"Object containing the layer rendering information",
|
||||
g_param_spec_object(N_("layer-settings"), N_("Layer Settings object"),
|
||||
N_("Object containing the layer rendering information"),
|
||||
GDS_RENDER_TYPE_LAYER_SETTINGS, G_PARAM_READWRITE);
|
||||
g_object_class_install_properties(oclass, N_PROPERTIES, gds_output_renderer_properties);
|
||||
|
||||
/* Setup output signals */
|
||||
gds_output_renderer_signals[ASYNC_FINISHED] =
|
||||
g_signal_newv("async-finished", GDS_RENDER_TYPE_OUTPUT_RENDERER,
|
||||
g_signal_newv(N_("async-finished"), GDS_RENDER_TYPE_OUTPUT_RENDERER,
|
||||
G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE,
|
||||
NULL,
|
||||
NULL,
|
||||
@@ -188,7 +194,7 @@ static void gds_output_renderer_class_init(GdsOutputRendererClass *klass)
|
||||
0,
|
||||
NULL);
|
||||
gds_output_renderer_signals[ASYNC_PROGRESS_CHANGED] =
|
||||
g_signal_newv("progress-changed", GDS_RENDER_TYPE_OUTPUT_RENDERER,
|
||||
g_signal_newv(N_("progress-changed"), GDS_RENDER_TYPE_OUTPUT_RENDERER,
|
||||
G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE,
|
||||
NULL,
|
||||
NULL,
|
||||
@@ -223,8 +229,8 @@ GdsOutputRenderer *gds_output_renderer_new()
|
||||
GdsOutputRenderer *gds_output_renderer_new_with_props(const char *output_file, LayerSettings *layer_settings)
|
||||
{
|
||||
return GDS_RENDER_OUTPUT_RENDERER(g_object_new(GDS_RENDER_TYPE_OUTPUT_RENDERER,
|
||||
"layer-settings", layer_settings,
|
||||
"output-file", output_file,
|
||||
N_("layer-settings"), layer_settings,
|
||||
N_("output-file"), output_file,
|
||||
NULL));
|
||||
}
|
||||
|
||||
@@ -235,14 +241,14 @@ void gds_output_renderer_set_output_file(GdsOutputRenderer *renderer, const gcha
|
||||
/* Check if the filename is actually filled */
|
||||
if (!file_name || !file_name[0])
|
||||
return;
|
||||
g_object_set(renderer, "output-file", file_name, NULL);
|
||||
g_object_set(renderer, N_("output-file"), file_name, NULL);
|
||||
}
|
||||
|
||||
const char *gds_output_renderer_get_output_file(GdsOutputRenderer *renderer)
|
||||
{
|
||||
const char *file = NULL;
|
||||
|
||||
g_object_get(renderer, "output-file", &file, NULL);
|
||||
g_object_get(renderer, N_("output-file"), &file, NULL);
|
||||
return file;
|
||||
}
|
||||
|
||||
@@ -257,7 +263,7 @@ LayerSettings *gds_output_renderer_get_and_ref_layer_settings(GdsOutputRenderer
|
||||
g_mutex_lock(&priv->settings_lock);
|
||||
|
||||
/* This function seems to already reference the LayerSettings object */
|
||||
g_object_get(renderer, "layer-settings", &ret, NULL);
|
||||
g_object_get(renderer, N_("layer-settings"), &ret, NULL);
|
||||
|
||||
/* It is now safe to clear the lock */
|
||||
g_mutex_unlock(&priv->settings_lock);
|
||||
@@ -269,7 +275,7 @@ void gds_output_renderer_set_layer_settings(GdsOutputRenderer *renderer, LayerSe
|
||||
{
|
||||
g_return_if_fail(GDS_RENDER_IS_LAYER_SETTINGS(settings));
|
||||
|
||||
g_object_set(renderer, "layer-settings", settings, NULL);
|
||||
g_object_set(renderer, N_("layer-settings"), settings, NULL);
|
||||
}
|
||||
|
||||
int gds_output_renderer_render_output(GdsOutputRenderer *renderer, struct gds_cell *cell, double scale)
|
||||
@@ -279,28 +285,28 @@ int gds_output_renderer_render_output(GdsOutputRenderer *renderer, struct gds_ce
|
||||
GdsOutputRendererPrivate *priv = gds_output_renderer_get_instance_private(renderer);
|
||||
|
||||
if (GDS_RENDER_IS_OUTPUT_RENDERER(renderer) == FALSE) {
|
||||
g_error("Output Renderer not valid.");
|
||||
g_error(_("Output Renderer not valid."));
|
||||
return GDS_OUTPUT_RENDERER_GEN_ERR;
|
||||
}
|
||||
|
||||
if (!priv->output_file || !priv->output_file[0]) {
|
||||
g_error("No/invalid output file set.");
|
||||
g_error(_("No/invalid output file set."));
|
||||
return GDS_OUTPUT_RENDERER_GEN_ERR;
|
||||
}
|
||||
|
||||
if (!priv->layer_settings) {
|
||||
g_error("No layer specification supplied.");
|
||||
g_error(_("No layer specification supplied."));
|
||||
return GDS_OUTPUT_RENDERER_GEN_ERR;
|
||||
}
|
||||
|
||||
if (!cell) {
|
||||
g_error("Output renderer called without cell to render.");
|
||||
g_error(_("Output renderer called without cell to render."));
|
||||
return GDS_OUTPUT_RENDERER_PARAM_ERR;
|
||||
}
|
||||
|
||||
klass = GDS_RENDER_OUTPUT_RENDERER_GET_CLASS(renderer);
|
||||
if (klass->render_output == NULL) {
|
||||
g_critical("Output Renderer: Rendering function broken. This is a bug.");
|
||||
g_critical(_("Output Renderer: Rendering function broken. This is a bug."));
|
||||
return GDS_OUTPUT_RENDERER_GEN_ERR;
|
||||
}
|
||||
|
||||
@@ -361,12 +367,14 @@ int gds_output_renderer_render_output_async(GdsOutputRenderer *renderer, struct
|
||||
|
||||
priv = gds_output_renderer_get_instance_private(renderer);
|
||||
if (priv->task) {
|
||||
g_warning("renderer already started asynchronously");
|
||||
g_warning(_("Renderer already started asynchronously"));
|
||||
return -2000;
|
||||
}
|
||||
|
||||
priv->task = g_task_new(renderer, NULL, gds_output_renderer_async_finished, NULL);
|
||||
g_task_set_name(priv->task, "Rendering Thread");
|
||||
|
||||
/* This function is not available on current debian distros. */
|
||||
/* g_task_set_name(priv->task, "Rendering Thread"); */
|
||||
|
||||
g_mutex_lock(&priv->settings_lock);
|
||||
priv->async_params.cell = cell;
|
||||
|
@@ -27,6 +27,8 @@
|
||||
#include <stdio.h>
|
||||
#include <gds-render/output-renderers/latex-renderer.h>
|
||||
#include <gdk/gdk.h>
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
/**
|
||||
* @addtogroup LaTeX-Renderer
|
||||
* @{
|
||||
@@ -248,7 +250,7 @@ static void render_cell(struct gds_cell *cell, GList *layer_infos, FILE *tex_fil
|
||||
struct gds_cell_instance *inst;
|
||||
|
||||
status = g_string_new(NULL);
|
||||
g_string_printf(status, "Generating cell %s", cell->name);
|
||||
g_string_printf(status, _("Generating cell %s"), cell->name);
|
||||
gds_output_renderer_update_async_progress(renderer, status->str);
|
||||
g_string_free(status, TRUE);
|
||||
|
||||
@@ -368,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)
|
||||
@@ -433,14 +435,14 @@ static void latex_renderer_class_init(LatexRendererClass *klass)
|
||||
|
||||
latex_renderer_properties[PROP_STANDALONE] =
|
||||
g_param_spec_boolean("standalone",
|
||||
"Standalone TeX file",
|
||||
"Generate a standalone LaTeX file.",
|
||||
N_("Standalone TeX file"),
|
||||
N_("Generate a standalone LaTeX file."),
|
||||
FALSE,
|
||||
G_PARAM_READWRITE);
|
||||
latex_renderer_properties[PROP_PDF_LAYERS] =
|
||||
g_param_spec_boolean("pdf-layers",
|
||||
"PDF OCR layers",
|
||||
"Generate OCR layers",
|
||||
N_("PDF OCR layers"),
|
||||
N_("Generate OCR layers"),
|
||||
FALSE,
|
||||
G_PARAM_READWRITE);
|
||||
|
||||
|
@@ -1,2 +1,2 @@
|
||||
add_subdirectory(python-renderer)
|
||||
add_custom_target(plugins DEPENDS pythonrenderer)
|
||||
add_subdirectory(plugin-example)
|
||||
add_custom_target(plugins DEPENDS pluginexample)
|
||||
|
@@ -1,4 +1,4 @@
|
||||
project(pythonrenderer)
|
||||
project(pluginexample)
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_search_module(PYTHON REQUIRED python3)
|
||||
@@ -10,3 +10,5 @@ link_libraries(${PYTHON_LDFLAGS} version)
|
||||
|
||||
add_library(${PROJECT_NAME} SHARED EXCLUDE_FROM_ALL ${SOURCES})
|
||||
add_dependencies(${PROJECT_NAME} version)
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES C_VISIBILITY_PRESET hidden)
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden)
|
49
plugins/plugin-example/src/plugin-main.c
Normal file
49
plugins/plugin-example/src/plugin-main.c
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* GDSII-Converter example plugin
|
||||
* Copyright (C) 2019 Mario Hüttel <mario.huettel@gmx.net>
|
||||
*
|
||||
* This file is part of GDSII-Converter.
|
||||
*
|
||||
* GDSII-Converter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* GDSII-Converter is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GDSII-Converter. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup example-plugin Example Plugin for External Renderer
|
||||
* @ingroup plugins
|
||||
* This is a template / example for an external renderer plugin
|
||||
* @addtogroup example-plugin
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
#include <gds-render/gds-utils/gds-types.h>
|
||||
#include <gds-render/output-renderers/external-renderer-interfaces.h>
|
||||
|
||||
int EXPORTED_FUNC_DECL(EXTERNAL_LIBRARY_RENDER_FUNCTION)(struct gds_cell *toplevel, GList *layer_info_list, const char *output_file_name, double scale)
|
||||
{
|
||||
if (!toplevel)
|
||||
return -1000;
|
||||
|
||||
printf("Rendering %s\n", toplevel->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int EXPORTED_FUNC_DECL(EXTERNAL_LIBRARY_INIT_FUNCTION)(const char *params, const char *version)
|
||||
{
|
||||
printf("Init with params: %s\ngds-render version: %s\n", params, version);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** @} */
|
@@ -1,7 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int a(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
@@ -1,26 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.22.1 -->
|
||||
<!-- Generated with glade 3.38.2 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<object class="GtkAdjustment" id="adjustment1">
|
||||
<property name="upper">1</property>
|
||||
<property name="value">1</property>
|
||||
<property name="step_increment">0.01</property>
|
||||
<property name="page_increment">0.10000000000000001</property>
|
||||
<property name="step-increment">0.01</property>
|
||||
<property name="page-increment">0.10</property>
|
||||
</object>
|
||||
<object class="GtkBox" id="box">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="spacing">3</property>
|
||||
<child>
|
||||
<object class="GtkEventBox" id="event-box">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-justify-fill</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="icon-name">open-menu-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -33,7 +33,7 @@
|
||||
<child>
|
||||
<object class="GtkLabel" id="layer">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">label</property>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -45,9 +45,9 @@
|
||||
<child>
|
||||
<object class="GtkColorButton" id="color">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_alpha">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="use-alpha">True</property>
|
||||
<property name="title" translatable="yes">Select Layer Color and Opacity</property>
|
||||
<property name="rgba">rgb(0,0,0)</property>
|
||||
</object>
|
||||
@@ -61,9 +61,9 @@
|
||||
<object class="GtkCheckButton" id="export">
|
||||
<property name="label" translatable="yes">Export Layer</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -74,7 +74,7 @@
|
||||
<child>
|
||||
<object class="GtkEntry" id="entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
|
@@ -1,145 +1,57 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.22.1 -->
|
||||
<!-- Generated with glade 3.38.2 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<object class="GtkImage" id="auto-name-img">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-edit</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="icon-name">format-text-rich-symbolic</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="color-img">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-select-color</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="load-mapping-img">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-open</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="save-mapping-img">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Save the current layer configuration to CSV</property>
|
||||
<property name="stock">gtk-save-as</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="icon-name">color-select-symbolic</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="select-all-img">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-apply</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="icon-name">emblem-ok-symbolic</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="sort-down-img">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-sort-ascending</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="icon-name">view-sort-descending-symbolic</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="sort-up-img">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-sort-descending</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="icon-name">view-sort-ascending-symbolic</property>
|
||||
</object>
|
||||
<object class="GtkWindow" id="main-window">
|
||||
<property name="height_request">250</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">gds-render</property>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar" id="header-bar">
|
||||
<property name="name">header</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="title" translatable="yes">GDS-Render</property>
|
||||
<property name="show_close_button">True</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="button-load-gds">
|
||||
<property name="label">gtk-open</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Open GDS2 Database</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="always_show_image">True</property>
|
||||
<style>
|
||||
<class name="suggested-action"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button-load-mapping">
|
||||
<property name="label" translatable="yes">Load Mapping</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Load the current layer configuration from CSV</property>
|
||||
<property name="image">load-mapping-img</property>
|
||||
<property name="always_show_image">True</property>
|
||||
<style>
|
||||
<class name="suggested-action"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button-save-mapping">
|
||||
<property name="label" translatable="yes">Save Mapping</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="image">save-mapping-img</property>
|
||||
<property name="always_show_image">True</property>
|
||||
<style>
|
||||
<class name="suggested-action"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="convert-button">
|
||||
<property name="label">gtk-convert</property>
|
||||
<property name="name">button-convert</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Convert selected cell</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="always_show_image">True</property>
|
||||
<style>
|
||||
<class name="suggested-action"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<property name="height-request">250</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="icon-name">gds-render</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkSearchEntry" id="cell-search">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="primary_icon_name">edit-find-symbolic</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="primary_icon_sensitive">False</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="primary-icon-name">edit-find-symbolic</property>
|
||||
<property name="primary-icon-activatable">False</property>
|
||||
<property name="primary-icon-sensitive">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -150,15 +62,15 @@
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hscrollbar_policy">never</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="cell-tree">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="enable_search">False</property>
|
||||
<property name="enable_grid_lines">both</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="enable-search">False</property>
|
||||
<property name="enable-grid-lines">both</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection"/>
|
||||
</child>
|
||||
@@ -181,20 +93,20 @@
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="button-up-sort">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Sort layers ascending</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="tooltip-text" translatable="yes">Sort layers ascending</property>
|
||||
<property name="image">sort-up-img</property>
|
||||
<property name="always_show_image">True</property>
|
||||
<property name="always-show-image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -205,11 +117,11 @@
|
||||
<child>
|
||||
<object class="GtkButton" id="button-down-sort">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Sort layers descending</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="tooltip-text" translatable="yes">Sort layers descending</property>
|
||||
<property name="image">sort-down-img</property>
|
||||
<property name="always_show_image">True</property>
|
||||
<property name="always-show-image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -220,11 +132,11 @@
|
||||
<child>
|
||||
<object class="GtkButton" id="auto-color-button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Automatically color layers</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="tooltip-text" translatable="yes">Automatically color layers</property>
|
||||
<property name="image">color-img</property>
|
||||
<property name="always_show_image">True</property>
|
||||
<property name="always-show-image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -235,11 +147,11 @@
|
||||
<child>
|
||||
<object class="GtkButton" id="button-select-all">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Select all layers for export</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="tooltip-text" translatable="yes">Select all layers for export</property>
|
||||
<property name="image">select-all-img</property>
|
||||
<property name="always_show_image">True</property>
|
||||
<property name="always-show-image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -250,11 +162,11 @@
|
||||
<child>
|
||||
<object class="GtkButton" id="button-auto-name">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Automatically name layers</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="tooltip-text" translatable="yes">Automatically name layers</property>
|
||||
<property name="image">auto-name-img</property>
|
||||
<property name="always_show_image">True</property>
|
||||
<property name="always-show-image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -272,19 +184,19 @@
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="margin_top">1</property>
|
||||
<property name="hscrollbar_policy">never</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="margin-top">1</property>
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<child>
|
||||
<object class="GtkViewport">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkListBox" id="layer-list">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="selection-mode">none</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -313,7 +225,7 @@
|
||||
<child>
|
||||
<object class="GtkBox" id="activity-bar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
@@ -327,5 +239,75 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar" id="header-bar">
|
||||
<property name="name">header</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="title" translatable="yes">GDS-Render</property>
|
||||
<property name="show-close-button">True</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="button-load-gds">
|
||||
<property name="label">Open GDS</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="tooltip-text" translatable="yes">Open GDS2 Database</property>
|
||||
<style>
|
||||
<class name="suggested-action"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button-load-mapping">
|
||||
<property name="label" translatable="yes">Load Mapping</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="tooltip-text" translatable="yes">Load the current layer configuration from CSV</property>
|
||||
<style>
|
||||
<class name="suggested-action"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button-save-mapping">
|
||||
<property name="label" translatable="yes">Save Mapping</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<style>
|
||||
<class name="suggested-action"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="convert-button">
|
||||
<property name="label">Convert Cell</property>
|
||||
<property name="name">button-convert</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="tooltip-text" translatable="yes">Convert selected cell</property>
|
||||
<property name="always-show-image">True</property>
|
||||
<style>
|
||||
<class name="suggested-action"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
|
41
test/CMakeLists.txt
Normal file
41
test/CMakeLists.txt
Normal file
@@ -0,0 +1,41 @@
|
||||
project(gds-render-test)
|
||||
|
||||
add_custom_target(test "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}" "-r compact" "-s" DEPENDS ${PROJECT_NAME})
|
||||
|
||||
if(NOT WIN32)
|
||||
string(ASCII 27 Esc)
|
||||
set(ColorReset "${Esc}[m")
|
||||
set(ColorBold "${Esc}[1m")
|
||||
set(Red "${Esc}[31m")
|
||||
set(Green "${Esc}[32m")
|
||||
set(Yellow "${Esc}[33m")
|
||||
set(Blue "${Esc}[34m")
|
||||
set(Magenta "${Esc}[35m")
|
||||
set(Cyan "${Esc}[36m")
|
||||
set(White "${Esc}[37m")
|
||||
set(BoldRed "${Esc}[1;31m")
|
||||
set(BoldGreen "${Esc}[1;32m")
|
||||
set(BoldYellow "${Esc}[1;33m")
|
||||
set(BoldBlue "${Esc}[1;34m")
|
||||
set(BoldMagenta "${Esc}[1;35m")
|
||||
set(BoldCyan "${Esc}[1;36m")
|
||||
set(BoldWhite "${Esc}[1;37m")
|
||||
endif()
|
||||
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/catch-framework")
|
||||
|
||||
aux_source_directory("geometric" GEOMETRIC_TEST_SOURCES)
|
||||
set(TEST_SOURCES
|
||||
${GEOMETRIC_TEST_SOURCES}
|
||||
)
|
||||
|
||||
set(DUT_SOURCES
|
||||
"../geometric/vector-operations.c"
|
||||
)
|
||||
|
||||
add_executable(${PROJECT_NAME} EXCLUDE_FROM_ALL "test-main.cpp" ${TEST_SOURCES} ${DUT_SOURCES})
|
||||
target_link_libraries(${PROJECT_NAME} ${GLIB_LDFLAGS} ${GTK3_LDFLAGS} ${CAIRO_LDFLAGS} m version ${CMAKE_DL_LIBS})
|
||||
|
17618
test/catch-framework/catch.hpp
Normal file
17618
test/catch-framework/catch.hpp
Normal file
File diff suppressed because it is too large
Load Diff
160
test/geometric/vector-operations.cpp
Normal file
160
test/geometric/vector-operations.cpp
Normal file
@@ -0,0 +1,160 @@
|
||||
#include <catch.hpp>
|
||||
#include <limits>
|
||||
|
||||
extern "C" {
|
||||
#include <gds-render/geometric/vector-operations.h>
|
||||
}
|
||||
|
||||
TEST_CASE("geometric/vector-operations/vector_2d_add", "[GEOMETRIC]")
|
||||
{
|
||||
struct vector_2d res;
|
||||
struct vector_2d a;
|
||||
struct vector_2d b;
|
||||
|
||||
a.x = 1;
|
||||
a.y = 2;
|
||||
|
||||
b.x = 2;
|
||||
b.y = 6;
|
||||
|
||||
vector_2d_add(&res, &a, &b);
|
||||
|
||||
REQUIRE(res.x == Approx(a.x + b.x));
|
||||
REQUIRE(res.y == Approx(a.y + b.y));
|
||||
}
|
||||
|
||||
TEST_CASE("geometric/vector-operations/vector_2d_calculate_angle_between", "[GEOMETRIC]")
|
||||
{
|
||||
double angle;
|
||||
struct vector_2d a;
|
||||
struct vector_2d b;
|
||||
|
||||
a.x = 1;
|
||||
a.y = 0;
|
||||
|
||||
b.x = 0;
|
||||
b.y = 1;
|
||||
|
||||
angle = vector_2d_calculate_angle_between(&a, &a);
|
||||
REQUIRE(angle == Approx(0.0));
|
||||
|
||||
angle = vector_2d_calculate_angle_between(&a, &b);
|
||||
REQUIRE(angle == Approx(90.0 / 180.0 * M_PI));
|
||||
}
|
||||
|
||||
TEST_CASE("geometric/vector-operations/vector_2d_subtract", "[GEOMETRIC]")
|
||||
{
|
||||
struct vector_2d res;
|
||||
struct vector_2d a;
|
||||
struct vector_2d b;
|
||||
|
||||
a.x = 1;
|
||||
a.y = 2;
|
||||
|
||||
b.x = 2;
|
||||
b.y = 6;
|
||||
|
||||
vector_2d_subtract(&res, &a, &b);
|
||||
|
||||
REQUIRE(res.x == Approx(a.x - b.x));
|
||||
REQUIRE(res.y == Approx(a.y - b.y));
|
||||
}
|
||||
|
||||
TEST_CASE("geometric/vector-operations/vector_2d_abs", "[GEOMETRIC]")
|
||||
{
|
||||
struct vector_2d c;
|
||||
struct vector_2d a;
|
||||
struct vector_2d b;
|
||||
double a_len, b_len, c_len;
|
||||
|
||||
a.x = 1;
|
||||
a.y = 0;
|
||||
|
||||
b.x = 0;
|
||||
b.y = 2;
|
||||
|
||||
c.x = 3;
|
||||
c.y = 4;
|
||||
|
||||
a_len = vector_2d_abs(&a);
|
||||
b_len = vector_2d_abs(&b);
|
||||
c_len = vector_2d_abs(&c);
|
||||
|
||||
REQUIRE(a_len == Approx(1.0));
|
||||
REQUIRE(b_len == Approx(2.0));
|
||||
REQUIRE(c_len == Approx(5.0));
|
||||
}
|
||||
|
||||
TEST_CASE("geometric/vector-operations/vector_2d_scalar_multipy", "[GEOMETRIC]")
|
||||
{
|
||||
struct vector_2d c;
|
||||
struct vector_2d a;
|
||||
struct vector_2d b;
|
||||
double mult;
|
||||
|
||||
a.x = 1;
|
||||
a.y = 0;
|
||||
b.x = 0;
|
||||
b.y = 2;
|
||||
mult = vector_2d_scalar_multipy(&a, &b);
|
||||
REQUIRE(mult == Approx(0.0));
|
||||
|
||||
a.x = 1;
|
||||
a.y = 1;
|
||||
b.x = 1;
|
||||
b.y = 1;
|
||||
mult = vector_2d_scalar_multipy(&a, &b);
|
||||
REQUIRE(mult == Approx(2.0));
|
||||
}
|
||||
|
||||
TEST_CASE("geometric/vector-operations/vector_2d_normalize", "[GEOMETRIC]")
|
||||
{
|
||||
struct vector_2d a;
|
||||
|
||||
a.x = 1;
|
||||
a.y = 0;
|
||||
vector_2d_normalize(&a);
|
||||
REQUIRE(a.x == Approx(1.0));
|
||||
REQUIRE(a.y == Approx(0.0));
|
||||
|
||||
a.x = 1;
|
||||
a.y = -1;
|
||||
vector_2d_normalize(&a);
|
||||
REQUIRE(a.x == Approx(1.0/sqrt(2)));
|
||||
REQUIRE(a.y == Approx(-1.0/sqrt(2)));
|
||||
}
|
||||
|
||||
TEST_CASE("geometric/vector-operations/vector_2d_rotate", "[GEOMETRIC]")
|
||||
{
|
||||
struct vector_2d a;
|
||||
|
||||
a.x = 1;
|
||||
a.y = 0;
|
||||
vector_2d_rotate(&a, M_PI/2);
|
||||
REQUIRE(a.x == Approx(0.0).scale(0.001));
|
||||
REQUIRE(a.y == Approx(1.0));
|
||||
|
||||
a.x = 0;
|
||||
a.y = 1;
|
||||
vector_2d_rotate(&a, -M_PI/2);
|
||||
vector_2d_rotate(&a, M_PI);
|
||||
REQUIRE(a.x == Approx(-1.0));
|
||||
REQUIRE(a.y == Approx(0.0).scale(0.001));
|
||||
}
|
||||
|
||||
TEST_CASE("geometric/vector-operations/vector_2d_scale", "[GEOMETRIC]")
|
||||
{
|
||||
struct vector_2d a;
|
||||
|
||||
a.x = 1;
|
||||
a.y = 0;
|
||||
vector_2d_scale(&a, 2.0);
|
||||
REQUIRE(a.x == Approx(2.0));
|
||||
REQUIRE(a.y == Approx(0.0));
|
||||
|
||||
a.x = 1;
|
||||
a.y = -3;
|
||||
vector_2d_scale(&a, 0.5);
|
||||
REQUIRE(a.x == Approx(0.5));
|
||||
REQUIRE(a.y == Approx(-1.5));
|
||||
}
|
2
test/test-main.cpp
Normal file
2
test/test-main.cpp
Normal file
@@ -0,0 +1,2 @@
|
||||
#define CATCH_CONFIG_MAIN
|
||||
#include "catch-framework/catch.hpp"
|
@@ -12,8 +12,28 @@ cd "$DIR"
|
||||
files=`find ../ -name "*.c"`
|
||||
mkdir -p "pot"
|
||||
|
||||
# C Files
|
||||
|
||||
pot="pot/gds-render.pot"
|
||||
|
||||
for file in $files; do
|
||||
pot="pot/"$(echo "${file#*/}" | sed -e "s/\//_/g")
|
||||
pot="${pot%.c}.pot"
|
||||
xgettext --keyword=_ --language=C --add-comments --sort-output -o "$pot" "$file"
|
||||
echo "Parsing C file $file"
|
||||
# pot="pot/"$(echo "${file#*/}" | sed -e "s/\//_/g")
|
||||
# pot="${pot%.c}.pot"
|
||||
if [[ -f "$pot" ]]; then
|
||||
xgettext --package-name="gds-render" --join-existing --keyword=_ --language=C --add-comments --sort-output -o "$pot" "$file"
|
||||
else
|
||||
xgettext --package-name="gds-render" --keyword=_ --language=C --add-comments --sort-output -o "$pot" "$file"
|
||||
fi
|
||||
done
|
||||
|
||||
# Glade files
|
||||
glade_files=`find ../resources/ -name "*.glade"`
|
||||
for glade in $glade_files; do
|
||||
echo "Parsing Glade file $glade"
|
||||
if [[ -f "$pot" ]]; then
|
||||
xgettext --package-name="gds-render" --join-existing --keyword=_ -L Glade --sort-output -o "$pot" "$glade"
|
||||
else
|
||||
xgettext --package-name="gds-render" --keyword=_ -L Glade --sort-output -o "$pot" "$glade"
|
||||
fi
|
||||
done
|
||||
|
@@ -1,72 +0,0 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-10-25 20:27+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../command-line.c:203
|
||||
#, c-format
|
||||
msgid "%d reference loops found.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../command-line.c:207
|
||||
#, c-format
|
||||
msgid "Cell is affected by reference loop. Abort!\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../command-line.c:213
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Cell was not checked. This should not happen. Please report this issue. Will "
|
||||
"continue either way.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../command-line.c:200
|
||||
#, c-format
|
||||
msgid "Checking library %s failed.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../command-line.c:193
|
||||
#, c-format
|
||||
msgid "Couldn't find cell in first library!\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../command-line.c:81
|
||||
#, c-format
|
||||
msgid "Count of renderers %d does not match count of output file names %d\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../command-line.c:184
|
||||
#, c-format
|
||||
msgid "No library in library list. This should not happen.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../command-line.c:74
|
||||
#, c-format
|
||||
msgid "Please specify renderers and file names\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../command-line.c:104
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Please specify shared object for external renderer. Will ignore this "
|
||||
"renderer.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../command-line.c:158
|
||||
#, c-format
|
||||
msgid "Probably missing argument. Check --help option\n"
|
||||
msgstr ""
|
@@ -1,50 +0,0 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-10-25 20:27+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../gds-render-gui.c:273
|
||||
msgid "Acc. Date"
|
||||
msgstr ""
|
||||
|
||||
#: ../gds-render-gui.c:314
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: ../gds-render-gui.c:266
|
||||
msgid "Cell"
|
||||
msgstr ""
|
||||
|
||||
#: ../gds-render-gui.c:322
|
||||
msgid "GDSII-Files"
|
||||
msgstr ""
|
||||
|
||||
#: ../gds-render-gui.c:263
|
||||
msgid "Library"
|
||||
msgstr ""
|
||||
|
||||
#: ../gds-render-gui.c:270
|
||||
msgid "Mod. Date"
|
||||
msgstr ""
|
||||
|
||||
#: ../gds-render-gui.c:315
|
||||
msgid "Open GDSII"
|
||||
msgstr ""
|
||||
|
||||
#: ../gds-render-gui.c:312
|
||||
msgid "Open GDSII File"
|
||||
msgstr ""
|
456
translations/pot/gds-render.pot
Normal file
456
translations/pot/gds-render.pot
Normal file
@@ -0,0 +1,456 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the gds-render package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gds-render\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-12-16 18:27+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../main.c:97
|
||||
#, c-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Full git commit: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:294
|
||||
msgid " FILE - Convert GDS file <FILE> to graphic"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/about.glade:10
|
||||
msgid "!! Replaced during runtime !!"
|
||||
msgstr ""
|
||||
|
||||
#: ../command-line.c:205
|
||||
#, c-format
|
||||
msgid "%d reference loops found.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:220
|
||||
msgid "About"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:290
|
||||
msgid "Argument string passed to render lib"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/main.glade:225
|
||||
msgid "Automatically color layers"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/main.glade:255
|
||||
msgid "Automatically name layers"
|
||||
msgstr ""
|
||||
|
||||
#: ../gds-utils/gds-tree-checker.c:71
|
||||
#, c-format
|
||||
msgid "Broken cell list item found in cell %s. Will continue.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../gds-utils/gds-tree-checker.c:57
|
||||
#, c-format
|
||||
msgid "Broken cell list item found. Will continue.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../output-renderers/cairo-renderer.c:409
|
||||
#, c-format
|
||||
msgid "Cairo export finished. It might still be buggy!\n"
|
||||
msgstr ""
|
||||
|
||||
#. Execute
|
||||
#: ../output-renderers/external-renderer.c:120
|
||||
msgid "Calling external renderer."
|
||||
msgstr ""
|
||||
|
||||
#: ../gds-render-gui.c:286 ../widgets/conv-settings-dialog.c:291
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: ../gds-render-gui.c:244
|
||||
msgid "Cell"
|
||||
msgstr ""
|
||||
|
||||
#: ../command-line.c:209
|
||||
#, c-format
|
||||
msgid "Cell is affected by reference loop. Abort!\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:284
|
||||
msgid "Cell to render"
|
||||
msgstr ""
|
||||
|
||||
#: ../command-line.c:215
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Cell was not checked. This should not happen. Please report this issue. Will "
|
||||
"continue either way.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../command-line.c:202
|
||||
#, c-format
|
||||
msgid "Checking library %s failed.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/dialog.glade:79
|
||||
msgid "Configure LaTeX as standalone document"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/main.glade:109
|
||||
msgid "Convert selected cell"
|
||||
msgstr ""
|
||||
|
||||
#: ../output-renderers/external-renderer.c:89
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Could not load external library '%s'\n"
|
||||
"Detailed error is:\n"
|
||||
"%s\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../output-renderers/latex-renderer.c:373
|
||||
msgid "Could not open LaTeX output file"
|
||||
msgstr ""
|
||||
|
||||
#: ../command-line.c:195
|
||||
#, c-format
|
||||
msgid "Couldn't find cell in first library!\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../command-line.c:81
|
||||
#, c-format
|
||||
msgid "Count of renderers %d does not match count of output file names %d\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:286
|
||||
msgid "Create PDF Layers (OCG)"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:285
|
||||
msgid "Create standalone TeX"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:280
|
||||
msgid "Divide output coordinates by <SCALE>"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/layer-widget.glade:62
|
||||
msgid "Export Layer"
|
||||
msgstr ""
|
||||
|
||||
#: ../output-renderers/cairo-renderer.c:366
|
||||
#, c-format
|
||||
msgid "Exporting layer %d to file\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../output-renderers/external-renderer.c:142
|
||||
msgid "External renderer finished."
|
||||
msgstr ""
|
||||
|
||||
#. This should not happen
|
||||
#: ../output-renderers/cairo-renderer.c:271
|
||||
#, c-format
|
||||
msgid "Fatal error: Cairo Renderer: Could not spawn child process!"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/main.glade:50
|
||||
msgid "GDS-Render"
|
||||
msgstr ""
|
||||
|
||||
#: ../gds-render-gui.c:294
|
||||
msgid "GDSII-Files"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/dialog.glade:18
|
||||
msgid "Generate LaTeX/TikZ output"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/dialog.glade:93
|
||||
msgid "Generate PDF Layers"
|
||||
msgstr ""
|
||||
|
||||
#: ../output-renderers/latex-renderer.c:253
|
||||
#, c-format
|
||||
msgid "Generating cell %s"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/about.glade:12
|
||||
msgid "Git Repository"
|
||||
msgstr ""
|
||||
|
||||
#: ../widgets/conv-settings-dialog.c:246
|
||||
#, c-format
|
||||
msgid "Height: %.3lf %sm"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:321
|
||||
#, c-format
|
||||
msgid "Ignored argument: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ../output-renderers/external-renderer.c:106
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Init function not found in library:\n"
|
||||
"%s\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../output-renderers/cairo-renderer.c:321
|
||||
#, c-format
|
||||
msgid "Layer number too high / outside of spec.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../output-renderers/cairo-renderer.c:369
|
||||
#, c-format
|
||||
msgid "Layer outside of spec.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../widgets/layer-element.c:102
|
||||
#, c-format
|
||||
msgid "Layer: %d"
|
||||
msgstr ""
|
||||
|
||||
#: ../gds-render-gui.c:241
|
||||
msgid "Library"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/main.glade:68
|
||||
msgid "Load Mapping"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/main.glade:73
|
||||
msgid "Load the current layer configuration from CSV"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:116
|
||||
#, c-format
|
||||
msgid "Logo could not be displayed: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../output-renderers/gds-output-renderer.c:293
|
||||
msgid "No layer specification supplied."
|
||||
msgstr ""
|
||||
|
||||
#: ../command-line.c:186
|
||||
#, c-format
|
||||
msgid "No library in library list. This should not happen.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../output-renderers/gds-output-renderer.c:288
|
||||
msgid "No/invalid output file set."
|
||||
msgstr ""
|
||||
|
||||
#: ../widgets/conv-settings-dialog.c:291
|
||||
msgid "OK"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/main.glade:58
|
||||
msgid "Open GDS2 Database"
|
||||
msgstr ""
|
||||
|
||||
#: ../gds-render-gui.c:287
|
||||
msgid "Open GDSII"
|
||||
msgstr ""
|
||||
|
||||
#: ../gds-render-gui.c:284
|
||||
msgid "Open GDSII File"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:299
|
||||
#, c-format
|
||||
msgid "Option parsing failed: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../widgets/conv-settings-dialog.c:255
|
||||
#, c-format
|
||||
msgid "Output Height: %u px"
|
||||
msgstr ""
|
||||
|
||||
#: ../output-renderers/gds-output-renderer.c:283
|
||||
msgid "Output Renderer not valid."
|
||||
msgstr ""
|
||||
|
||||
#: ../output-renderers/gds-output-renderer.c:304
|
||||
msgid "Output Renderer: Rendering function broken. This is a bug."
|
||||
msgstr ""
|
||||
|
||||
#. Set the pixel sizes
|
||||
#: ../widgets/conv-settings-dialog.c:252
|
||||
#, c-format
|
||||
msgid "Output Width: %u px"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:282
|
||||
msgid "Output file path. Can be used multiple times."
|
||||
msgstr ""
|
||||
|
||||
#: ../output-renderers/gds-output-renderer.c:298
|
||||
msgid "Output renderer called without cell to render."
|
||||
msgstr ""
|
||||
|
||||
#: ../output-renderers/gds-output-renderer.c:74
|
||||
msgid "Output renderer does not define a render_output function!"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:283
|
||||
msgid "Path for Layer Mapping File"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:288
|
||||
msgid ""
|
||||
"Path to a custom shared object, that implements the necessary rendering "
|
||||
"functions"
|
||||
msgstr ""
|
||||
|
||||
#: ../output-renderers/external-renderer.c:78
|
||||
#, c-format
|
||||
msgid "Path to shared object not set!\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../command-line.c:74
|
||||
#, c-format
|
||||
msgid "Please specify renderers and file names\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../command-line.c:104
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Please specify shared object for external renderer. Will ignore this "
|
||||
"renderer.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:277
|
||||
msgid "Print version"
|
||||
msgstr ""
|
||||
|
||||
#: ../command-line.c:160
|
||||
#, c-format
|
||||
msgid "Probably missing argument. Check --help option\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:219
|
||||
msgid "Quit"
|
||||
msgstr ""
|
||||
|
||||
#: ../widgets/activity-bar.c:104
|
||||
msgid "Ready"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/dialog.glade:33
|
||||
msgid "Render PDF using Cairographics"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/dialog.glade:48
|
||||
msgid "Render SVG using Cairographics (too buggy at the moment)"
|
||||
msgstr ""
|
||||
|
||||
#: ../widgets/conv-settings-dialog.c:293
|
||||
msgid "Renderer Settings"
|
||||
msgstr ""
|
||||
|
||||
#: ../output-renderers/gds-output-renderer.c:365
|
||||
msgid "Renderer already started asynchronously"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:279
|
||||
msgid "Renderer to use. Can be used multiple times."
|
||||
msgstr ""
|
||||
|
||||
#: ../output-renderers/cairo-renderer.c:467
|
||||
msgid "Rendering Cairo Output..."
|
||||
msgstr ""
|
||||
|
||||
#: ../gds-render-gui.c:554
|
||||
msgid "Rendering cell..."
|
||||
msgstr ""
|
||||
|
||||
#: ../output-renderers/external-renderer.c:98
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Rendering function not found in library:\n"
|
||||
"%s\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/main.glade:86
|
||||
msgid "Save Mapping"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/main.glade:23
|
||||
msgid "Save the current layer configuration to CSV"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:312
|
||||
#, c-format
|
||||
msgid "Scale < 1 not allowed. Setting to 1\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/layer-widget.glade:51
|
||||
msgid "Select Layer Color and Opacity"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/main.glade:240
|
||||
msgid "Select all layers for export"
|
||||
msgstr ""
|
||||
|
||||
#: ../output-renderers/cairo-renderer.c:331
|
||||
#, c-format
|
||||
msgid "Size of layer %d%s%s%s: <%lf x %lf> @ (%lf | %lf)\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/main.glade:195
|
||||
msgid "Sort layers ascending"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/main.glade:210
|
||||
msgid "Sort layers descending"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:212
|
||||
#, c-format
|
||||
msgid ""
|
||||
"There is already an open instance. Will open second window in that "
|
||||
"instance.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:244
|
||||
#, c-format
|
||||
msgid ""
|
||||
"This is gds-render, version: %s\n"
|
||||
"\n"
|
||||
"For a list of supported commands execute with --help option.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../gds-utils/gds-tree-checker.c:188
|
||||
#, c-format
|
||||
msgid "Visited cell list should be empty. This is a bug. Please report this.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../widgets/conv-settings-dialog.c:244
|
||||
#, c-format
|
||||
msgid "Width: %.3lf %sm"
|
||||
msgstr ""
|
||||
|
||||
#: ../widgets/activity-bar.c:110
|
||||
msgid "Working..."
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:96
|
||||
msgid ""
|
||||
"gds-render is a free tool for rendering GDS2 layout files into vector "
|
||||
"graphics."
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/layer-widget.glade:37
|
||||
msgid "label"
|
||||
msgstr ""
|
@@ -1,111 +0,0 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-10-25 20:27+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../main.c:99
|
||||
#, c-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Full git commit: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:289
|
||||
msgid " FILE - Convert GDS file <FILE> to graphic"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:223
|
||||
msgid "About"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:282
|
||||
msgid "Cell to render"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:284
|
||||
msgid "Create PDF Layers (OCG)"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:283
|
||||
msgid "Create standalone TeX"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:279
|
||||
msgid "Divide output coordinates by <SCALE>"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:314
|
||||
#, c-format
|
||||
msgid "Ignored argument: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:118
|
||||
#, c-format
|
||||
msgid "Logo could not be displayed: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:294
|
||||
#, c-format
|
||||
msgid "Option parsing failed: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:280
|
||||
msgid "Output file path. Can be used multiple times."
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:281
|
||||
msgid "Path for Layer Mapping File"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:277
|
||||
msgid "Print version"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:222
|
||||
msgid "Quit"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:278
|
||||
msgid "Renderer to use. Can be used multiple times."
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:305
|
||||
#, c-format
|
||||
msgid "Scale < 1 not allowed. Setting to 1\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:215
|
||||
#, c-format
|
||||
msgid ""
|
||||
"There is already an open instance. Will open second window in that "
|
||||
"instance.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:247
|
||||
#, c-format
|
||||
msgid ""
|
||||
"This is gds-render, version: %s\n"
|
||||
"\n"
|
||||
"For a list of supported commands execute with --help option.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../main.c:98
|
||||
msgid ""
|
||||
"gds-render is a free tool for rendering GDS2 layout files into vector "
|
||||
"graphics."
|
||||
msgstr ""
|
1
translations/pot/po/de/.gitignore
vendored
1
translations/pot/po/de/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
*.po~
|
@@ -1,73 +0,0 @@
|
||||
# German translations for gds-render package.
|
||||
# Copyright (C) 2019 THE gds-render's COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# Mario Hüttel <mario.huettel@gmx.net>, 2019.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-10-22 23:02+0200\n"
|
||||
"PO-Revision-Date: 2019-10-22 23:02+0200\n"
|
||||
"Last-Translator: <mario.huettel@gmx.net>\n"
|
||||
"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
|
||||
"Language: de\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: ../command-line.c:203
|
||||
#, c-format
|
||||
msgid "%d reference loops found.\n"
|
||||
msgstr "%d Referenzschleifen gefunden.\n"
|
||||
|
||||
#: ../command-line.c:207
|
||||
#, c-format
|
||||
msgid "Cell is affected by reference loop. Abort!\n"
|
||||
msgstr "Zelle von Referenzschleife betroffen. Abbruch!\n"
|
||||
|
||||
#: ../command-line.c:213
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Cell was not checked. This should not happen. Please report this issue. Will "
|
||||
"continue either way.\n"
|
||||
msgstr "Zelle wurde nicht überprüft. Das sollte nicht passieren. Bitte melden Sie dieses Fehlverhalten. Es wird "
|
||||
"dennoch fortgefahren.\n"
|
||||
|
||||
#: ../command-line.c:200
|
||||
#, c-format
|
||||
msgid "Checking library %s failed.\n"
|
||||
msgstr "Überprüfen der Bibliothek %s fehlgeschlagen.\n"
|
||||
|
||||
#: ../command-line.c:193
|
||||
#, c-format
|
||||
msgid "Couldn't find cell in first library!\n"
|
||||
msgstr "Konnte Zelle nicht in der ersten Bibliothek finden!\n"
|
||||
|
||||
#: ../command-line.c:81
|
||||
#, c-format
|
||||
msgid "Count of renderers %d does not match count of output file names %d\n"
|
||||
msgstr "Anzahl der Renderer %d entspricht nicht der Anzahl der angegebenen Ausgabepfade %s\n"
|
||||
|
||||
#: ../command-line.c:184
|
||||
#, c-format
|
||||
msgid "No library in library list. This should not happen.\n"
|
||||
msgstr "Keine Bilbiothek in Bibliotheksliste vorhanden. Dies sollte nicht passieren.\n"
|
||||
|
||||
#: ../command-line.c:74
|
||||
#, c-format
|
||||
msgid "Please specify renderers and file names\n"
|
||||
msgstr "Bitte geben Sie Renderer und Dateinamen an\n"
|
||||
|
||||
#: ../command-line.c:104
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Please specify shared object for external renderer. Will ignore this "
|
||||
"renderer.\n"
|
||||
msgstr "Bitte geben Sie ein 'shared object' für den externen Renderer an. Renderer wird ignoriert.\n"
|
||||
|
||||
#: ../command-line.c:158
|
||||
#, c-format
|
||||
msgid "Probably missing argument. Check --help option\n"
|
||||
msgstr "Vermutlich fehlendes Argument. Siehe --help Option für Hilfe\n"
|
@@ -1,50 +0,0 @@
|
||||
# German translations for PACKAGE package.
|
||||
# Copyright (C) 2019 THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# Mario Hüttel <mario.huettel@gmx.net>, 2019.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gds-render VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-10-22 23:02+0200\n"
|
||||
"PO-Revision-Date: 2019-10-18 23:10+0200\n"
|
||||
"Last-Translator: <mario.huettel@gmx.net>\n"
|
||||
"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
|
||||
"Language: de\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: ../gds-render-gui.c:273
|
||||
msgid "Acc. Date"
|
||||
msgstr "Zugr. Datum"
|
||||
|
||||
#: ../gds-render-gui.c:314
|
||||
msgid "Cancel"
|
||||
msgstr "Abbruch"
|
||||
|
||||
#: ../gds-render-gui.c:266
|
||||
msgid "Cell"
|
||||
msgstr "Zelle"
|
||||
|
||||
#: ../gds-render-gui.c:322
|
||||
msgid "GDSII-Files"
|
||||
msgstr "GDSII-Dateiem"
|
||||
|
||||
#: ../gds-render-gui.c:263
|
||||
msgid "Library"
|
||||
msgstr "Bibliothek"
|
||||
|
||||
#: ../gds-render-gui.c:270
|
||||
msgid "Mod. Date"
|
||||
msgstr "Mod. Datum"
|
||||
|
||||
#: ../gds-render-gui.c:315
|
||||
msgid "Open GDSII"
|
||||
msgstr "GDSII öffnen"
|
||||
|
||||
#: ../gds-render-gui.c:312
|
||||
msgid "Open GDSII File"
|
||||
msgstr "GDSII Datei öffnen"
|
487
translations/pot/po/de/gds-render.po
Normal file
487
translations/pot/po/de/gds-render.po
Normal file
@@ -0,0 +1,487 @@
|
||||
# German translations for gds-render package.
|
||||
# Copyright (C) 2019 THE gds-render'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the gds-render package.
|
||||
# マリオ <mario.huettel@gmx.net>, 2019.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gds-render\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-12-16 18:27+0100\n"
|
||||
"PO-Revision-Date: 2019-12-16 22:00+0100\n"
|
||||
"Last-Translator: Mario Hüttel <mario.huettel@gmx.net>\n"
|
||||
"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
|
||||
"Language: de\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Poedit 2.2.4\n"
|
||||
|
||||
#: ../main.c:97
|
||||
#, c-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Full git commit: %s"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Vollständiger git-Commit: %s"
|
||||
|
||||
#: ../main.c:294
|
||||
msgid " FILE - Convert GDS file <FILE> to graphic"
|
||||
msgstr " DATEI - Konvertiere GDS-Datei <DATEI> in Grafik"
|
||||
|
||||
#: ../resources/about.glade:10
|
||||
msgid "!! Replaced during runtime !!"
|
||||
msgstr "!! Ersetzt zur Laufzeit !!"
|
||||
|
||||
#: ../command-line.c:205
|
||||
#, c-format
|
||||
msgid "%d reference loops found.\n"
|
||||
msgstr "%d Referenzschleifen gefunden.\n"
|
||||
|
||||
#: ../main.c:220
|
||||
msgid "About"
|
||||
msgstr "Info"
|
||||
|
||||
#: ../main.c:290
|
||||
msgid "Argument string passed to render lib"
|
||||
msgstr "An Render-Bibliothek übergebener Argument-String"
|
||||
|
||||
#: ../resources/main.glade:225
|
||||
msgid "Automatically color layers"
|
||||
msgstr "Färbe Layer automatisch"
|
||||
|
||||
#: ../resources/main.glade:255
|
||||
msgid "Automatically name layers"
|
||||
msgstr "Bename Layer automatisch"
|
||||
|
||||
#: ../gds-utils/gds-tree-checker.c:71
|
||||
#, c-format
|
||||
msgid "Broken cell list item found in cell %s. Will continue.\n"
|
||||
msgstr "Defektes Listenelement in Zelle %s. Ignoriere.\n"
|
||||
|
||||
#: ../gds-utils/gds-tree-checker.c:57
|
||||
#, c-format
|
||||
msgid "Broken cell list item found. Will continue.\n"
|
||||
msgstr "Defektes Zellenelement in Liste gefunden. Ignoriere.\n"
|
||||
|
||||
#: ../output-renderers/cairo-renderer.c:409
|
||||
#, c-format
|
||||
msgid "Cairo export finished. It might still be buggy!\n"
|
||||
msgstr "Cairo-Export abgeschlossen. Möglicherweise fehlerhaft!\n"
|
||||
|
||||
#. Execute
|
||||
#: ../output-renderers/external-renderer.c:120
|
||||
msgid "Calling external renderer."
|
||||
msgstr "Rufe externen Renderer auf."
|
||||
|
||||
#: ../gds-render-gui.c:286 ../widgets/conv-settings-dialog.c:291
|
||||
msgid "Cancel"
|
||||
msgstr "Abbruch"
|
||||
|
||||
#: ../gds-render-gui.c:244
|
||||
msgid "Cell"
|
||||
msgstr "Zelle"
|
||||
|
||||
#: ../command-line.c:209
|
||||
#, c-format
|
||||
msgid "Cell is affected by reference loop. Abort!\n"
|
||||
msgstr "Zelle ist von referenzschleife betroffen. Abbruch!\n"
|
||||
|
||||
#: ../main.c:284
|
||||
msgid "Cell to render"
|
||||
msgstr "Zu rendernde Zelle"
|
||||
|
||||
#: ../command-line.c:215
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Cell was not checked. This should not happen. Please report this issue. Will "
|
||||
"continue either way.\n"
|
||||
msgstr ""
|
||||
"Zelle wurde nicht überprüft. Das sollte nicht passieren. Bitte melden Sie "
|
||||
"dieses Problem. Es wird dennoch fortgefahren.\n"
|
||||
|
||||
#: ../command-line.c:202
|
||||
#, c-format
|
||||
msgid "Checking library %s failed.\n"
|
||||
msgstr "Überprüfung von Bibliothek %s fehlgeschlagen.\n"
|
||||
|
||||
#: ../resources/dialog.glade:79
|
||||
msgid "Configure LaTeX as standalone document"
|
||||
msgstr "Konfiguriere LaTeX als eigenständiges Dokument"
|
||||
|
||||
#: ../resources/main.glade:109
|
||||
msgid "Convert selected cell"
|
||||
msgstr "Konvertiere ausgewählte Zelle"
|
||||
|
||||
#: ../output-renderers/external-renderer.c:89
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Could not load external library '%s'\n"
|
||||
"Detailed error is:\n"
|
||||
"%s\n"
|
||||
msgstr ""
|
||||
"Externe Bibliothek '%s' konnte nicht geladen werden.\n"
|
||||
"Detailierter Fehler:\n"
|
||||
"%s\n"
|
||||
|
||||
#: ../output-renderers/latex-renderer.c:373
|
||||
msgid "Could not open LaTeX output file"
|
||||
msgstr "LaTeX-Ausgabedatei konnte nicht geöffnet werden"
|
||||
|
||||
#: ../command-line.c:195
|
||||
#, c-format
|
||||
msgid "Couldn't find cell in first library!\n"
|
||||
msgstr "Zelle nicht in erster Bibliothek gefunden!\n"
|
||||
|
||||
#: ../command-line.c:81
|
||||
#, c-format
|
||||
msgid "Count of renderers %d does not match count of output file names %d\n"
|
||||
msgstr ""
|
||||
"Anzahl der Renderer %d stimmt nicht mit der Anzahl der angegebenen "
|
||||
"Ausgabedateinamen %d überein\n"
|
||||
|
||||
#: ../main.c:286
|
||||
msgid "Create PDF Layers (OCG)"
|
||||
msgstr "Generiere PDF-Layer (OCG)"
|
||||
|
||||
#: ../main.c:285
|
||||
msgid "Create standalone TeX"
|
||||
msgstr "Generiere eingenständiges TeX"
|
||||
|
||||
#: ../main.c:280
|
||||
msgid "Divide output coordinates by <SCALE>"
|
||||
msgstr "Dividiere Ausgabekoordinaten durch <SCALE>"
|
||||
|
||||
#: ../resources/layer-widget.glade:62
|
||||
msgid "Export Layer"
|
||||
msgstr "Exportiere Layer"
|
||||
|
||||
#: ../output-renderers/cairo-renderer.c:366
|
||||
#, c-format
|
||||
msgid "Exporting layer %d to file\n"
|
||||
msgstr "Exportiere Layer %d in Datei\n"
|
||||
|
||||
#: ../output-renderers/external-renderer.c:142
|
||||
msgid "External renderer finished."
|
||||
msgstr "Externer Renderer beendet."
|
||||
|
||||
#. This should not happen
|
||||
#: ../output-renderers/cairo-renderer.c:271
|
||||
#, c-format
|
||||
msgid "Fatal error: Cairo Renderer: Could not spawn child process!"
|
||||
msgstr ""
|
||||
"Fataler Fehler: Cairo Renderer: Sub-Prozess konnte nicht gestartet werden!"
|
||||
|
||||
#: ../resources/main.glade:50
|
||||
msgid "GDS-Render"
|
||||
msgstr "GDS-Render"
|
||||
|
||||
#: ../gds-render-gui.c:294
|
||||
msgid "GDSII-Files"
|
||||
msgstr "GDSII-Dateien"
|
||||
|
||||
#: ../resources/dialog.glade:18
|
||||
msgid "Generate LaTeX/TikZ output"
|
||||
msgstr "Generiere LaTeX/TikZ Ausgabe"
|
||||
|
||||
#: ../resources/dialog.glade:93
|
||||
msgid "Generate PDF Layers"
|
||||
msgstr "Generiere PDF Layers"
|
||||
|
||||
#: ../output-renderers/latex-renderer.c:253
|
||||
#, c-format
|
||||
msgid "Generating cell %s"
|
||||
msgstr "Generiere Zelle %s"
|
||||
|
||||
#: ../resources/about.glade:12
|
||||
msgid "Git Repository"
|
||||
msgstr "Git Repository"
|
||||
|
||||
#: ../widgets/conv-settings-dialog.c:246
|
||||
#, c-format
|
||||
msgid "Height: %.3lf %sm"
|
||||
msgstr "Höhe: %.3lf %sm"
|
||||
|
||||
#: ../main.c:321
|
||||
#, c-format
|
||||
msgid "Ignored argument: %s"
|
||||
msgstr "Ignoriertes Argument: %s"
|
||||
|
||||
#: ../output-renderers/external-renderer.c:106
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Init function not found in library:\n"
|
||||
"%s\n"
|
||||
msgstr ""
|
||||
"Init-Funktion nicht in Bibliothek gefunden:\n"
|
||||
"%s\n"
|
||||
|
||||
#: ../output-renderers/cairo-renderer.c:321
|
||||
#, c-format
|
||||
msgid "Layer number too high / outside of spec.\n"
|
||||
msgstr "Layer-Nummer zu hoch / Außerhalb der Spezifikation.\n"
|
||||
|
||||
#: ../output-renderers/cairo-renderer.c:369
|
||||
#, c-format
|
||||
msgid "Layer outside of spec.\n"
|
||||
msgstr "Layer außerhalb der Spezifikation\n"
|
||||
|
||||
#: ../widgets/layer-element.c:102
|
||||
#, c-format
|
||||
msgid "Layer: %d"
|
||||
msgstr "Layer: %d"
|
||||
|
||||
#: ../gds-render-gui.c:241
|
||||
msgid "Library"
|
||||
msgstr "Bibliothek"
|
||||
|
||||
#: ../resources/main.glade:68
|
||||
msgid "Load Mapping"
|
||||
msgstr "Zuordnung laden"
|
||||
|
||||
#: ../resources/main.glade:73
|
||||
msgid "Load the current layer configuration from CSV"
|
||||
msgstr "Lade die aktuelle Layer-Zuordnung aus einer CSV-Datei"
|
||||
|
||||
#: ../main.c:116
|
||||
#, c-format
|
||||
msgid "Logo could not be displayed: %s\n"
|
||||
msgstr "Logo konnte nicht angezeigt werden: %s\n"
|
||||
|
||||
#: ../output-renderers/gds-output-renderer.c:293
|
||||
msgid "No layer specification supplied."
|
||||
msgstr "Keine Layer-Spezifikation angegeben."
|
||||
|
||||
#: ../command-line.c:186
|
||||
#, c-format
|
||||
msgid "No library in library list. This should not happen.\n"
|
||||
msgstr "Keine Bibliothek in Bibliotheksliste. Das sollte nicht passieren.\n"
|
||||
|
||||
#: ../output-renderers/gds-output-renderer.c:288
|
||||
msgid "No/invalid output file set."
|
||||
msgstr "Keine oder invalide Ausgabedatei angegeben."
|
||||
|
||||
#: ../widgets/conv-settings-dialog.c:291
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#: ../resources/main.glade:58
|
||||
msgid "Open GDS2 Database"
|
||||
msgstr "Öffne GDS2 Datenbank"
|
||||
|
||||
#: ../gds-render-gui.c:287
|
||||
msgid "Open GDSII"
|
||||
msgstr "Öffne GDSII"
|
||||
|
||||
#: ../gds-render-gui.c:284
|
||||
msgid "Open GDSII File"
|
||||
msgstr "Öffne GDSII-Datei"
|
||||
|
||||
#: ../main.c:299
|
||||
#, c-format
|
||||
msgid "Option parsing failed: %s\n"
|
||||
msgstr "Optionsverarbeitung fehlgeschlagen: %s\n"
|
||||
|
||||
#: ../widgets/conv-settings-dialog.c:255
|
||||
#, c-format
|
||||
msgid "Output Height: %u px"
|
||||
msgstr "Ausgabehöhe: %u px"
|
||||
|
||||
#: ../output-renderers/gds-output-renderer.c:283
|
||||
msgid "Output Renderer not valid."
|
||||
msgstr "Ausgaberenderer invalide."
|
||||
|
||||
#: ../output-renderers/gds-output-renderer.c:304
|
||||
msgid "Output Renderer: Rendering function broken. This is a bug."
|
||||
msgstr ""
|
||||
"Ausgaberenderer: Render-Funktion defekt. Dies ist ein interner "
|
||||
"Programmfehler."
|
||||
|
||||
#. Set the pixel sizes
|
||||
#: ../widgets/conv-settings-dialog.c:252
|
||||
#, c-format
|
||||
msgid "Output Width: %u px"
|
||||
msgstr "Ausgabebreite: %u px"
|
||||
|
||||
#: ../main.c:282
|
||||
msgid "Output file path. Can be used multiple times."
|
||||
msgstr "Ausgabepfad. Kann mehrfach angegeben werden."
|
||||
|
||||
#: ../output-renderers/gds-output-renderer.c:298
|
||||
msgid "Output renderer called without cell to render."
|
||||
msgstr "Ausgaberenderer ohne zu rendernde Zelle aufgerufen."
|
||||
|
||||
#: ../output-renderers/gds-output-renderer.c:74
|
||||
msgid "Output renderer does not define a render_output function!"
|
||||
msgstr "Ausgaberenderer definiert keine render_output Funktion!"
|
||||
|
||||
#: ../main.c:283
|
||||
msgid "Path for Layer Mapping File"
|
||||
msgstr "Pfad zur Lagenzuordnungsdatei"
|
||||
|
||||
#: ../main.c:288
|
||||
msgid ""
|
||||
"Path to a custom shared object, that implements the necessary rendering "
|
||||
"functions"
|
||||
msgstr ""
|
||||
"Pfad zu einem benutzerdefiniertem Shared-Object, welches die notwendigen "
|
||||
"Funktionen implementiert"
|
||||
|
||||
#: ../output-renderers/external-renderer.c:78
|
||||
#, c-format
|
||||
msgid "Path to shared object not set!\n"
|
||||
msgstr "Kein Pfad zu einem Shared-Object gesetzt!\n"
|
||||
|
||||
#: ../command-line.c:74
|
||||
#, c-format
|
||||
msgid "Please specify renderers and file names\n"
|
||||
msgstr "Bitte Renderer und Dateinamen angeben.\n"
|
||||
|
||||
#: ../command-line.c:104
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Please specify shared object for external renderer. Will ignore this "
|
||||
"renderer.\n"
|
||||
msgstr ""
|
||||
"Bitte Shares-Object für externen Renderer angeben. Dieser Renderer wird "
|
||||
"ignoriert.\n"
|
||||
|
||||
#: ../main.c:277
|
||||
msgid "Print version"
|
||||
msgstr "Zeige Versionsnummer"
|
||||
|
||||
#: ../command-line.c:160
|
||||
#, c-format
|
||||
msgid "Probably missing argument. Check --help option\n"
|
||||
msgstr "Vermutlich ein fehlendes Argument. Bitte --help überprüfen\n"
|
||||
|
||||
#: ../main.c:219
|
||||
msgid "Quit"
|
||||
msgstr "Beenden"
|
||||
|
||||
#: ../widgets/activity-bar.c:104
|
||||
msgid "Ready"
|
||||
msgstr "Bereit"
|
||||
|
||||
#: ../resources/dialog.glade:33
|
||||
msgid "Render PDF using Cairographics"
|
||||
msgstr "Rendere PDF mit Cairographics"
|
||||
|
||||
#: ../resources/dialog.glade:48
|
||||
msgid "Render SVG using Cairographics (too buggy at the moment)"
|
||||
msgstr "Rendere SVG mit Cairographics (Experimentell)"
|
||||
|
||||
#: ../widgets/conv-settings-dialog.c:293
|
||||
msgid "Renderer Settings"
|
||||
msgstr "Renderer Einstellungen"
|
||||
|
||||
#: ../output-renderers/gds-output-renderer.c:365
|
||||
msgid "Renderer already started asynchronously"
|
||||
msgstr "Renderer wird bereits asynchron ausgeführt"
|
||||
|
||||
#: ../main.c:279
|
||||
msgid "Renderer to use. Can be used multiple times."
|
||||
msgstr "Zu nutzender Renderer. Kann mehrfach angegeben werden."
|
||||
|
||||
#: ../output-renderers/cairo-renderer.c:467
|
||||
msgid "Rendering Cairo Output..."
|
||||
msgstr "Rendere Cairo-Ausgabe..."
|
||||
|
||||
#: ../gds-render-gui.c:554
|
||||
msgid "Rendering cell..."
|
||||
msgstr "Renderere Zelle..."
|
||||
|
||||
#: ../output-renderers/external-renderer.c:98
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Rendering function not found in library:\n"
|
||||
"%s\n"
|
||||
msgstr ""
|
||||
"Render Funktion nicht in Bibliothek gefunden:\n"
|
||||
"%s\n"
|
||||
|
||||
#: ../resources/main.glade:86
|
||||
msgid "Save Mapping"
|
||||
msgstr "Zuordnung speichern"
|
||||
|
||||
#: ../resources/main.glade:23
|
||||
msgid "Save the current layer configuration to CSV"
|
||||
msgstr "Die aktuelle Lagenkonfiguration als CSV-Datei speichern"
|
||||
|
||||
#: ../main.c:312
|
||||
#, c-format
|
||||
msgid "Scale < 1 not allowed. Setting to 1\n"
|
||||
msgstr "Skaliereung < 1 nicht erlaubt. Setze auf 1\n"
|
||||
|
||||
#: ../resources/layer-widget.glade:51
|
||||
msgid "Select Layer Color and Opacity"
|
||||
msgstr "Wähle Layer-Farbe und Transparenz"
|
||||
|
||||
#: ../resources/main.glade:240
|
||||
msgid "Select all layers for export"
|
||||
msgstr "Wähle alle Layer zum Exporieren"
|
||||
|
||||
#: ../output-renderers/cairo-renderer.c:331
|
||||
#, c-format
|
||||
msgid "Size of layer %d%s%s%s: <%lf x %lf> @ (%lf | %lf)\n"
|
||||
msgstr "Größe von Layer %d%s%s%s: <%lf x %lf> @ (%lf | %lf)\n"
|
||||
|
||||
#: ../resources/main.glade:195
|
||||
msgid "Sort layers ascending"
|
||||
msgstr "Sortiere Layer aufsteigend"
|
||||
|
||||
#: ../resources/main.glade:210
|
||||
msgid "Sort layers descending"
|
||||
msgstr "Sortiere Layer absteigend"
|
||||
|
||||
#: ../main.c:212
|
||||
#, c-format
|
||||
msgid ""
|
||||
"There is already an open instance. Will open second window in that "
|
||||
"instance.\n"
|
||||
msgstr ""
|
||||
"Es ist bereits eine Instanz dieses Programms geöffnet. Es wird ein zweites "
|
||||
"Fenster in jener Instanz geöffnet.\n"
|
||||
|
||||
#: ../main.c:244
|
||||
#, c-format
|
||||
msgid ""
|
||||
"This is gds-render, version: %s\n"
|
||||
"\n"
|
||||
"For a list of supported commands execute with --help option.\n"
|
||||
msgstr ""
|
||||
"Dies ist gds-render, Version: %s\n"
|
||||
"\n"
|
||||
"Für eine Liste der unterstützten Kommandos mit der Option --help ausführen.\n"
|
||||
|
||||
#: ../gds-utils/gds-tree-checker.c:188
|
||||
#, c-format
|
||||
msgid "Visited cell list should be empty. This is a bug. Please report this.\n"
|
||||
msgstr ""
|
||||
"Liste markierter Zellen sollte leer sein. Dies ist ein Fehler. Bitte "
|
||||
"melden.\n"
|
||||
|
||||
#: ../widgets/conv-settings-dialog.c:244
|
||||
#, c-format
|
||||
msgid "Width: %.3lf %sm"
|
||||
msgstr "Breite: %.3lf %sm"
|
||||
|
||||
#: ../widgets/activity-bar.c:110
|
||||
msgid "Working..."
|
||||
msgstr "Arbeite..."
|
||||
|
||||
#: ../main.c:96
|
||||
msgid ""
|
||||
"gds-render is a free tool for rendering GDS2 layout files into vector "
|
||||
"graphics."
|
||||
msgstr ""
|
||||
"gds-render ist ein freies Programm, um GDS2-Layouts in Vektorgrafiken zu "
|
||||
"konvertieren."
|
||||
|
||||
#: ../resources/layer-widget.glade:37
|
||||
msgid "label"
|
||||
msgstr "label"
|
@@ -1,122 +0,0 @@
|
||||
# German translations for gds-render package.
|
||||
# Copyright (C) 2019 THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the gds-render package.
|
||||
# Mario Hüttel <mario.huettel@gmx.net>, 2019.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gds-render VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-10-18 23:03+0200\n"
|
||||
"PO-Revision-Date: 2019-10-18 20:49+0200\n"
|
||||
"Last-Translator: <mario.huettel@gmx.net>\n"
|
||||
"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
|
||||
"Language: de\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: ../main.c:99
|
||||
#, c-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Full git commit: %s"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Vollständige git Commit-ID %s"
|
||||
|
||||
#: ../main.c:289
|
||||
msgid " FILE - Convert GDS file <FILE> to graphic"
|
||||
msgstr "Datei -- Konvertiere GDS Datei <Datei> zu Vektorgrafik"
|
||||
|
||||
#: ../main.c:223
|
||||
msgid "About"
|
||||
msgstr "Über"
|
||||
|
||||
#: ../main.c:282
|
||||
msgid "Cell to render"
|
||||
msgstr "Zu konvertierende Zelle"
|
||||
|
||||
#: ../main.c:284
|
||||
msgid "Create PDF Layers (OCG)"
|
||||
msgstr "Generiere PDF Layer (OCG)"
|
||||
|
||||
#: ../main.c:283
|
||||
msgid "Create standalone TeX"
|
||||
msgstr "Generiere alleinstehendes TeX"
|
||||
|
||||
#: ../main.c:279
|
||||
msgid "Divide output coordinates by <SCALE>"
|
||||
msgstr "Skaliere Ausgabekoordinaten um Faktor <SCALE> herab"
|
||||
|
||||
#: ../main.c:314
|
||||
#, c-format
|
||||
msgid "Ignored argument: %s"
|
||||
msgstr "Ignoriertes Argument: %s"
|
||||
|
||||
#: ../main.c:118
|
||||
#, c-format
|
||||
msgid "Logo could not be displayed: %s\n"
|
||||
msgstr "Logo konnte nicht angezeigt werden: %s\n"
|
||||
|
||||
#: ../main.c:294
|
||||
#, c-format
|
||||
msgid "Option parsing failed: %s\n"
|
||||
msgstr "Übergabeparameterkonvertierung fehlgeschlagen: %s\n"
|
||||
|
||||
#: ../main.c:280
|
||||
msgid "Output file path. Can be used multiple times."
|
||||
msgstr "Ausgabedatei. Kann mehrfach angegeben werden."
|
||||
|
||||
#: ../main.c:281
|
||||
msgid "Path for Layer Mapping File"
|
||||
msgstr "Pfad zur \"Layer Mapping\"-Datei"
|
||||
|
||||
#: ../main.c:277
|
||||
msgid "Print version"
|
||||
msgstr "Programmversion aufgeben"
|
||||
|
||||
#: ../main.c:222
|
||||
msgid "Quit"
|
||||
msgstr "Beenden"
|
||||
|
||||
#: ../main.c:278
|
||||
msgid "Renderer to use. Can be used multiple times."
|
||||
msgstr "Gewünschter Renderer. Kann mehrfach angegeben werden."
|
||||
|
||||
#: ../main.c:305
|
||||
#, c-format
|
||||
msgid "Scale < 1 not allowed. Setting to 1\n"
|
||||
msgstr "Skalierung < 1 nicht erlaubt. Rückfallwert 1 benutzt.\n"
|
||||
|
||||
#: ../main.c:215
|
||||
#, c-format
|
||||
msgid ""
|
||||
"There is already an open instance. Will open second window in that "
|
||||
"instance.\n"
|
||||
msgstr ""
|
||||
"Es is bereits eine Instanz dieses Programms geöffnet. Ein weiteres Fenster "
|
||||
"in dieser wird geöffnet.\n"
|
||||
|
||||
#: ../main.c:247
|
||||
#, c-format
|
||||
msgid ""
|
||||
"This is gds-render, version: %s\n"
|
||||
"\n"
|
||||
"For a list of supported commands execute with --help option.\n"
|
||||
msgstr ""
|
||||
"gds-render, Version %s\n"
|
||||
"\n"
|
||||
"Um eine Liste der unterstützten Befehle zu erhalten, bitte mit der Option --"
|
||||
"help ausführen.\n"
|
||||
|
||||
#: ../main.c:98
|
||||
msgid ""
|
||||
"gds-render is a free tool for rendering GDS2 layout files into vector "
|
||||
"graphics."
|
||||
msgstr ""
|
||||
"gds-render is ein freies Werkzeug zum Wandeln von GDS2 Layouts in "
|
||||
"Vektorgrafiken."
|
@@ -1,26 +0,0 @@
|
||||
# German translations for gds-render package.
|
||||
# Copyright (C) 2019 THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# Mario Hüttel <mario.huettel@gmx.net>, 2019.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-10-25 20:27+0200\n"
|
||||
"PO-Revision-Date: 2019-10-25 20:27+0200\n"
|
||||
"Last-Translator: <mario.huettel@gmx.net>\n"
|
||||
"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
|
||||
"Language: de\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: ../widgets/activity-bar.c:105
|
||||
msgid "Ready"
|
||||
msgstr "Bereit"
|
||||
|
||||
#: ../widgets/activity-bar.c:111
|
||||
msgid "Working..."
|
||||
msgstr "Berechnung aktiv..."
|
@@ -1,26 +0,0 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-10-25 20:27+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../widgets/activity-bar.c:105
|
||||
msgid "Ready"
|
||||
msgstr ""
|
||||
|
||||
#: ../widgets/activity-bar.c:111
|
||||
msgid "Working..."
|
||||
msgstr ""
|
@@ -17,7 +17,6 @@
|
||||
* along with GDSII-Converter. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @defgroup version Version Number
|
||||
* See @ref git-version-num
|
||||
|
@@ -99,7 +99,6 @@ ActivityBar *activity_bar_new()
|
||||
return bar;
|
||||
}
|
||||
|
||||
/* TODO: Complete this once the task list is fully implemented */
|
||||
void activity_bar_set_ready(ActivityBar *bar)
|
||||
{
|
||||
gtk_label_set_text(GTK_LABEL(bar->label), _("Ready"));
|
||||
|
@@ -30,6 +30,7 @@
|
||||
*/
|
||||
|
||||
#include <gds-render/widgets/conv-settings-dialog.h>
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
struct _RendererSettingsDialog {
|
||||
GtkDialog parent;
|
||||
@@ -102,9 +103,9 @@ static void renderer_settings_dialog_class_init(RendererSettingsDialogClass *kla
|
||||
oclass->set_property = renderer_settings_dialog_set_property;
|
||||
oclass->get_property = renderer_settings_dialog_get_property;
|
||||
|
||||
properties[PROP_CELL_NAME] = g_param_spec_string("cell-name",
|
||||
"cell-name",
|
||||
"Cell name to be displayed in header bar",
|
||||
properties[PROP_CELL_NAME] = g_param_spec_string(N_("cell-name"),
|
||||
N_("cell-name"),
|
||||
N_("Cell name to be displayed in header bar"),
|
||||
"",
|
||||
G_PARAM_READWRITE);
|
||||
g_object_class_install_properties(oclass, PROP_COUNT, properties);
|
||||
@@ -240,18 +241,18 @@ static void renderer_settings_dialog_update_labels(RendererSettingsDialog *self)
|
||||
width_engineering = convert_number_to_engineering(width_meters, &width_prefix);
|
||||
height_engineering = convert_number_to_engineering(height_meters, &height_prefix);
|
||||
|
||||
snprintf(default_buff, sizeof(default_buff), "Width: %.3lf %sm", width_engineering, width_prefix);
|
||||
snprintf(default_buff, sizeof(default_buff), _("Width: %.3lf %sm"), width_engineering, width_prefix);
|
||||
gtk_label_set_text(self->x_label, default_buff);
|
||||
snprintf(default_buff, sizeof(default_buff), "Height: %.3lf %sm", height_engineering, height_prefix);
|
||||
snprintf(default_buff, sizeof(default_buff), _("Height: %.3lf %sm"), height_engineering, height_prefix);
|
||||
gtk_label_set_text(self->y_label, default_buff);
|
||||
|
||||
scale = gtk_range_get_value(GTK_RANGE(self->scale));
|
||||
|
||||
/* Set the pixel sizes */
|
||||
snprintf(default_buff, sizeof(default_buff), "Output Width: %u px",
|
||||
snprintf(default_buff, sizeof(default_buff), _("Output Width: %u px"),
|
||||
(unsigned int)((double)self->cell_width / scale));
|
||||
gtk_label_set_text(self->x_output_label, default_buff);
|
||||
snprintf(default_buff, sizeof(default_buff), "Output Height: %u px",
|
||||
snprintf(default_buff, sizeof(default_buff), _("Output Height: %u px"),
|
||||
(unsigned int)((double)self->cell_height / scale));
|
||||
gtk_label_set_text(self->y_output_label, default_buff);
|
||||
}
|
||||
@@ -287,9 +288,9 @@ static void renderer_settings_dialog_init(RendererSettingsDialog *self)
|
||||
self->x_output_label = GTK_LABEL(gtk_builder_get_object(builder, "x-output-label"));
|
||||
self->y_output_label = GTK_LABEL(gtk_builder_get_object(builder, "y-output-label"));
|
||||
|
||||
gtk_dialog_add_buttons(dialog, "Cancel", GTK_RESPONSE_CANCEL, "OK", GTK_RESPONSE_OK, NULL);
|
||||
gtk_dialog_add_buttons(dialog, _("Cancel"), GTK_RESPONSE_CANCEL, _("OK"), GTK_RESPONSE_OK, NULL);
|
||||
gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(dialog)), box);
|
||||
gtk_window_set_title(GTK_WINDOW(self), "Renderer Settings");
|
||||
gtk_window_set_title(GTK_WINDOW(self), _("Renderer Settings"));
|
||||
|
||||
g_signal_connect(self->radio_latex, "toggled", G_CALLBACK(latex_render_callback), (gpointer)self);
|
||||
g_signal_connect(G_OBJECT(self->shape_drawing),
|
||||
|
@@ -37,6 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <gds-render/widgets/layer-element.h>
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
G_DEFINE_TYPE(LayerElement, layer_element, GTK_TYPE_LIST_BOX_ROW)
|
||||
|
||||
@@ -98,7 +99,7 @@ void layer_element_set_layer(LayerElement *elem, int layer)
|
||||
GString *string;
|
||||
|
||||
string = g_string_new_len(NULL, 100);
|
||||
g_string_printf(string, "Layer: %d", layer);
|
||||
g_string_printf(string, _("Layer: %d"), layer);
|
||||
gtk_label_set_text(elem->priv.layer, (const gchar *)string->str);
|
||||
elem->priv.layer_num = layer;
|
||||
g_string_free(string, TRUE);
|
||||
|
Reference in New Issue
Block a user