I missed a few layers that can be used with the 'transparent + straight blend' trick...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Thu, 24 Jan 2008 17:20:29 +0000 (17:20 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Thu, 24 Jan 2008 17:20:29 +0000 (17:20 +0000)
git-svn-id: http://svn.voria.com/code@1458 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/modules/lyr_freetype/lyr_freetype.cpp
synfig-core/trunk/src/modules/lyr_std/shade.cpp
synfig-core/trunk/src/modules/mod_geometry/checkerboard.cpp
synfig-core/trunk/src/synfig/layer_solidcolor.cpp

index c301840..b721476 100644 (file)
@@ -463,7 +463,9 @@ Layer_Freetype::set_param(const String & param, const ValueBase &value)
        IMPORT_PLUS(size, if(old_version){size/=2.0;} needs_sync_=true );
        IMPORT_PLUS(text,needs_sync_=true);
        IMPORT_PLUS(pos,needs_sync_=true);
-       IMPORT(color);
+       IMPORT_PLUS(color, { if (color.get_a() == 0) if (converted_blend_) {
+                                       set_blend_method(Color::BLEND_ALPHA_OVER);
+                                       color.set_a(1); } else transparent_color_ = true; });
        IMPORT(invert);
        IMPORT_PLUS(orient,needs_sync_=true);
        IMPORT_PLUS(compress,needs_sync_=true);
index 5fc7b2c..5c5b129 100644 (file)
@@ -90,7 +90,9 @@ Layer_Shade::set_param(const String &param, const ValueBase &value)
 {
        IMPORT_PLUS(size,clamp(size));
        IMPORT(type);
-       IMPORT(color);
+       IMPORT_PLUS(color, { if (color.get_a() == 0) if (converted_blend_) {
+                                       set_blend_method(Color::BLEND_ALPHA_OVER);
+                                       color.set_a(1); } else transparent_color_ = true; });
        IMPORT(offset);
        IMPORT(invert);
 
index c90ae9c..ad79c1d 100644 (file)
@@ -87,7 +87,9 @@ CheckerBoard::point_test(const synfig::Point& getpos)const
 bool
 CheckerBoard::set_param(const String &param, const ValueBase &value)
 {
-       IMPORT(color);
+       IMPORT_PLUS(color, { if (color.get_a() == 0) if (converted_blend_) {
+                                       set_blend_method(Color::BLEND_ALPHA_OVER);
+                                       color.set_a(1); } else transparent_color_ = true; });
        IMPORT(pos);
        IMPORT(pos[0]);
        IMPORT(pos[1]);
index d10c5c7..1d3ee76 100644 (file)
@@ -72,7 +72,9 @@ Layer_SolidColor::Layer_SolidColor():
 bool
 Layer_SolidColor::set_param(const String & param, const ValueBase &value)
 {
-       IMPORT(color);
+       IMPORT_PLUS(color, { if (color.get_a() == 0) if (converted_blend_) {
+                                       set_blend_method(Color::BLEND_ALPHA_OVER);
+                                       color.set_a(1); } else transparent_color_ = true; });
 
        return Layer_Composite::set_param(param,value);
 }