summaryrefslogtreecommitdiffstats
path: root/src/selection-chemistry.cpp
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-11-09 05:13:46 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-11-09 05:13:46 +0000
commit4b236f3f1e3fe5374e18dac9e6c35567d9dc0995 (patch)
treed6a8f361b37294feb8da05c2ce61271e5137a237 /src/selection-chemistry.cpp
parentRemove FIXME from refactoring (diff)
parentFix bug in previous commit. Add test against it (diff)
downloadinkscape-4b236f3f1e3fe5374e18dac9e6c35567d9dc0995.tar.gz
inkscape-4b236f3f1e3fe5374e18dac9e6c35567d9dc0995.zip
Update to trunk r13690
(bzr r13341.5.22)
Diffstat (limited to 'src/selection-chemistry.cpp')
-rw-r--r--src/selection-chemistry.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp
index c81646d6c..b4f7ebdd7 100644
--- a/src/selection-chemistry.cpp
+++ b/src/selection-chemistry.cpp
@@ -1198,6 +1198,9 @@ take_style_from_item(SPObject *object)
}
}
+ // Remove black-listed properties (those that should not be used in a default style)
+ css = sp_css_attr_unset_blacklist(css);
+
if (!(dynamic_cast<SPText *>(object) || dynamic_cast<SPTSpan *>(object) || dynamic_cast<SPTRef *>(object) || dynamic_cast<SPString *>(object))) {
// do not copy text properties from non-text objects, it's confusing
css = sp_css_attr_unset_text(css);
@@ -3661,7 +3664,7 @@ void sp_selection_create_bitmap_copy(SPDesktop *desktop)
if (hint_xdpi != 0) {
res = hint_xdpi;
} else {
- // if all else fails, take the default 90 dpi
+ // if all else fails, take the default 96 dpi
res = Inkscape::Util::Quantity::convert(1, "in", "px");
}
}
@@ -3709,7 +3712,7 @@ void sp_selection_create_bitmap_copy(SPDesktop *desktop)
double shift_x = bbox->min()[Geom::X];
double shift_y = bbox->max()[Geom::Y];
- if (res == Inkscape::Util::Quantity::convert(1, "in", "px")) { // for default 90 dpi, snap it to pixel grid
+ if (res == Inkscape::Util::Quantity::convert(1, "in", "px")) { // for default 96 dpi, snap it to pixel grid
shift_x = round(shift_x);
shift_y = -round(-shift_y); // this gets correct rounding despite coordinate inversion, remove the negations when the inversion is gone
}
@@ -3744,7 +3747,7 @@ void sp_selection_create_bitmap_copy(SPDesktop *desktop)
// TODO: avoid unnecessary roundtrip between data URI and decoded pixbuf
Inkscape::XML::Node * repr = xml_doc->createElement("svg:image");
sp_embed_image(repr, pb);
- if (res == Inkscape::Util::Quantity::convert(1, "in", "px")) { // for default 90 dpi, snap it to pixel grid
+ if (res == Inkscape::Util::Quantity::convert(1, "in", "px")) { // for default 96 dpi, snap it to pixel grid
sp_repr_set_svg_double(repr, "width", width);
sp_repr_set_svg_double(repr, "height", height);
} else {