summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLiam P. White <inkscapebronyat-signgmaildotcom>2014-04-18 02:20:21 +0000
committerLiam P. White <inkscapebronyat-signgmaildotcom>2014-04-18 02:20:21 +0000
commit3e7faea771dc06753bfbe3c319c046d839ee039c (patch)
tree23ba8843cf2ebd46bb0038c1816dd296ce92741f /src
parentSemi-fix for Join type on closed paths (diff)
parentLatvian translation update (diff)
downloadinkscape-3e7faea771dc06753bfbe3c319c046d839ee039c.tar.gz
inkscape-3e7faea771dc06753bfbe3c319c046d839ee039c.zip
Update to trunk
(bzr r13090.1.60)
Diffstat (limited to 'src')
-rw-r--r--src/desktop.cpp3
-rw-r--r--src/display/sp-canvas.cpp2
-rw-r--r--src/extension/dbus/Makefile_insert2
-rw-r--r--src/live_effects/pathoutlineprovider.cpp74
-rw-r--r--src/preferences-skeleton.h4
-rw-r--r--src/splivarot.cpp15
-rw-r--r--src/xml/repr-css.cpp5
7 files changed, 77 insertions, 28 deletions
diff --git a/src/desktop.cpp b/src/desktop.cpp
index 22c00d4f1..b61f6867f 100644
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
@@ -1699,7 +1699,6 @@ _layer_hierarchy_changed(SPObject */*top*/, SPObject *bottom,
/// Called when document is starting to be rebuilt.
static void _reconstruction_start(SPDesktop * desktop)
{
- g_debug("Desktop, starting reconstruction\n");
desktop->_reconstruction_old_layer_id = desktop->currentLayer()->getId() ? desktop->currentLayer()->getId() : "";
desktop->layers->reset();
@@ -1710,8 +1709,6 @@ static void _reconstruction_start(SPDesktop * desktop)
}
*/
desktop->selection->clear();
-
- g_debug("Desktop, starting reconstruction end\n");
}
/// Called when document rebuild is finished.
diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp
index 6d903867b..3dc4a7504 100644
--- a/src/display/sp-canvas.cpp
+++ b/src/display/sp-canvas.cpp
@@ -2153,6 +2153,8 @@ gboolean SPCanvasImpl::handleDraw(GtkWidget *widget, cairo_t *cr) {
canvas->requestRedraw(r.left(), r.top(), r.right(), r.bottom());
}
+ cairo_rectangle_list_destroy(rects);
+
return FALSE;
}
#else
diff --git a/src/extension/dbus/Makefile_insert b/src/extension/dbus/Makefile_insert
index 7d851715e..192651d87 100644
--- a/src/extension/dbus/Makefile_insert
+++ b/src/extension/dbus/Makefile_insert
@@ -78,7 +78,7 @@ libinkdbus_la_CFLAGS = \
$(DBUS_CFLAGS) \
$(INKSCAPE_CFLAGS) \
-I$(builddir)/extension/dbus \
- -Wall -Werror
+ -Wall
libinkdbus_la_LIBADD = \
$(DBUS_LIBS) \
diff --git a/src/live_effects/pathoutlineprovider.cpp b/src/live_effects/pathoutlineprovider.cpp
index 4836b0d98..b5a3258fa 100644
--- a/src/live_effects/pathoutlineprovider.cpp
+++ b/src/live_effects/pathoutlineprovider.cpp
@@ -474,6 +474,9 @@ Geom::Path doAdvHalfOutline(const Geom::Path& path_in, double line_width, double
}
if (path_in.closed()) {
+ Geom::Curve * cbc1;
+ Geom::Curve * cbc2;
+
if ( path_in[path_in.size() - 1].length() != Geom::distance(path_in[path_in.size() - 1].finalPoint(), path_in.initialPoint())) {
//handle case for last segment curved
outlined_result = Path();
@@ -486,30 +489,71 @@ Geom::Path doAdvHalfOutline(const Geom::Path& path_in, double line_width, double
path_vec = outlined_result.MakePathVector();
- Geom::Curve * cbc1 = path_builder[path_builder.size() - 1].duplicate();//(*path_vec)[0] [0].duplicate();
- Geom::Curve * cbc2 = (*path_vec)[0] [0].duplicate();//path_builder[path_builder.size() - 1].duplicate();
+ cbc1 = path_builder[path_builder.size() - 1].duplicate();
+ cbc2 = (*path_vec)[0] [0].duplicate();
- Geom::Path temporary; //why do we need this? you'll see in a bit
- temporary.append(*cbc1);
+ delete path_vec;
+ } else {
+ //handle case for last segment straight (since the path doesn't actually give us access to it)
+ outlined_result = Path();
+ to_outline = Path();
+
+ Geom::Path oneCurve; oneCurve.append(Geom::LineSegment(path_in.finalPoint(), path_in.initialPoint()));
+
+ to_outline.LoadPath(oneCurve, Geom::Affine(), false, false);
+ to_outline.OutsideOutline(&outlined_result, line_width / 2, join_straight, butt_straight, 10);
+
+ path_vec = outlined_result.MakePathVector();
+
+ cbc1 = path_builder[path_builder.size() - 1].duplicate();
+ cbc2 = (*path_vec)[0] [0].duplicate();
+
+ //append the closing segment
if (extrapolate) {
- extrapolate_curves(temporary, cbc1, cbc2, cbc2->initialPoint(), miter_limit, line_width,
+ extrapolate_curves(path_builder, cbc1, cbc2, cbc2->initialPoint(), miter_limit, line_width,
outside_angle ( path_in[path_in.size() - 1], path_in [0] ));
} else {
- reflect_curves (temporary, cbc1, cbc2, cbc2->initialPoint(), miter_limit, line_width,
+ reflect_curves (path_builder, cbc1, cbc2, cbc2->initialPoint(), miter_limit, line_width,
outside_angle ( path_in[path_in.size() - 1], path_in [0] ));
}
- //extract the appended curves
- if (temporary[0].finalPoint() != path_builder[path_builder.size() - 1].finalPoint()) {
- path_builder.erase(path_builder.begin());
- } else {
- temporary.erase_last();
- }
- path_builder.erase_last();
- path_builder.append(temporary, Geom::Path::STITCH_DISCONTINUOUS);
- path_builder.close();
+ delete cbc1; cbc1 = cbc2->duplicate();
+ delete path_vec;
+
+ oneCurve = Geom::Path(); oneCurve.append(path_in[0]);
+
+ to_outline.LoadPath(oneCurve, Geom::Affine(), false, false);
+ to_outline.OutsideOutline(&outlined_result, line_width / 2, join_straight, butt_straight, 10);
+
+ path_vec = outlined_result.MakePathVector();
+ delete cbc2; cbc2 = (*path_vec)[0] [0].duplicate();
+ delete path_vec;
+ }
+
+ Geom::Path temporary; //just an accessory path, we won't need it for long
+ temporary.append(*cbc1);
+
+ if (extrapolate) {
+ extrapolate_curves(temporary, cbc1, cbc2, cbc2->initialPoint(), miter_limit, line_width,
+ outside_angle ( path_in[path_in.size() - 1], path_in [0] ));
+ } else {
+ reflect_curves (temporary, cbc1, cbc2, cbc2->initialPoint(), miter_limit, line_width,
+ outside_angle ( path_in[path_in.size() - 1], path_in [0] ));
+ }
+ //extract the appended curves
+ if (temporary[0].finalPoint() != path_builder[path_builder.size() - 1].finalPoint()) {
+ path_builder.erase(path_builder.begin());
+ } else {
+ temporary.erase_last();
}
+ path_builder.erase_last();
+
+ path_builder.append(temporary, Geom::Path::STITCH_DISCONTINUOUS);
+ path_builder.close();
+
+ if (cbc1) delete cbc1;
+ if (cbc2) delete cbc2;
}
return path_builder;
diff --git a/src/preferences-skeleton.h b/src/preferences-skeleton.h
index 96629f22d..734e8a582 100644
--- a/src/preferences-skeleton.h
+++ b/src/preferences-skeleton.h
@@ -293,7 +293,9 @@ static char const preferences_skeleton[] =
#ifdef WIN32 // FIXME: Temporary Win32 special code to enable transient dialogs
" <group id=\"dialogsontopwin32\" value=\"0\"/>\n"
#endif
-" <group id=\"defaultwindowsize\" value=\"2\" />\n"
+#if !defined(GDK_WINDOWING_QUARTZ) // No maximise for Quartz, see lp:1302627
+ " <group id=\"defaultwindowsize\" value=\"2\" />\n"
+#endif
" <group id=\"arenatilescachesize\" value=\"8192\"/>\n"
" <group id=\"preservetransform\" value=\"0\"/>\n"
" <group id=\"clonecompensation\" value=\"1\"/>\n"
diff --git a/src/splivarot.cpp b/src/splivarot.cpp
index c800ace0b..a08809adf 100644
--- a/src/splivarot.cpp
+++ b/src/splivarot.cpp
@@ -960,16 +960,17 @@ Geom::PathVector* item_outline(SPItem const *item, bool bbox_only)
Geom::Affine const transform(item->transform);
float const scale = transform.descrim();
- float o_width, o_miter;
+ float o_width = i_style->stroke_width.computed;
+ if (o_width < Geom::EPSILON) {
+ // This may result in rounding errors for very small stroke widths (happens e.g. when user unit is large).
+ // See bug lp:1244861
+ o_width = Geom::EPSILON;
+ }
+ float o_miter = i_style->stroke_miterlimit.value * o_width;
+
JoinType o_join;
ButtType o_butt;
{
- o_width = i_style->stroke_width.computed;
- if (o_width < 0.01) {
- o_width = 0.01;
- }
- o_miter = i_style->stroke_miterlimit.value * o_width;
-
switch (i_style->stroke_linejoin.computed) {
case SP_STROKE_LINEJOIN_MITER:
o_join = join_pointy;
diff --git a/src/xml/repr-css.cpp b/src/xml/repr-css.cpp
index 24e2db9e1..32a1e7f5d 100644
--- a/src/xml/repr-css.cpp
+++ b/src/xml/repr-css.cpp
@@ -382,7 +382,10 @@ static void sp_repr_css_merge_from_decl(SPCSSAttr *css, CRDeclaration const *con
std::string characters;
std::string temp;
bool number_valid = !(ss >> number).fail();
- if( !number_valid ) ss.clear();
+ if (!number_valid) {
+ ss.clear();
+ ss.seekg(0); // work-around for a bug in libc++ (see lp:1300271)
+ }
while( !(ss >> temp).eof() ) {
characters += temp;
characters += " ";