summaryrefslogtreecommitdiffstats
path: root/src/object/sp-flowtext.cpp
diff options
context:
space:
mode:
authorJabiertxof <jabier.arraiza@marker.es>2019-09-16 14:41:18 +0000
committerJabiertxof <jabier.arraiza@marker.es>2019-09-16 14:41:18 +0000
commitc239b8d513fae662a4e3be85f85efb794d98d83d (patch)
treec2528a5760b21acc685f13cde3b5426284d6fc5b /src/object/sp-flowtext.cpp
parentAllow paste on flowbox at same sice of origin, also improve creation to get r... (diff)
downloadinkscape-c239b8d513fae662a4e3be85f85efb794d98d83d.tar.gz
inkscape-c239b8d513fae662a4e3be85f85efb794d98d83d.zip
Allow paste preserving new lines into a flowtext element
Diffstat (limited to 'src/object/sp-flowtext.cpp')
-rw-r--r--src/object/sp-flowtext.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/object/sp-flowtext.cpp b/src/object/sp-flowtext.cpp
index 05e06cff5..a488e208b 100644
--- a/src/object/sp-flowtext.cpp
+++ b/src/object/sp-flowtext.cpp
@@ -688,6 +688,26 @@ SPItem *create_flowtext_with_internal_frame (SPDesktop *desktop, Geom::Point p0,
return ft_item;
}
+void SPFlowtext::fix_overflow_flowregion(bool inverse)
+{
+ SPObject *object = dynamic_cast<SPObject *>(this);
+ SPFlowregion *flowregion = nullptr;
+ for (auto child : object->childList(false)) {
+ SPFlowregion *flowregion = dynamic_cast<SPFlowregion *>(child);
+ if (flowregion) {
+ object = dynamic_cast<SPObject *>(flowregion);
+ for (auto childshapes : object->childList(false)) {
+ Geom::Scale scale = Geom::Scale(1000); //200? maybe find better way to fix overglow issue removing new lines...
+ if (inverse) {
+ scale = scale.inverse();
+ }
+ SP_SHAPE(childshapes)->doWriteTransform(scale, nullptr, true);
+ }
+ break;
+ }
+ }
+}
+
Geom::Affine SPFlowtext::set_transform (Geom::Affine const &xform)
{
if ((this->_optimizeScaledText && !xform.withoutTranslation().isNonzeroUniformScale())