From 5f7270118adc2dfb2ee86d869e2de55d91b557e5 Mon Sep 17 00:00:00 2001 From: dooglus Date: Thu, 24 Jan 2008 17:20:29 +0000 Subject: [PATCH] I missed a few layers that can be used with the 'transparent + straight blend' trick in the last commit. That should be all now. git-svn-id: http://svn.voria.com/code@1458 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/modules/lyr_freetype/lyr_freetype.cpp | 4 +++- synfig-core/trunk/src/modules/lyr_std/shade.cpp | 4 +++- synfig-core/trunk/src/modules/mod_geometry/checkerboard.cpp | 4 +++- synfig-core/trunk/src/synfig/layer_solidcolor.cpp | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/synfig-core/trunk/src/modules/lyr_freetype/lyr_freetype.cpp b/synfig-core/trunk/src/modules/lyr_freetype/lyr_freetype.cpp index c301840..b721476 100644 --- a/synfig-core/trunk/src/modules/lyr_freetype/lyr_freetype.cpp +++ b/synfig-core/trunk/src/modules/lyr_freetype/lyr_freetype.cpp @@ -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); diff --git a/synfig-core/trunk/src/modules/lyr_std/shade.cpp b/synfig-core/trunk/src/modules/lyr_std/shade.cpp index 5fc7b2c..5c5b129 100644 --- a/synfig-core/trunk/src/modules/lyr_std/shade.cpp +++ b/synfig-core/trunk/src/modules/lyr_std/shade.cpp @@ -90,7 +90,9 @@ Layer_Shade::set_param(const String ¶m, 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); diff --git a/synfig-core/trunk/src/modules/mod_geometry/checkerboard.cpp b/synfig-core/trunk/src/modules/mod_geometry/checkerboard.cpp index c90ae9c..ad79c1d 100644 --- a/synfig-core/trunk/src/modules/mod_geometry/checkerboard.cpp +++ b/synfig-core/trunk/src/modules/mod_geometry/checkerboard.cpp @@ -87,7 +87,9 @@ CheckerBoard::point_test(const synfig::Point& getpos)const bool CheckerBoard::set_param(const String ¶m, 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]); diff --git a/synfig-core/trunk/src/synfig/layer_solidcolor.cpp b/synfig-core/trunk/src/synfig/layer_solidcolor.cpp index d10c5c7..1d3ee76 100644 --- a/synfig-core/trunk/src/synfig/layer_solidcolor.cpp +++ b/synfig-core/trunk/src/synfig/layer_solidcolor.cpp @@ -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); } -- 2.7.4