summaryrefslogtreecommitdiffstats
path: root/src/style.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2016-10-19 11:11:05 +0000
committertavmjong-free <tavmjong@free.fr>2016-10-19 11:11:05 +0000
commit96bf3670efc23ecee2b9546b0b55993b1601c221 (patch)
tree57811483e1b2ea1e395b8f125964e45296138b6c /src/style.cpp
parentupdate author list in about dialog from AUTHORS file (diff)
downloadinkscape-96bf3670efc23ecee2b9546b0b55993b1601c221.tar.gz
inkscape-96bf3670efc23ecee2b9546b0b55993b1601c221.zip
Implement 'vector-effect' value 'non-scaling-stroke'. No GUI yet.
(bzr r15177)
Diffstat (limited to 'src/style.cpp')
-rw-r--r--src/style.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/style.cpp b/src/style.cpp
index 930e271ad..c513b735d 100644
--- a/src/style.cpp
+++ b/src/style.cpp
@@ -161,6 +161,9 @@ SPStyle::SPStyle(SPDocument *document_in, SPObject *object_in) :
solid_color( "solid-color" ), // SPIColor
solid_opacity( "solid-opacity", SP_SCALE24_MAX ),
+ // Vector effects
+ vector_effect( "vector-effect", enum_vector_effect, SP_VECTOR_EFFECT_NONE, false ),
+
// Fill properties
fill( "fill" ), // SPIPaint
fill_opacity( "fill-opacity", SP_SCALE24_MAX ),
@@ -331,6 +334,8 @@ SPStyle::SPStyle(SPDocument *document_in, SPObject *object_in) :
_properties.push_back( &solid_color );
_properties.push_back( &solid_opacity );
+ _properties.push_back( &vector_effect );
+
_properties.push_back( &fill );
_properties.push_back( &fill_opacity );
_properties.push_back( &fill_rule );
@@ -427,6 +432,8 @@ SPStyle::SPStyle(SPDocument *document_in, SPObject *object_in) :
// _propmap.insert( std::make_pair( solid_color.name, reinterpret_cast<SPIBasePtr>(&SPStyle::solid_color ) ) );
// _propmap.insert( std::make_pair( solid_opacity.name, reinterpret_cast<SPIBasePtr>(&SPStyle::solid_opacity ) ) );
+ // _propmap.insert( std::make_pair( vector_effect.name, reinterpret_cast<SPIBasePtr>(&SPStyle::vector_effect ) ) );
+
// _propmap.insert( std::make_pair( fill.name, reinterpret_cast<SPIBasePtr>(&SPStyle::fill ) ) );
// _propmap.insert( std::make_pair( fill_opacity.name, reinterpret_cast<SPIBasePtr>(&SPStyle::fill_opacity ) ) );
// _propmap.insert( std::make_pair( fill_rule.name, reinterpret_cast<SPIBasePtr>(&SPStyle::fill_rule ) ) );
@@ -911,6 +918,9 @@ SPStyle::readIfUnset( gint id, gchar const *val ) {
case SP_PROP_SOLID_OPACITY:
solid_opacity.readIfUnset( val );
break;
+ case SP_PROP_VECTOR_EFFECT:
+ vector_effect.readIfUnset( val );
+ break;
case SP_PROP_FILL:
fill.readIfUnset( val );
break;
@@ -1624,6 +1634,9 @@ sp_style_unset_property_attrs(SPObject *o)
if (style->solid_opacity.set) {
repr->setAttribute("solid-opacity", NULL);
}
+ if (style->vector_effect.set) {
+ repr->setAttribute("vector-effect", NULL);
+ }
if (style->fill.set) {
repr->setAttribute("fill", NULL);
}