summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2017-12-01 21:31:48 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2017-12-01 21:31:48 +0000
commit035f5ed006ed983fd52e4da0bde49fc6a80534ce (patch)
treeb3ac5e1d4cde91e4a4089281cf4b4edd7794780e /src
parentCleaninng (diff)
parentMerge powerStrokeSmooth (diff)
downloadinkscape-035f5ed006ed983fd52e4da0bde49fc6a80534ce.tar.gz
inkscape-035f5ed006ed983fd52e4da0bde49fc6a80534ce.zip
Merge branch 'powerpencilII' of https://gitlab.com/inkscape/inkscape into powerpencilII
Diffstat (limited to 'src')
-rw-r--r--src/doxygen-main.dox1
-rw-r--r--src/extension/implementation/script.cpp15
-rw-r--r--src/extension/internal/cairo-render-context.cpp10
-rw-r--r--src/extension/internal/cairo-render-context.h2
-rw-r--r--src/file-update.cpp1
-rw-r--r--src/helper/gettext.cpp2
-rw-r--r--src/helper/gettext.h2
-rw-r--r--src/libuemf/README150
-rw-r--r--src/libuemf/uemf.h9
-rw-r--r--src/live_effects/lpe-powerstroke.cpp207
-rw-r--r--src/live_effects/lpe-powerstroke.h3
-rw-r--r--src/ui/dialog/export.cpp9
-rw-r--r--src/ui/dialog/inkscape-preferences.cpp2
-rw-r--r--src/ui/dialog/print.cpp6
-rw-r--r--src/ui/dialog/symbols.cpp2
15 files changed, 300 insertions, 121 deletions
diff --git a/src/doxygen-main.dox b/src/doxygen-main.dox
index c714c2cbf..36b005f81 100644
--- a/src/doxygen-main.dox
+++ b/src/doxygen-main.dox
@@ -345,7 +345,6 @@ namespace XML {}
* {\ref dialogs/} [\ref decimal-round.h] [\ref enums.h]
*/
-
/*
Local Variables:
mode:c++
diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp
index eb98711bc..0f0a79bfb 100644
--- a/src/extension/implementation/script.cpp
+++ b/src/extension/implementation/script.cpp
@@ -732,9 +732,18 @@ void Script::effect(Inkscape::Extension::Effect *module,
SPDocument * mydoc = NULL;
if (data_read > 10) {
- mydoc = Inkscape::Extension::open(
- Inkscape::Extension::db.get(SP_MODULE_KEY_INPUT_SVG),
- tempfilename_out.c_str());
+ try {
+ mydoc = Inkscape::Extension::open(
+ Inkscape::Extension::db.get(SP_MODULE_KEY_INPUT_SVG),
+ tempfilename_out.c_str());
+ } catch (const Inkscape::Extension::Input::open_failed &e) {
+ g_warning("Extension returned output that could not be parsed: %s", e.what());
+ Gtk::MessageDialog warning(
+ _("The output from the extension could not be parsed."),
+ false, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_OK, true);
+ warning.set_transient_for( *(INKSCAPE.active_desktop()->getToplevel()) );
+ warning.run();
+ }
} // data_read
pump_events();
diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp
index 972081c0d..4869472da 100644
--- a/src/extension/internal/cairo-render-context.cpp
+++ b/src/extension/internal/cairo-render-context.cpp
@@ -878,11 +878,11 @@ CairoRenderContext::_finishSurfaceSetup(cairo_surface_t *surface, cairo_matrix_t
}
bool
-CairoRenderContext::finish(void)
+CairoRenderContext::finish(bool finish_surface)
{
g_assert( _is_valid );
- if (_vector_based_target)
+ if (_vector_based_target && finish_surface)
cairo_show_page(_cr);
// PDF+TeX Output, see CairoRenderContext::_prepareRenderGraphic()
@@ -893,10 +893,12 @@ CairoRenderContext::finish(void)
}
cairo_destroy(_cr);
- cairo_surface_finish(_surface);
+ _cr = NULL;
+
+ if (finish_surface)
+ cairo_surface_finish(_surface);
cairo_status_t status = cairo_surface_status(_surface);
cairo_surface_destroy(_surface);
- _cr = NULL;
_surface = NULL;
if (_layout)
diff --git a/src/extension/internal/cairo-render-context.h b/src/extension/internal/cairo-render-context.h
index be5169a74..a0ca2665b 100644
--- a/src/extension/internal/cairo-render-context.h
+++ b/src/extension/internal/cairo-render-context.h
@@ -72,7 +72,7 @@ class CairoRenderContext {
public:
CairoRenderContext *cloneMe(void) const;
CairoRenderContext *cloneMe(double width, double height) const;
- bool finish(void);
+ bool finish(bool finish_surface = true);
CairoRenderer *getRenderer(void) const;
cairo_t *getCairoContext(void) const;
diff --git a/src/file-update.cpp b/src/file-update.cpp
index 303a5c4f1..1d95b5d4c 100644
--- a/src/file-update.cpp
+++ b/src/file-update.cpp
@@ -318,6 +318,7 @@ void sp_file_convert_dpi(SPDocument *doc)
bool backup = prefs->getBool("/options/dpifixbackup", true);
if (INKSCAPE.use_gui() && sp_file_convert_dpi_method_commandline == -1) {
Gtk::Dialog scale_dialog(_("Convert legacy Inkscape file"));
+ scale_dialog.set_transient_for( *(INKSCAPE.active_desktop()->getToplevel()) );
scale_dialog.set_border_width(10);
scale_dialog.set_resizable(false);
Gtk::Label explanation;
diff --git a/src/helper/gettext.cpp b/src/helper/gettext.cpp
index 4d882c0cd..1942b373c 100644
--- a/src/helper/gettext.cpp
+++ b/src/helper/gettext.cpp
@@ -11,7 +11,7 @@
*
* Inkscape is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
+ * the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* Inkscape is distributed in the hope that it will be useful,
diff --git a/src/helper/gettext.h b/src/helper/gettext.h
index 689bddbbb..ecffcdc07 100644
--- a/src/helper/gettext.h
+++ b/src/helper/gettext.h
@@ -11,7 +11,7 @@
*
* Inkscape is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
+ * the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* Inkscape is distributed in the hope that it will be useful,
diff --git a/src/libuemf/README b/src/libuemf/README
index a3dff9b4c..f65120c30 100644
--- a/src/libuemf/README
+++ b/src/libuemf/README
@@ -19,7 +19,7 @@ bit Solaris (BE).
libUEMF is released under the GPL 2 license, read the file 'COPYING' for more information
-Version 0.2.1, released April 23, 2015.
+Version 0.2.5, released Jan 03, 2017.
To report bugs or provide feedback send email to David Mathog, mathog@caltech.edu.
@@ -172,7 +172,7 @@ emf-inout.cpp,example
emf-inout.h.example
emf-print.cpp.example
emf-print.h.example
- Example code from Inkscape demonstrate how to integrate libUEMF with another program.
+ Example code from Inkscape, demonstrates how to integrate libUEMF with another program.
--------------------------------------------------------------------------------------------
How to Build:
@@ -181,69 +181,70 @@ In Linux/Unix like environments (omit -g flag for production versions):
Build and install a shared library (example, details may vary) and then build and link
the example programs to the shared library:
- gcc -std=c99 -pedantic -Wall -fPIC -g -c uemf.c
- gcc -std=c99 -pedantic -Wall -fPIC -g -c uemf_print.c
- gcc -std=c99 -pedantic -Wall -fPIC -g -c uemf_endian.c
- gcc -std=c99 -pedantic -Wall -fPIC -g -c uemf_utf.c
- gcc -std=c99 -pedantic -Wall -fPIC -g -c uwmf.c
- gcc -std=c99 -pedantic -Wall -fPIC -g -c uwmf_print.c
- gcc -std=c99 -pedantic -Wall -fPIC -g -c uwmf_endian.c
- gcc -std=c99 -pedantic -Wall -fPIC -g -c upmf.c
- gcc -std=c99 -pedantic -Wall -fPIC -g -c upmf_print.c
+ export CFLAGS="-std=c99 -pedantic -Wall -fPIC -g -c"
+ gcc $CFLAGS uemf.c
+ gcc $CFLAGS uemf_print.c
+ gcc $CFLAGS uemf_endian.c
+ gcc $CFLAGS uemf_safe.c
+ gcc $CFLAGS uemf_utf.c
+ gcc $CFLAGS uwmf.c
+ gcc $CFLAGS uwmf_print.c
+ gcc $CFLAGS uwmf_endian.c
+ gcc $CFLAGS upmf.c
+ gcc $CFLAGS upmf_print.c
+ unset CFLAGS
gcc -shared -Wl,-soname,libuemf.so.0 \
- -o libuemf.so.0.0.3 uemf.o uemf_utf.o uemf_print.o uemf_endian.o uwmf.o uwmf_print.o uwmf_endian.o upmf.o upmf_print.o -lc
+ -o libuemf.so.0.0.3 uemf.o uemf_utf.o uemf_safe.o uemf_print.o uemf_endian.o uwmf.o uwmf_print.o uwmf_endian.o upmf.o upmf_print.o -lc
ln -s libuemf.so.0.0.3 libuemf.so.0
ln -s libuemf.so.0 libuemf.so
/bin/cp -f libuemf.so* /usr/local/lib
ldconfig
- gcc -std=c99 -pedantic -Wall -g -o cutemf cutemf.c -luemf -lm
- gcc -std=c99 -pedantic -Wall -g -o pmfdual2single pmfdual2single.c -luemf -lm
- gcc -std=c99 -pedantic -Wall -g -o reademf reademf.c -luemf -lm
- gcc -std=c99 -pedantic -Wall -g -o readwmf readwmf.c -luemf -lm
- gcc -std=c99 -pedantic -Wall -g -o testbed_emf testbed_emf.c -luemf -lm
- gcc -std=c99 -pedantic -Wall -g -o testbed_emf testbed_wmf.c -luemf -lm
- gcc -std=c99 -pedantic -Wall -g -o test_mapmodes_emf test_mapmodes_emf.c -luemf -lm
-
- For simple development work just build the example programs statically linked:
- gcc -std=c99 -pedantic -Wall -g -o cutemf cutemf.c uemf.c uemf_endian.c uemf_utf.c -lm
- gcc -std=c99 -pedantic -Wall -g -o pmfdual2single pmfdual2single.c uemf.c uemf_endian.c uemf_utf.c upmf.c -lm
- gcc -std=c99 -pedantic -Wall -g -o reademf reademf.c uemf.c uemf_endian.c uemf_utf.c uemf_print.c upmf.c upmf_print.c -lm
- gcc -std=c99 -pedantic -Wall -g -o readwmf readwmf.c uemf.c uemf_endian.c uemf_utf.c uemf_print.c uwmf.c uwmf_endian.c uwmf_print.c upmf.c upmf_print.c -lm
- gcc -std=c99 -pedantic -Wall -g -o testbed_emf testbed_emf.c uemf.c uemf_endian.c uemf_utf.c -lm
- gcc -std=c99 -pedantic -Wall -g -o testbed_pmf testbed_pmf.c uemf.c uemf_endian.c uemf_utf.c upmf.c upmf.h -lm
- gcc -std=c99 -pedantic -Wall -g -o testbed_wmf testbed_wmf.c uemf.c uemf_endian.c uemf_utf.c uwmf.c uwmf_endian.c -lm
- gcc -std=c99 -pedantic -Wall -g -o test_mapmodes_emf test_mapmodes_emf.c uemf.c uemf_endian.c uemf_utf.c -lm
+ export CFLAGS="-std=c99 -pedantic -Wall -g"
+ export CLIBS="-luemf -lm"
+ gcc $CFLAGS -o cutemf cutemf.c $CLIBS
+ gcc $CFLAGS -o pmfdual2single pmfdual2single.c $CLIBS
+ gcc $CFLAGS -o reademf reademf.c $CLIBS
+ gcc $CFLAGS -o readwmf readwmf.c $CLIBS
+ gcc $CFLAGS -o testbed_emf testbed_emf.c $CLIBS
+ gcc $CFLAGS -o testbed_emf testbed_wmf.c $CLIBS
+ gcc $CFLAGS -o test_mapmodes_emf test_mapmodes_emf.c $CLIBS
+
+ For simple development work just build the example programs statically. Set these
+ two variables up first:
+
+ (linux)
+ export CFLAGS="-std=c99 -pedantic -Wall -g"
+ export CLIBS=-lm
+
+ (Sparc)[ Solaris 8 and 9 are Big Endian, and to work around some minor incompatibilities with more recent systems,
+ assuming gcc is installed in /opt/csw and PATH is set correctly to use it]
+ export CLIBS="-lm -L/opt/csw/lib -liconv"
+ export CFLAGS="-DSOL8 -DWORDS_BIGENDIAN -std=c99 -pedantic -Wall -g"
+
+ (win32) [This uses _wfopen() instead of fopen(), with filename translation from UTF-8 to
+ UTF-16LE. This will allow file opens to utilize unicode names. If WIN32 is omitted on Windows
+ file names must be all ASCII. This works in mingw.]
+ export CLIBS="-lm -liconv"
+ export CFLAGS="-DWIN32 -std=c99 -pedantic -Wall -g"
+
+ Then compile with:
+
+ gcc $CFLAGS -o cutemf cutemf.c uemf.c uemf_endian.c uemf_utf.c $CLIBS
+ gcc $CFLAGS -o pmfdual2single pmfdual2single.c uemf.c uemf_endian.c uemf_utf.c upmf.c $CLIBS
+ gcc $CFLAGS -o reademf reademf.c uemf.c uemf_endian.c uemf_safe.c uemf_print.c uemf_utf.c upmf.c upmf_print.c $CLIBS
+ gcc $CFLAGS -o readwmf readwmf.c uemf.c uemf_endian.c uemf_safe.c uemf_print.c uemf_utf.c upmf.c upmf_print.c uwmf.c uwmf_endian.c uwmf_print.c $CLIBS
+ gcc $CFLAGS -o testbed_emf testbed_emf.c uemf.c uemf_endian.c uemf_safe.c uemf_print.c uemf_utf.c upmf.c upmf_print.c $CLIBS
+ gcc $CFLAGS -o testbed_pmf testbed_pmf.c uemf.c uemf_endian.c uemf_safe.c uemf_utf.c upmf.c $CLIBS
+ gcc $CFLAGS -o testbed_wmf testbed_wmf.c uemf.c uemf_endian.c uemf_safe.c uemf_print.c uemf_utf.c upmf.c upmf_print.c uwmf.c uwmf_endian.c $CLIBS
+ gcc $CFLAGS -o test_mapmodes_emf test_mapmodes_emf.c uemf.c uemf_endian.c uemf_safe.c uemf_print.c uemf_utf.c upmf.c upmf_print.c $CLIBS
Extra debugging on linux may be enabled in testbed for use under Valgrind. To build that way do instead:
gcc -std=c99 -pedantic -Wall -g -DU_VALGRIND -o testbed_emf testbed_emf.c uemf.c uemf_endian.c uemf_print.c uemf_utf.c -lm
-Sparc Solaris 8 and 9 are Big Endian, and to work around some minor incompatibilities with more recent systems,
-assuming gcc is installed in /opt/csw and PATH is set correctly to use it:
-
- gcc -DSOL8 -DWORDS_BIGENDIAN -std=c99 -pedantic -Wall -g -o cutemf cutemf.c uemf.c uemf_endian.c uemf_utf.c -lm -L/opt/csw/lib -liconv
- gcc -DSOL8 -DWORDS_BIGENDIAN -std=c99 -pedantic -Wall -g -o pmfdual2single pmfdual2single.c uemf.c uemf_endian.c uemf_utf.c upmf.c -lm -L/opt/csw/lib -liconv
- gcc -DSOL8 -DWORDS_BIGENDIAN -std=c99 -pedantic -Wall -g -o reademf reademf.c uemf.c uemf_endian.c uemf_utf.c uemf_print.c upmf.c upmf_print.c -lm -L/opt/csw/lib -liconv
- gcc -DSOL8 -DWORDS_BIGENDIAN -std=c99 -pedantic -Wall -g -o readwmf readwmf.c uemf.c uemf_endian.c uemf_utf.c uemf_print.c uwmf.c uwmf_endian.c uwmf_print.c upmf.c upmf_print.c -lm -L/opt/csw/lib -liconv
- gcc -DSOL8 -DWORDS_BIGENDIAN -std=c99 -pedantic -Wall -g -o testbed_emf testbed_emf.c uemf.c uemf_endian.c uemf_utf.c -lm -L/opt/csw/lib -liconv
- gcc -DSOL8 -DWORDS_BIGENDIAN -std=c99 -pedantic -Wall -g -o testbed_pmf testbed_pmf.c uemf.c uemf_endian.c uemf_utf.c upmf.c upmf.h -lm -L/opt/csw/lib -liconv
- gcc -DSOL8 -DWORDS_BIGENDIAN -std=c99 -pedantic -Wall -g -o testbed_wmf testbed_wmf.c uemf.c uemf_endian.c uemf_utf.c uwmf.c uwmf_endian.c -lm -L/opt/csw/lib -liconv
- gcc -DSOL8 -DWORDS_BIGENDIAN -std=c99 -pedantic -Wall -g -o test_mapmodes_emf test_mapmodes_emf.c uemf.c uemf_endian.c uemf_utf.c -lm -L/opt/csw/lib -liconv
-
-(Note: WORDS_BIGENDIAN would also be produced by autconf's configure, if that was used.)
-
-Define WIN32 when compiling for Windows. This uses _wfopen() instead of fopen(), with
-filename translation from UTF-8 to UTF-16LE. This will allow file opens to utilize unicode
-names. If WIN32 is omitted on Windows file names must be all ASCII. To build on mingw use:
-
- gcc -DWIN32 -std=c99 -pedantic -Wall -g -o cutemf cutemf.c uemf.c uemf_endian.c uemf_utf.c -lm -liconv
- gcc -DWIN32 -std=c99 -pedantic -Wall -g -o pmfdual2single pmfdual2single.c uemf.c uemf_endian.c uemf_utf.c upmf.c -lm -liconv
- gcc -DWIN32 -std=c99 -pedantic -Wall -g -o reademf reademf.c uemf.c uemf_endian.c uemf_utf.c uemf_print.c upmf.c upmf_print.c -lm -liconv
- gcc -DWIN32 -std=c99 -pedantic -Wall -g -o readwmf readwmf.c uemf.c uemf_endian.c uemf_utf.c uemf_print.c uwmf.c uwmf_endian.c uwmf_print.c upmf.c upmf_print.c -lm -liconv
- gcc -DWIN32 -std=c99 -pedantic -Wall -g -o testbed_emf testbed_emf.c uemf.c uemf_endian.c uemf_utf.c -lm -liconv
- gcc -DWIN32 -std=c99 -pedantic -Wall -g -o testbed_pmf testbed_pmf.c uemf.c uemf_endian.c uemf_utf.c upmf.c upmf.h -lm -liconv
- gcc -DWIN32 -std=c99 -pedantic -Wall -g -o testbed_wmf testbed_wmf.c uemf.c uemf_endian.c uemf_utf.c uwmf.c uwmf_endian.c -lm -liconv
- gcc -DWIN32 -std=c99 -pedantic -Wall -g -o test_mapmodes_emf test_mapmodes_emf.c uemf.c uemf_endian.c uemf_utf.c -lm -liconv
+
+and then compile as above for linux.
+
Dependencies:
libiconv (if not built into your compiler)
@@ -376,13 +377,36 @@ History
(Note, version numbers in files represent the libUEMF release where it was last modified, so not
all files will show the same version numbers in each release.)
-0.2.1.2015_04_23
+0.2.5 2017-01-03
+ Fixed a misplaced paren in uemf.h (thanks to Tavmjong Bah for noticing it)
+ Added more U_SIZE_* definitions in uemf.h for "cores" of record types with final
+ variable length arrays, such as U_SIZE_EMRNAMEDESCAPE
+ Removed redundant U_SIZE_BITMAPINFOHEADER definition from uwmf.h
+
+0.2.4 2016-01-26
+ Record EXTSELECTCLIPRGN is supposed to be valid when the RgnDataSize is 0 if the RegionMode
+ is "COPY". Modified safe and print routines so that they would handle this situation.
+ U_PMR_DrawDriverstring seen for the first time and it crashed reademf. Reason, there was a spurious
+ "Tension" value in the structure, which offset values in the record.
+0.2.3 2015-05-28
+ Fixed an assortment of warnings and a couple of bugs flagged by clang static analysis.
+0.2.2 2015-04-28
+ Added lu_crc32 sums to record information in print statements. Affects only reademf and readwmf.
+ The point of this exercise is to enable the detection of differences in binary fields
+ which are not expanded by the print functions. This (re)uses code from Alexander Peslyak.
+ lu_ in name because crc32 conflicts with other libraries, like png.
+ Minor changes to some wmf function parameter types.
+ Minor changes to upmf.c so that it compiles cleanly with clang.
+ Restrict IS_MEM_UNSAFE 2nd parameter to be int or larger and test for negative values.
+ Updated the examples from Inkscape.
+
+0.2.1 2015-04-23
Bug in safety check on EMREXTCREATEFONTINDIRECTW because it had alternative "standard" record sizes.
Changed warnings on unimplemented EMF record types encounterd in swap or safe from stdout to stderr.
Added memory checking for WMF polyline and polygon records, for the variable part and some others.
Note: U_WMRCREATEREGION_get does not check that the variable part stays within the record. Current
implementation seems to be broken since it does not show up in XP preview.
-0.2.0 2015_03_20
+0.2.0 2015-03-20
Added UEMF _safe functions to better handle corrupt records, where variable sizes fields might
have been specified to read past the end of memory. These are records with offsets, arrays
with counts, and bitmaps. Also any record which specifies a size smaller than the minimum
@@ -390,30 +414,30 @@ History
Added similar code for EMF+.
These changed the API so the minor version number was bumped by 1.
-0.1.18 2015_01_15
+0.1.18 2015-01-15
Pierre-Francois Carpentier sent some EMF examples which used U_EMR_EXTSELECTCLIPRGN, which had
not previously been encountered and showed that the handling of regions was broken.
Added tests for U_EMRFILLRGN, U_EMRFRAMERGN, U_EMRFRAMERGN, U_EMREXTSELECTCLIPRGN to testbed_emf.
-0.1.18 2014_04_28
+0.1.18 2014-04-28
Fixed typo in testbed_wmf.c. "include,include" in one place should have been
"exclude,exclude".
-0.1.17 2014_04_25
+0.1.17 2014-04-25
Added text clipping tests to testbed_emf.c, testbed_wmf.c, and testbed_pmf.c.
Added option to omit clipping tests in testbed's.
-0.1.16 2014_04_14
+0.1.16 2014-04-14
Fixed bug in U_WMRRESTOREDC_set.
Added clipping tests to testbed_wmf.c.
-0.1.15 2014_04_04
+0.1.15 2014-04-04
Changed record flags for U_EMRSELECTCLIPPATH record, it consumes a path but does not ALTER (which
forced a premature draw.)
Added U_EMROFFSETCLIPRGN test to testbed_emf.c.
Changed location on dist drawing where clipping appears.
-0.1.14 2014_03_27
+0.1.14 2014-03-27
Fixed bug, in U_PMF_RECTN_set() in upmf.c. Never tested.
Fixed a few potential bugs in upmf.c if a null pointer was passed for
certain function arguments. (Previously unhandled cases.)
diff --git a/src/libuemf/uemf.h b/src/libuemf/uemf.h
index 05566af06..3a51e39e2 100644
--- a/src/libuemf/uemf.h
+++ b/src/libuemf/uemf.h
@@ -95,11 +95,11 @@ these WMF enumerations is by referencing the following table:
/*
File: uemf.h
-Version: 0.0.33
-Date: 27-JAN-2016
+Version: 0.0.34
+Date: 03-JAN-2017
Author: David Mathog, Biology Division, Caltech
email: mathog@caltech.edu
-Copyright: 2016 David Mathog and California Institute of Technology (Caltech)
+Copyright: 2017 David Mathog and California Institute of Technology (Caltech)
*/
#ifndef _UEMF_
@@ -168,7 +168,6 @@ extern "C" {
#define U_ROUND(A) ( (A) > 0 ? floor((A)+0.5) : ( (A) < 0 ? -floor(-(A)+0.5) : (A) ) )
#define MAKE_MIN_PTR(A,B) ( A < B ? A : B)
-
/* IS_MEM_UNSAFE takes 3 parameters:
A start address of a block of allocated memory
B offset into this block starting at A
@@ -185,7 +184,7 @@ extern "C" {
If B is a uint16_t gcc complains about the first test.
This Macro must not be used where B needs more than 32 bits!
*/
-#define IS_MEM_UNSAFE(A,B,C) ( (sizeof(B) < sizeof(int) || (int)(B) < 0) ? 1 : ((int8_t *)(A) > (int8_t *)(C) ? 1 : ((int8_t *)(C) - (int8_t *)(A) >= (int)(B) ? 0 : 1 )))
+#define IS_MEM_UNSAFE(A,B,C) ( (sizeof(B) < sizeof(int) || (int)(B) < 0) ? 1 : ((int8_t *)(A) > (int8_t *)(C) ? 1 : ((int8_t *)(C) - (int8_t *)(A) >= (int)(B) ? 0 : 1 ))) //!< Return 1 when a region of memory starting at A of B bytes extends beyond pointer C
/** @} */
diff --git a/src/live_effects/lpe-powerstroke.cpp b/src/live_effects/lpe-powerstroke.cpp
index e9943af4c..170995b90 100644
--- a/src/live_effects/lpe-powerstroke.cpp
+++ b/src/live_effects/lpe-powerstroke.cpp
@@ -164,6 +164,7 @@ static const Util::EnumDataConverter<unsigned> LineJoinTypeConverter(LineJoinTyp
LPEPowerStroke::LPEPowerStroke(LivePathEffectObject *lpeobject) :
Effect(lpeobject),
offset_points(_("Offset points"), _("Offset points"), "offset_points", &wr, this),
+ interpolate_original(_("Interpolate original"), _("Interpolate original path"), "interpolate_original", &wr, this, false),
sort_points(_("Sort points"), _("Sort offset points according to their time value along the curve"), "sort_points", &wr, this, true),
interpolator_type(_("Interpolator type:"), _("Determines which kind of interpolator will be used to interpolate between stroke width along the path"), "interpolator_type", InterpolatorTypeConverter, &wr, this, Geom::Interpolate::INTERP_CUBICBEZIER),
interpolator_beta(_("Smoothness:"), _("Sets the smoothness for the CubicBezierJohan interpolator; 0 = linear interpolation, 1 = smooth"), "interpolator_beta", &wr, this, 0.2),
@@ -182,6 +183,7 @@ LPEPowerStroke::LPEPowerStroke(LivePathEffectObject *lpeobject) :
registerParameter(&offset_points);
registerParameter(&sort_points);
+ registerParameter(&interpolate_original);
registerParameter(&interpolator_type);
registerParameter(&interpolator_beta);
registerParameter(&start_linecap_type);
@@ -192,6 +194,7 @@ LPEPowerStroke::LPEPowerStroke(LivePathEffectObject *lpeobject) :
scale_width.param_set_range(0.0, Geom::infinity());
scale_width.param_set_increments(0.1, 0.1);
scale_width.param_set_digits(4);
+ interpolate_original_prev = !interpolate_original;
}
LPEPowerStroke::~LPEPowerStroke()
@@ -566,6 +569,42 @@ LPEPowerStroke::doEffect_path (Geom::PathVector const & path_in)
return path_in;
}
Geom::PathVector pathv = pathv_to_linear_and_cubic_beziers(path_in);
+ // create stroke path where points (x,y) := (t, offset)
+
+ if (interpolate_original) {
+ Geom::PathVector path_out;
+ for(Geom::PathVector::const_iterator path_it = path_in.begin(); path_it != path_in.end(); ++path_it) {
+ if (path_it->empty())
+ continue;
+
+ if (path_it->closed()) {
+ g_warning("Interpolate points LPE currently ignores whether path is closed or not.");
+ }
+ std::vector<Geom::Point> pts;
+ pts.push_back(path_it->initialPoint());
+
+ for (Geom::Path::const_iterator it = path_it->begin(), e = path_it->end_default(); it != e; ++it) {
+ pts.push_back((*it).finalPoint());
+ }
+ //We use this fixed interpolator to simplfy the UI and for better results
+ Geom::Interpolate::Interpolator *interpolator = Geom::Interpolate::Interpolator::create(Geom::Interpolate::INTERP_CENTRIPETAL_CATMULLROM);
+ Geom::Path path = interpolator->interpolateToPath(pts);
+
+ path_out.push_back(path);
+ }
+ pathv = path_out;
+ }
+ Geom::Interpolate::Interpolator *interpolator = Geom::Interpolate::Interpolator::create(static_cast<Geom::Interpolate::InterpolatorType>(interpolator_type.get_value()));
+ if (Geom::Interpolate::CubicBezierJohan *johan = dynamic_cast<Geom::Interpolate::CubicBezierJohan*>(interpolator)) {
+ johan->setBeta(interpolator_beta);
+ }
+ if (Geom::Interpolate::CubicBezierSmooth *smooth = dynamic_cast<Geom::Interpolate::CubicBezierSmooth*>(interpolator)) {
+ smooth->setBeta(interpolator_beta);
+ }
+ if (interpolate_original_prev != interpolate_original) {
+ adjustForNewPath(pathv);
+ interpolate_original_prev = interpolate_original;
+ }
Geom::Piecewise<Geom::D2<Geom::SBasis> > pwd2_in = pathv[0].toPwSb();
if (!pwd2_in.size()) {
return path_in;
@@ -615,18 +654,116 @@ LPEPowerStroke::doEffect_path (Geom::PathVector const & path_in)
// instead of the heavily compressed coordinate system of (segment_no offset, Y) in which the knots are stored
double pwd2_in_arclength = length(pwd2_in);
double xcoord_scaling = pwd2_in_arclength / ts.back()[Geom::X];
- for (std::size_t i = 0, e = ts.size(); i < e; ++i) {
- ts[i][Geom::X] *= xcoord_scaling;
+ if (interpolate_original) {
+ size_t i = 0;
+ std::vector<Geom::Point> ts_aprox;
+ size_t steps = 0;
+ double distance = 0;
+ Geom::PathVector splits;
+ Geom::Coord start = 0;
+ for(std::vector<Geom::Point>::iterator point = ts.begin(); point != ts.end();) {
+ point++;
+ Geom::Coord end = (*point)[Geom::X];
+ if (Geom::are_near(start, end,0.0001)) {
+ continue;
+ }
+ splits.push_back(path_in[0].portion(start, end));
+ start = end;
+ if (end == pathv[0].size()) {
+ break;
+ }
+ }
+ size_t counter = 0;
+ for(Geom::PathVector::const_iterator path_it = splits.begin(); path_it != splits.end(); ++path_it) {
+ if (path_it->empty()) {
+ continue;
+ }
+ Geom::Piecewise<Geom::D2<Geom::SBasis> > path_pwd = (*path_it).toPwSb();
+ size_t size = (*path_it).size();
+ double path_it_arclength = length(path_pwd);
+ Geom::Point start = ts[counter];
+ counter++;
+ Geom::Point end = ts[counter];
+ if (Geom::are_near(start[Geom::Y],end[Geom::Y],0.0001)) {
+ continue;
+ }
+ double gap = (start[Geom::Y] - end[Geom::Y])/size;
+ double width = 0;
+ width = start[Geom::Y];
+ for (size_t j = 1; j < size; j++){
+ Geom::Path current_curve = (*path_it).portion(j-1, j);
+ double path_it_arclength_sub = length(current_curve.toPwSb());
+ double factor = path_it_arclength_sub * size/path_it_arclength;
+ width -= gap * factor;
+ ts.push_back(Geom::Point(std::floor(ts[counter-1][Geom::X]) + j, width));
+ }
+ }
+ sort(ts.begin(), ts.end(), compare_offsets);
}
// create stroke path where points (x,y) := (t, offset)
- Geom::Interpolate::Interpolator *interpolator = Geom::Interpolate::Interpolator::create(static_cast<Geom::Interpolate::InterpolatorType>(interpolator_type.get_value()));
- if (Geom::Interpolate::CubicBezierJohan *johan = dynamic_cast<Geom::Interpolate::CubicBezierJohan*>(interpolator)) {
- johan->setBeta(interpolator_beta);
- }
- if (Geom::Interpolate::CubicBezierSmooth *smooth = dynamic_cast<Geom::Interpolate::CubicBezierSmooth*>(interpolator)) {
- smooth->setBeta(interpolator_beta);
+
+ Geom::Path fixed_path;
+ Geom::Path fixed_mirrorpath;
+ Geom::Path strokepath;
+ if (interpolate_original) {
+ std::vector<Geom::Point> ts_normal;
+ std::vector<Geom::Point> ts_mirror;
+
+ bool previous_isnode = false;
+ size_t counter = 0;
+ for(auto point:ts) {
+ Geom::Point normal_pos = pwd2_in.valueAt(point[Geom::X]) + (point[Geom::Y] * scale_width) * n.valueAt(point[Geom::X]);
+ Geom::Point mirror_pos = pwd2_in.valueAt(point[Geom::X]) + (point[Geom::Y] * -1 * scale_width) * n.valueAt(point[Geom::X]);
+ Geom::Point normal = Geom::Point(normal_pos[Geom::X] * xcoord_scaling, normal_pos[Geom::Y]);
+ Geom::Point mirror = Geom::Point(mirror_pos [Geom::X] * xcoord_scaling, mirror_pos [Geom::Y]);
+ //a bit smoothig tweak
+ if (counter > 2) {
+ Geom::Point granparent_normal = ts_normal[counter-2];
+ Geom::Point parent_normal = ts_normal[counter-1];
+ Geom::Point granparent_mirror = ts_mirror [counter-2];
+ Geom::Point parent_mirror = ts_mirror [counter-1];
+ bool isnode = ts[counter][Geom::X] == std::floor(ts[counter ][Geom::X]);
+ bool previous_isnode = ts[counter-1][Geom::X] == std::floor(ts[counter-1][Geom::X]);
+ bool ccw_toggle_normal = cross(parent_normal - granparent_normal, normal - granparent_normal) < 0;
+ bool ccw_toggle_mirror = cross(parent_mirror - granparent_mirror , mirror - granparent_mirror ) < 0;
+ Geom::Ray ray_normal_a(parent_normal, granparent_normal);
+ Geom::Ray ray_normal_b(parent_normal , normal);
+ Geom::Ray ray_mirror_a (parent_mirror, granparent_mirror);
+ Geom::Ray ray_mirror_b (parent_mirror , mirror);
+ double angle_normal = angle_between(ray_normal_a, ray_normal_b, ccw_toggle_normal);
+ double angle_mirror = angle_between(ray_mirror_a , ray_mirror_b , ccw_toggle_mirror);
+ if (point[Geom::X] > 2 &&
+ previous_isnode &&
+ !isnode &&
+ !ccw_toggle_normal &&
+ angle_normal < Geom::rad_from_deg(90))
+ {
+ ts_normal.pop_back();
+ }
+ if (point[Geom::X] > 2 &&
+ previous_isnode &&
+ !isnode &&
+ ccw_toggle_mirror &&
+ angle_mirror < Geom::rad_from_deg(90))
+ {
+ ts_mirror.pop_back();
+ }
+ }
+ ts_normal.push_back(normal);
+ ts_mirror.push_back(mirror);
+ counter++;
+ }
+ fixed_path = interpolator->interpolateToPath(ts_normal);
+ fixed_path *= Scale(1/xcoord_scaling, 1);
+ fixed_mirrorpath = interpolator->interpolateToPath(ts_mirror);
+ fixed_mirrorpath *= Scale(1/xcoord_scaling, 1);
+ fixed_mirrorpath = fixed_mirrorpath.reversed();
+ } else {
+ for (std::size_t i = 0, e = ts.size(); i < e; ++i) {
+ ts[i][Geom::X] *= xcoord_scaling;
+ }
+ strokepath = interpolator->interpolateToPath(ts);
}
- Geom::Path strokepath = interpolator->interpolateToPath(ts);
delete interpolator;
// apply the inverse knot-xcoord scaling that was applied before the interpolation
@@ -644,11 +781,13 @@ LPEPowerStroke::doEffect_path (Geom::PathVector const & path_in)
y = portion(y, rtsmin.at(0), rtsmax.at(0));
}
- LineJoinType jointype = static_cast<LineJoinType>(linejoin_type.get_value());
- Piecewise<D2<SBasis> > pwd2_out = compose(pwd2_in,x) + y*compose(n,x);
- Piecewise<D2<SBasis> > mirrorpath = reverse( compose(pwd2_in,x) - y*compose(n,x));
- Geom::Path fixed_path = path_from_piecewise_fix_cusps( pwd2_out, y, jointype, miter_limit, LPE_CONVERSION_TOLERANCE);
- Geom::Path fixed_mirrorpath = path_from_piecewise_fix_cusps( mirrorpath, reverse(y), jointype, miter_limit, LPE_CONVERSION_TOLERANCE);
+ if (!interpolate_original) {
+ LineJoinType jointype = static_cast<LineJoinType>(linejoin_type.get_value());
+ Piecewise<D2<SBasis> > pwd2_out = compose(pwd2_in,x) + y*compose(n,x);
+ Piecewise<D2<SBasis> > mirrorpath = reverse( compose(pwd2_in,x) - y*compose(n,x));
+ fixed_path = path_from_piecewise_fix_cusps( pwd2_out, y, jointype, miter_limit, LPE_CONVERSION_TOLERANCE);
+ fixed_mirrorpath = path_from_piecewise_fix_cusps( mirrorpath, reverse(y), jointype, miter_limit, LPE_CONVERSION_TOLERANCE);
+ }
if (pathv[0].closed()) {
fixed_path.close(true);
path_out.push_back(fixed_path);
@@ -663,31 +802,31 @@ LPEPowerStroke::doEffect_path (Geom::PathVector const & path_in)
case LINECAP_PEAK:
{
Geom::Point end_deriv = -unitTangentAt( reverse(pwd2_in.segs.back()), 0.);
- double radius = 0.5 * distance(pwd2_out.lastValue(), mirrorpath.firstValue());
- Geom::Point midpoint = 0.5*(pwd2_out.lastValue() + mirrorpath.firstValue()) + radius*end_deriv;
+ double radius = 0.5 * distance(fixed_path.finalPoint(), fixed_mirrorpath.initialPoint());
+ Geom::Point midpoint = 0.5*(fixed_path.finalPoint() + fixed_mirrorpath.initialPoint()) + radius*end_deriv;
fixed_path.appendNew<LineSegment>(midpoint);
- fixed_path.appendNew<LineSegment>(mirrorpath.firstValue());
+ fixed_path.appendNew<LineSegment>(fixed_mirrorpath.initialPoint());
break;
}
case LINECAP_SQUARE:
{
Geom::Point end_deriv = -unitTangentAt( reverse(pwd2_in.segs.back()), 0.);
- double radius = 0.5 * distance(pwd2_out.lastValue(), mirrorpath.firstValue());
- fixed_path.appendNew<LineSegment>( pwd2_out.lastValue() + radius*end_deriv );
- fixed_path.appendNew<LineSegment>( mirrorpath.firstValue() + radius*end_deriv );
- fixed_path.appendNew<LineSegment>( mirrorpath.firstValue() );
+ double radius = 0.5 * distance(fixed_path.finalPoint(), fixed_mirrorpath.initialPoint());
+ fixed_path.appendNew<LineSegment>( fixed_path.finalPoint() + radius*end_deriv );
+ fixed_path.appendNew<LineSegment>( fixed_mirrorpath.initialPoint() + radius*end_deriv );
+ fixed_path.appendNew<LineSegment>( fixed_mirrorpath.initialPoint() );
break;
}
case LINECAP_BUTT:
{
- fixed_path.appendNew<LineSegment>( mirrorpath.firstValue() );
+ fixed_path.appendNew<LineSegment>( fixed_mirrorpath.initialPoint() );
break;
}
case LINECAP_ROUND:
default:
{
- double radius1 = 0.5 * distance(pwd2_out.lastValue(), mirrorpath.firstValue());
- fixed_path.appendNew<EllipticalArc>( radius1, radius1, M_PI/2., false, y.lastValue() < 0, mirrorpath.firstValue() );
+ double radius1 = 0.5 * distance(fixed_path.finalPoint(), fixed_mirrorpath.initialPoint());
+ fixed_path.appendNew<EllipticalArc>( radius1, radius1, M_PI/2., false, y.lastValue() < 0, fixed_mirrorpath.initialPoint() );
break;
}
}
@@ -700,31 +839,31 @@ LPEPowerStroke::doEffect_path (Geom::PathVector const & path_in)
case LINECAP_PEAK:
{
Geom::Point start_deriv = unitTangentAt( pwd2_in.segs.front(), 0.);
- double radius = 0.5 * distance(pwd2_out.firstValue(), mirrorpath.lastValue());
- Geom::Point midpoint = 0.5*(mirrorpath.lastValue() + pwd2_out.firstValue()) - radius*start_deriv;
+ double radius = 0.5 * distance(fixed_path.initialPoint(), fixed_mirrorpath.finalPoint());
+ Geom::Point midpoint = 0.5*(fixed_mirrorpath.finalPoint() + fixed_path.initialPoint()) - radius*start_deriv;
fixed_path.appendNew<LineSegment>( midpoint );
- fixed_path.appendNew<LineSegment>( pwd2_out.firstValue() );
+ fixed_path.appendNew<LineSegment>( fixed_path.initialPoint() );
break;
}
case LINECAP_SQUARE:
{
Geom::Point start_deriv = unitTangentAt( pwd2_in.segs.front(), 0.);
- double radius = 0.5 * distance(pwd2_out.firstValue(), mirrorpath.lastValue());
- fixed_path.appendNew<LineSegment>( mirrorpath.lastValue() - radius*start_deriv );
- fixed_path.appendNew<LineSegment>( pwd2_out.firstValue() - radius*start_deriv );
- fixed_path.appendNew<LineSegment>( pwd2_out.firstValue() );
+ double radius = 0.5 * distance(fixed_path.initialPoint(), fixed_mirrorpath.finalPoint());
+ fixed_path.appendNew<LineSegment>( fixed_mirrorpath.finalPoint() - radius*start_deriv );
+ fixed_path.appendNew<LineSegment>( fixed_path.initialPoint() - radius*start_deriv );
+ fixed_path.appendNew<LineSegment>( fixed_path.initialPoint() );
break;
}
case LINECAP_BUTT:
{
- fixed_path.appendNew<LineSegment>( pwd2_out.firstValue() );
+ fixed_path.appendNew<LineSegment>( fixed_path.initialPoint() );
break;
}
case LINECAP_ROUND:
default:
{
- double radius2 = 0.5 * distance(pwd2_out.firstValue(), mirrorpath.lastValue());
- fixed_path.appendNew<EllipticalArc>( radius2, radius2, M_PI/2., false, y.firstValue() < 0, pwd2_out.firstValue() );
+ double radius2 = 0.5 * distance(fixed_path.initialPoint(), fixed_mirrorpath.finalPoint());
+ fixed_path.appendNew<EllipticalArc>( radius2, radius2, M_PI/2., false, y.firstValue() < 0, fixed_path.initialPoint() );
break;
}
}
diff --git a/src/live_effects/lpe-powerstroke.h b/src/live_effects/lpe-powerstroke.h
index 4a0eda75a..53aab1b05 100644
--- a/src/live_effects/lpe-powerstroke.h
+++ b/src/live_effects/lpe-powerstroke.h
@@ -38,6 +38,7 @@ public:
private:
BoolParam sort_points;
+ BoolParam interpolate_original;
EnumParam<unsigned> interpolator_type;
ScalarParam interpolator_beta;
ScalarParam scale_width;
@@ -45,7 +46,7 @@ private:
EnumParam<unsigned> linejoin_type;
ScalarParam miter_limit;
EnumParam<unsigned> end_linecap_type;
-
+ bool interpolate_original_prev;
LPEPowerStroke(const LPEPowerStroke&);
LPEPowerStroke& operator=(const LPEPowerStroke&);
};
diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp
index d878b50a4..53629a1a2 100644
--- a/src/ui/dialog/export.cpp
+++ b/src/ui/dialog/export.cpp
@@ -851,10 +851,11 @@ void Export::onProgressCancel ()
unsigned int Export::onProgressCallback(float value, void *dlg)
{
Gtk::Dialog *dlg2 = reinterpret_cast<Gtk::Dialog*>(dlg);
- if (dlg2->get_data("cancel")) {
- return FALSE;
- }
+ Export *self = reinterpret_cast<Export *>(dlg2->get_data("exportPanel"));
+ if (self->interrupted)
+ return FALSE;
+
gint current = GPOINTER_TO_INT(dlg2->get_data("current"));
gint total = GPOINTER_TO_INT(dlg2->get_data("total"));
if (total > 0) {
@@ -867,7 +868,6 @@ unsigned int Export::onProgressCallback(float value, void *dlg)
Gtk::ProgressBar *prg = reinterpret_cast<Gtk::ProgressBar *>(dlg2->get_data("progress"));
prg->set_fraction(value);
- Export *self = reinterpret_cast<Export *>(dlg2->get_data("exportPanel"));
if (self) {
self->_prog.set_fraction(value);
}
@@ -901,6 +901,7 @@ void Export::setExporting(bool exporting, Glib::ustring const &text)
Gtk::Dialog * Export::create_progress_dialog (Glib::ustring progress_text) {
Gtk::Dialog *dlg = new Gtk::Dialog(_("Export in progress"), TRUE);
+ dlg->set_transient_for( *(INKSCAPE.active_desktop()->getToplevel()) );
Gtk::ProgressBar *prg = new Gtk::ProgressBar ();
prg->set_text(progress_text);
diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp
index 99312f8c8..adeee35fd 100644
--- a/src/ui/dialog/inkscape-preferences.cpp
+++ b/src/ui/dialog/inkscape-preferences.cpp
@@ -1432,7 +1432,7 @@ void InkscapePreferences::initPageRendering()
// rendering tile multiplier
_rendering_tile_multiplier.init("/options/rendering/tile-multiplier", 1.0, 512.0, 1.0, 16.0, 16.0, true, false);
- _page_rendering.add_line( false, _("Rendering tile multiplier:"), _rendering_tile_multiplier, _(""),
+ _page_rendering.add_line( false, _("Rendering tile multiplier:"), _rendering_tile_multiplier, "",
_("Set the relative size of tiles used to render the canvas. The larger the value, the bigger the tile size."), false);
/* blur quality */
diff --git a/src/ui/dialog/print.cpp b/src/ui/dialog/print.cpp
index 532a8c364..ea99ffa19 100644
--- a/src/ui/dialog/print.cpp
+++ b/src/ui/dialog/print.cpp
@@ -35,6 +35,10 @@ static void draw_page(GtkPrintOperation *,
gint /*page_nr*/,
gpointer user_data)
{
+ // TODO: If the user prints multiple copies we render the whole page for each copy
+ // It would be more efficient to render the page once (e.g. in "begin_print")
+ // and simply print this result as often as necessary
+
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
struct workaround_gtkmm *junk = (struct workaround_gtkmm*)user_data;
//printf("%s %d\n",__FUNCTION__, page_nr);
@@ -120,7 +124,7 @@ static void draw_page(GtkPrintOperation *,
ret = renderer.setupDocument (ctx, junk->_doc, TRUE, 0., NULL);
if (ret) {
renderer.renderItem(ctx, junk->_base);
- ctx->finish();
+ ctx->finish(false); // do not finish the cairo_surface_t - it's owned by our GtkPrintContext!
}
else {
g_warning("%s", _("Could not set up Document"));
diff --git a/src/ui/dialog/symbols.cpp b/src/ui/dialog/symbols.cpp
index 6add2b73d..60c9b2b32 100644
--- a/src/ui/dialog/symbols.cpp
+++ b/src/ui/dialog/symbols.cpp
@@ -462,7 +462,7 @@ void SymbolsDialog::showOverlay() {
} else {
overlay_icon->set_from_icon_name("searching", iconsize);
overlay_title->set_markup(Glib::ustring("<span foreground=\"#333333\" size=\"large\">") + Glib::ustring(_("Search in all symbol sets...")) + Glib::ustring("</span>"));
- overlay_desc->set_markup(Glib::ustring("<span foreground=\"#333333\" size=\"small\">") + Glib::ustring(_("")) + Glib::ustring("</span>"));
+ overlay_desc->set_markup(Glib::ustring("<span foreground=\"#333333\" size=\"small\">") + Glib::ustring("</span>"));
}
} else if (!number_symbols && (current != CURRENTDOC || !search_str.empty())) {
overlay_title->set_markup(Glib::ustring("<span foreground=\"#333333\" size=\"large\">") + Glib::ustring(_("No results found")) + Glib::ustring("</span>"));