From 35a96bde514a8897f6f0fcc41c5833bf63df2e2a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 18:29:01 +0200 Subject: Adding upstream version 1.0.2. Signed-off-by: Daniel Baumann --- share/paint/CMakeLists.txt | 11 + share/paint/README | 14 + share/paint/hatches.svg | 139 ++ share/paint/i18n.py | 18 + share/paint/patterns.svg | 3711 ++++++++++++++++++++++++++++++++++++++++++++ share/paint/patterns.svg.h | 1 + 6 files changed, 3894 insertions(+) create mode 100644 share/paint/CMakeLists.txt create mode 100644 share/paint/README create mode 100644 share/paint/hatches.svg create mode 100755 share/paint/i18n.py create mode 100644 share/paint/patterns.svg create mode 100644 share/paint/patterns.svg.h (limited to 'share/paint') diff --git a/share/paint/CMakeLists.txt b/share/paint/CMakeLists.txt new file mode 100644 index 0000000..e139585 --- /dev/null +++ b/share/paint/CMakeLists.txt @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +add_custom_command( + OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg.h + COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg > ${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg.h + MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py +) +set_source_files_properties(${CMAKE_SOURCE_DIR}/patterns.svg.h PROPERTIES GENERATED TRUE) +add_custom_target(patterns_svg_h ALL DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg.h) + +install(FILES "hatches.svg" "patterns.svg" "README" DESTINATION ${INKSCAPE_SHARE_INSTALL}/paint) diff --git a/share/paint/README b/share/paint/README new file mode 100644 index 0000000..7035a58 --- /dev/null +++ b/share/paint/README @@ -0,0 +1,14 @@ +This is the directory with Inkscape's stock patterns. They are +stored in the defs of the SVG document patterns.svg. Within +Inkscape, they can be accessed via the pattern fill option on either +Fill or Stroke tab of the Fill & Stroke dialog (Ctrl+Shift+F). You +can also create a new pattern from selected objects by the Objects +to Pattern command. + +Internationalization + +This file is internationalized the same way as share/filters/filters/svg +The i18n.py script called from the makefile will extract strings from +patterns.svg into a patterns.svg.h file. Intltool is then able to extracts +these strings just like from normal .h files. + diff --git a/share/paint/hatches.svg b/share/paint/hatches.svg new file mode 100644 index 0000000..ff965e6 --- /dev/null +++ b/share/paint/hatches.svg @@ -0,0 +1,139 @@ + + + Hatches + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/share/paint/i18n.py b/share/paint/i18n.py new file mode 100755 index 0000000..1113f26 --- /dev/null +++ b/share/paint/i18n.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 + +from xml.dom import minidom +import sys + +doc = minidom.parse(sys.argv[1]) + +filters = doc.getElementsByTagName('pattern') + +sys.stdout.write("char * stringlst = [") + +for filter in filters: + id = filter.getAttribute('id') + stockid = filter.getAttribute('inkscape:stockid') + + sys.stdout.write("N_(\"" + stockid + "\"),") + +sys.stdout.write("];") diff --git a/share/paint/patterns.svg b/share/paint/patterns.svg new file mode 100644 index 0000000..7a84654 --- /dev/null +++ b/share/paint/patterns.svg @@ -0,0 +1,3711 @@ + + + + Patterns + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/share/paint/patterns.svg.h b/share/paint/patterns.svg.h new file mode 100644 index 0000000..67718f8 --- /dev/null +++ b/share/paint/patterns.svg.h @@ -0,0 +1 @@ +char * stringlst = [N_("Stripes 1:1"),N_("Stripes 1:1 white"),N_("Stripes 1:1.5"),N_("Stripes 1:1.5 white"),N_("Stripes 1:2"),N_("Stripes 1:2 white"),N_("Stripes 1:3"),N_("Stripes 1:3 white"),N_("Stripes 1:4"),N_("Stripes 1:4 white"),N_("Stripes 1:5"),N_("Stripes 1:5 white"),N_("Stripes 1:8"),N_("Stripes 1:8 white"),N_("Stripes 1:10"),N_("Stripes 1:10 white"),N_("Stripes 1:16"),N_("Stripes 1:16 white"),N_("Stripes 1:32"),N_("Stripes 1:32 white"),N_("Stripes 1:64"),N_("Stripes 2:1"),N_("Stripes 2:1 white"),N_("Stripes 4:1"),N_("Stripes 4:1 white"),N_("Checkerboard"),N_("Checkerboard white"),N_("Packed circles"),N_("Polka dots, small"),N_("Polka dots, small white"),N_("Polka dots, medium"),N_("Polka dots, medium white"),N_("Polka dots, large"),N_("Polka dots, large white"),N_("Wavy"),N_("Wavy white"),N_("Camouflage"),N_("Ermine"),N_("Sand (bitmap)"),N_("Cloth (bitmap)"),N_("Old paint (bitmap)"),]; \ No newline at end of file -- cgit v1.2.3