summaryrefslogtreecommitdiffstats
path: root/src/style.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2015-11-18 09:06:09 +0000
committertavmjong-free <tavmjong@free.fr>2015-11-18 09:06:09 +0000
commit97fd7f4c6b6532fd70149726c61c98605dda4067 (patch)
tree23a178189c8eaa22557f415fb3e654f0f8c317ca /src/style.cpp
parentReplace leading by more useful x-height. Use OS/2 font metrics when available. (diff)
downloadinkscape-97fd7f4c6b6532fd70149726c61c98605dda4067.tar.gz
inkscape-97fd7f4c6b6532fd70149726c61c98605dda4067.zip
Read/write 'dominant-baseline' property.
(bzr r14430.1.6)
Diffstat (limited to 'src/style.cpp')
-rw-r--r--src/style.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/style.cpp b/src/style.cpp
index 369127792..0bad376a4 100644
--- a/src/style.cpp
+++ b/src/style.cpp
@@ -138,6 +138,7 @@ SPStyle::SPStyle(SPDocument *document_in, SPObject *object_in) :
direction( "direction", enum_direction, SP_CSS_DIRECTION_LTR ),
writing_mode( "writing-mode", enum_writing_mode, SP_CSS_WRITING_MODE_LR_TB ),
text_orientation( "text-orientation",enum_text_orientation,SP_CSS_TEXT_ORIENTATION_MIXED ),
+ dominant_baseline("dominant-baseline",enum_baseline, SP_CSS_BASELINE_AUTO ),
baseline_shift(),
text_anchor( "text-anchor", enum_text_anchor, SP_CSS_TEXT_ANCHOR_START ),
white_space( "white-space", enum_white_space, SP_CSS_WHITE_SPACE_NORMAL ),
@@ -321,6 +322,7 @@ SPStyle::SPStyle(SPDocument *document_in, SPObject *object_in) :
_properties.push_back( &writing_mode );
_properties.push_back( &direction );
_properties.push_back( &text_orientation );
+ _properties.push_back( &dominant_baseline );
_properties.push_back( &baseline_shift );
_properties.push_back( &text_anchor );
_properties.push_back( &white_space );
@@ -415,6 +417,7 @@ SPStyle::SPStyle(SPDocument *document_in, SPObject *object_in) :
// _propmap.insert( std::make_pair( direction.name, reinterpret_cast<SPIBasePtr>(&SPStyle::direction ) ) );
// _propmap.insert( std::make_pair( writing_mode.name, reinterpret_cast<SPIBasePtr>(&SPStyle::writing_mode ) ) );
// _propmap.insert( std::make_pair( text_orientation.name, reinterpret_cast<SPIBasePtr>(&SPStyle::text_orientation ) ) );
+ // _propmap.insert( std::make_pair( dominant_baseline.name, reinterpret_cast<SPIBasePtr>(&SPStyle::dominant_baseline ) ) );
// _propmap.insert( std::make_pair( baseline_shift.name, reinterpret_cast<SPIBasePtr>(&SPStyle::baseline_shift ) ) );
// _propmap.insert( std::make_pair( text_anchor.name, reinterpret_cast<SPIBasePtr>(&SPStyle::text_anchor ) ) );
// _propmap.insert( std::make_pair( white_space.name, reinterpret_cast<SPIBasePtr>(&SPStyle::white_space ) ) );
@@ -796,6 +799,9 @@ SPStyle::readIfUnset( gint id, gchar const *val ) {
case SP_PROP_SHAPE_PADDING:
shape_padding.readIfUnset( val );
break;
+ case SP_PROP_DOMINANT_BASELINE:
+ dominant_baseline.readIfUnset( val );
+ break;
case SP_PROP_BASELINE_SHIFT:
baseline_shift.readIfUnset( val );
break;
@@ -805,9 +811,6 @@ SPStyle::readIfUnset( gint id, gchar const *val ) {
case SP_PROP_ALIGNMENT_BASELINE:
g_warning("Unimplemented style property SP_PROP_ALIGNMENT_BASELINE: value: %s", val);
break;
- case SP_PROP_DOMINANT_BASELINE:
- g_warning("Unimplemented style property SP_PROP_DOMINANT_BASELINE: value: %s", val);
- break;
case SP_PROP_GLYPH_ORIENTATION_HORIZONTAL:
g_warning("Unimplemented style property SP_PROP_ORIENTATION_HORIZONTAL: value: %s", val);
break;