From b03ddc749e112f35a70cc6455ab85319c659f1bb Mon Sep 17 00:00:00 2001 From: dooglus Date: Wed, 30 Jan 2008 13:54:47 +0000 Subject: [PATCH] AkhIL mentioned on IRC that bitmaps weren't working with 'straight onto' blending. It turned out that the clone-and-encapsulate we do to get straight blending to work was failing because clone() needs to know the path to the file that the canvas is stored in to calculate the relative path to the image file, and the optimized copy of the canvas tree didn't have that information. Now it does. git-svn-id: http://svn.voria.com/code@1526 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/target_scanline.cpp | 2 ++ synfig-core/trunk/src/synfig/target_tile.cpp | 3 +++ 2 files changed, 5 insertions(+) diff --git a/synfig-core/trunk/src/synfig/target_scanline.cpp b/synfig-core/trunk/src/synfig/target_scanline.cpp index 23b86b3..4c3ae0b 100644 --- a/synfig-core/trunk/src/synfig/target_scanline.cpp +++ b/synfig-core/trunk/src/synfig/target_scanline.cpp @@ -173,6 +173,7 @@ synfig::Target_Scanline::render(ProgressCallback *cb) #ifdef SYNFIG_OPTIMIZE_LAYER_TREE Canvas::Handle op_canvas(Canvas::create()); + op_canvas->set_file_name(canvas->get_file_name()); optimize_layers(canvas->get_time(), canvas->get_context(), op_canvas); context=op_canvas->get_context(); #else @@ -307,6 +308,7 @@ synfig::Target_Scanline::render(ProgressCallback *cb) #ifdef SYNFIG_OPTIMIZE_LAYER_TREE Canvas::Handle op_canvas(Canvas::create()); + op_canvas->set_file_name(canvas->get_file_name()); optimize_layers(canvas->get_time(), canvas->get_context(), op_canvas); context=op_canvas->get_context(); #else diff --git a/synfig-core/trunk/src/synfig/target_tile.cpp b/synfig-core/trunk/src/synfig/target_tile.cpp index 92665d2..a9b876d 100644 --- a/synfig-core/trunk/src/synfig/target_tile.cpp +++ b/synfig-core/trunk/src/synfig/target_tile.cpp @@ -357,6 +357,7 @@ synfig::Target_Tile::render(ProgressCallback *cb) #ifdef SYNFIG_OPTIMIZE_LAYER_TREE Canvas::Handle op_canvas(Canvas::create()); + op_canvas->set_file_name(canvas->get_file_name()); optimize_layers(canvas->get_time(), canvas->get_context(), op_canvas); context=op_canvas->get_context(); #else @@ -367,6 +368,7 @@ synfig::Target_Tile::render(ProgressCallback *cb) #ifdef SYNFIG_OPTIMIZE_LAYER_TREE Context context; Canvas::Handle op_canvas(Canvas::create()); + op_canvas->set_file_name(canvas->get_file_name()); // Set the time that we wish to render canvas->set_time(t); optimize_layers(canvas->get_time(), canvas->get_context(), op_canvas); @@ -402,6 +404,7 @@ synfig::Target_Tile::render(ProgressCallback *cb) #ifdef SYNFIG_OPTIMIZE_LAYER_TREE Canvas::Handle op_canvas(Canvas::create()); + op_canvas->set_file_name(canvas->get_file_name()); optimize_layers(canvas->get_time(), canvas->get_context(), op_canvas); context=op_canvas->get_context(); #else -- 2.7.4