summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sp-text.cpp17
-rw-r--r--src/style.cpp1
2 files changed, 16 insertions, 2 deletions
diff --git a/src/sp-text.cpp b/src/sp-text.cpp
index fdf57577c..e40661824 100644
--- a/src/sp-text.cpp
+++ b/src/sp-text.cpp
@@ -501,10 +501,18 @@ unsigned SPText::_buildLayoutInput(SPObject *root, Inkscape::Text::Layout::Optio
if ( curve ) {
Path *temp = new Path;
+ Path *padded = new Path;
temp->LoadPathVector( curve->get_pathvector(), shape->transform, true );
- temp->Convert( 0.25 ); // Convert to polyline
+ if( style->shape_padding.set ) {
+ // std::cout << " padding: " << style->shape_padding.computed << std::endl;
+ temp->OutsideOutline ( padded, style->shape_padding.computed, join_round, butt_straight, 20.0 );
+ } else {
+ // std::cout << " no padding" << std::endl;
+ padded->Copy( temp );
+ }
+ padded->Convert( 0.25 ); // Convert to polyline
Shape* sh = new Shape;
- temp->Fill( sh, 0 );
+ padded->Fill( sh, 0 );
// for( unsigned i = 0; i < temp->pts.size(); ++i ) {
// std::cout << " ........ " << temp->pts[i].p << std::endl;
// }
@@ -512,6 +520,11 @@ unsigned SPText::_buildLayoutInput(SPObject *root, Inkscape::Text::Layout::Optio
Shape *uncross = new Shape;
uncross->ConvertToShape( sh );
layout.appendWrapShape( uncross );
+
+ delete temp;
+ delete padded;
+ delete sh;
+ // delete uncross;
} else {
std::cerr << "SPText::_buildLayoutInput(): Failed to get curve." << std::endl;
}
diff --git a/src/style.cpp b/src/style.cpp
index 8b6c4c79e..b65bff53f 100644
--- a/src/style.cpp
+++ b/src/style.cpp
@@ -249,6 +249,7 @@ SPStyle::SPStyle(SPDocument *document_in, SPObject *object_in) :
word_spacing.setStylePointer( this );
stroke_width.setStylePointer( this );
stroke_dashoffset.setStylePointer( this );
+ shape_padding.setStylePointer( this );
// Properties that depend on 'color'
text_decoration_color.setStylePointer( this );