From f29837e4e28f859bd83c8002453e4dd8b82ef08f Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Mon, 28 Jul 2014 15:08:20 -0400 Subject: Fix placement news and calls to destructor. Fixes crash regressions #1348891, #1344217, #1333445, and stubborn Windows bug #956225 (possibly more). Fixed bugs: - https://launchpad.net/bugs/1348891 - https://launchpad.net/bugs/1344217 - https://launchpad.net/bugs/1333445 - https://launchpad.net/bugs/956225 (bzr r13474) --- src/style.cpp | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'src/style.cpp') diff --git a/src/style.cpp b/src/style.cpp index c6a98e7f4..222155a0c 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -227,11 +227,6 @@ SPStyle::SPStyle(SPDocument *document_in, SPObject *object_in) : document = document_in; } - new (&release_connection) sigc::connection(); - new (&filter_modified_connection) sigc::connection(); - new (&fill_ps_modified_connection) sigc::connection(); - new (&stroke_ps_modified_connection) sigc::connection(); - // 'font' shorthand requires access to included properties. font.setStylePointer( this ); @@ -431,7 +426,6 @@ SPStyle::~SPStyle() { // Remove connections release_connection.disconnect(); - release_connection.~connection(); // The following shoud be moved into SPIPaint and SPIFilter if (fill.value.href) { @@ -446,12 +440,7 @@ SPStyle::~SPStyle() { filter_modified_connection.disconnect(); } - filter_modified_connection.~connection(); - fill_ps_modified_connection.~connection(); - stroke_ps_modified_connection.~connection(); - _properties.clear(); - //_propmap.clear(); // std::cout << "SPStyle::~SPstyle(): Exit\n" << std::endl; } -- cgit v1.2.3 From 291925ef62d1068af1c4b7f3614c96d46f3c20f2 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Thu, 31 Jul 2014 16:31:01 +0200 Subject: Basic support for element (rendering only as a paint server). (bzr r13484) --- src/style.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/style.cpp') diff --git a/src/style.cpp b/src/style.cpp index 222155a0c..f0710e404 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -153,6 +153,10 @@ SPStyle::SPStyle(SPDocument *document_in, SPObject *object_in) : color_interpolation( "color-interpolation", enum_color_interpolation, SP_CSS_COLOR_INTERPOLATION_SRGB), color_interpolation_filters("color-interpolation-filters", enum_color_interpolation, SP_CSS_COLOR_INTERPOLATION_LINEARRGB), + // Solid color properties + solid_color( "solid-color" ), // SPIColor + solid_opacity( "solid-opacity", SP_SCALE24_MAX ), + // Fill properties fill( "fill" ), // SPIPaint fill_opacity( "fill-opacity", SP_SCALE24_MAX ), @@ -306,6 +310,9 @@ SPStyle::SPStyle(SPDocument *document_in, SPObject *object_in) : _properties.push_back( &color_interpolation ); _properties.push_back( &color_interpolation_filters ); + _properties.push_back( &solid_color ); + _properties.push_back( &solid_opacity ); + _properties.push_back( &fill ); _properties.push_back( &fill_opacity ); _properties.push_back( &fill_rule ); @@ -385,10 +392,14 @@ SPStyle::SPStyle(SPDocument *document_in, SPObject *object_in) : // _propmap.insert( std::make_pair( color_interpolation.name, reinterpret_cast(&SPStyle::color_interpolation ) ) ); // _propmap.insert( std::make_pair( color_interpolation_filters.name, reinterpret_cast(&SPStyle::color_interpolation_filters ) ) ); + // _propmap.insert( std::make_pair( solid_color.name, reinterpret_cast(&SPStyle::solid_color ) ) ); + // _propmap.insert( std::make_pair( solid_opacity.name, reinterpret_cast(&SPStyle::solid_opacity ) ) ); + // _propmap.insert( std::make_pair( fill.name, reinterpret_cast(&SPStyle::fill ) ) ); // _propmap.insert( std::make_pair( fill_opacity.name, reinterpret_cast(&SPStyle::fill_opacity ) ) ); // _propmap.insert( std::make_pair( fill_rule.name, reinterpret_cast(&SPStyle::fill_rule ) ) ); + // _propmap.insert( std::make_pair( stroke.name, reinterpret_cast(&SPStyle::stroke ) ) ); // _propmap.insert( std::make_pair( stroke_width.name, reinterpret_cast(&SPStyle::stroke_width ) ) ); // _propmap.insert( std::make_pair( stroke_linecap.name, reinterpret_cast(&SPStyle::stroke_linecap ) ) ); @@ -779,6 +790,12 @@ SPStyle::readIfUnset( gint id, gchar const *val ) { case SP_PROP_COLOR_RENDERING: color_rendering.readIfUnset( val ); break; + case SP_PROP_SOLID_COLOR: + solid_color.readIfUnset( val ); + break; + case SP_PROP_SOLID_OPACITY: + solid_opacity.readIfUnset( val ); + break; case SP_PROP_FILL: fill.readIfUnset( val ); break; @@ -1546,6 +1563,12 @@ sp_style_unset_property_attrs(SPObject *o) if (style->color_interpolation_filters.set) { repr->setAttribute("color-interpolation-filters", NULL); } + if (style->solid_color.set) { + repr->setAttribute("solid-color", NULL); + } + if (style->solid_opacity.set) { + repr->setAttribute("solid-opacity", NULL); + } if (style->fill.set) { repr->setAttribute("fill", NULL); } -- cgit v1.2.3 From 97a4ef4fd8b0c841a90f3bb29dee13fd96edecb7 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Fri, 1 Aug 2014 11:04:51 +0200 Subject: Rename 'blend-mode' property to 'mix-blend-mode' per CSS spec. (bzr r13485) --- src/style.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/style.cpp') diff --git a/src/style.cpp b/src/style.cpp index f0710e404..abc928d76 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -144,7 +144,7 @@ SPStyle::SPStyle(SPDocument *document_in, SPObject *object_in) : opacity( "opacity", SP_SCALE24_MAX, false ), isolation( "isolation", enum_isolation, SP_CSS_ISOLATION_AUTO ), - blend_mode( "blend_mode", enum_blend_mode, SP_CSS_BLEND_NORMAL ), + mix_blend_mode( "mix-blend-mode", enum_blend_mode, SP_CSS_BLEND_NORMAL ), paint_order(), // SPIPaintOrder @@ -305,7 +305,7 @@ SPStyle::SPStyle(SPDocument *document_in, SPObject *object_in) : _properties.push_back( &opacity ); _properties.push_back( &isolation ); - _properties.push_back( &blend_mode ); + _properties.push_back( &mix_blend_mode ); _properties.push_back( &color_interpolation ); _properties.push_back( &color_interpolation_filters ); @@ -387,7 +387,7 @@ SPStyle::SPStyle(SPDocument *document_in, SPObject *object_in) : // _propmap.insert( std::make_pair( opacity.name, reinterpret_cast(&SPStyle::opacity ) ) ); // _propmap.insert( std::make_pair( isolation.name, reinterpret_cast(&SPStyle::isolation ) ) ); - // _propmap.insert( std::make_pair( blend_mode.name, reinterpret_cast(&SPStyle::blend_mode ) ) ); + // _propmap.insert( std::make_pair( mix_blend_mode.name, reinterpret_cast(&SPStyle::mix_blend_mode ) ) ); // _propmap.insert( std::make_pair( color_interpolation.name, reinterpret_cast(&SPStyle::color_interpolation ) ) ); // _propmap.insert( std::make_pair( color_interpolation_filters.name, reinterpret_cast(&SPStyle::color_interpolation_filters ) ) ); @@ -713,8 +713,8 @@ SPStyle::readIfUnset( gint id, gchar const *val ) { case SP_PROP_ISOLATION: isolation.readIfUnset( val ); break; - case SP_PROP_BLEND_MODE: - blend_mode.readIfUnset( val ); + case SP_PROP_MIX_BLEND_MODE: + mix_blend_mode.readIfUnset( val ); break; /* SVG */ -- cgit v1.2.3