X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Ftarget_scanline.cpp;h=fe5f2a5dc342b8db266794358b15e0006424d9d7;hb=985b702e65d627cc512e0e87a4030f5f424eb1e4;hp=e1cea2d6f0926c7aacfe3abcbf2117889a769329;hpb=e3acc0b267b14fda5db3c7bbb2f218b993ef84b3;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/target_scanline.cpp b/synfig-core/trunk/src/synfig/target_scanline.cpp index e1cea2d..fe5f2a5 100644 --- a/synfig-core/trunk/src/synfig/target_scanline.cpp +++ b/synfig-core/trunk/src/synfig/target_scanline.cpp @@ -1,20 +1,21 @@ -/* === S I N F G =========================================================== */ +/* === S Y N F I G ========================================================= */ /*! \file target_scanline.cpp ** \brief Template File ** ** $Id: target_scanline.cpp,v 1.1.1.1 2005/01/04 01:23:15 darco Exp $ ** ** \legal -** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** -** This software and associated documentation -** are CONFIDENTIAL and PROPRIETARY property of -** the above-mentioned copyright holder. +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. ** -** You may not copy, print, publish, or in any -** other way distribute this software without -** a prior written agreement with -** the copyright holder. +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. ** \endlegal */ /* ========================================================================= */ @@ -41,15 +42,15 @@ using namespace std; using namespace etl; -using namespace sinfg; +using namespace synfig; /* === M A C R O S ========================================================= */ -#define SINFG_OPTIMIZE_LAYER_TREE 1 +#define SYNFIG_OPTIMIZE_LAYER_TREE 1 #define PIXEL_RENDERING_LIMIT 1500000 -#define USE_PIXELRENDERING_LIMIT 0 +#define USE_PIXELRENDERING_LIMIT 1 /* === G L O B A L S ======================================================= */ @@ -96,17 +97,17 @@ Target_Scanline::next_frame(Time& time) time=(time_end-time_start)*curr_frame_/total_frames+time_start; curr_frame_++; -/* sinfg::info("curr_frame_: %d",curr_frame_); - sinfg::info("total_frames: %d",total_frames); - sinfg::info("time_end: %s",time_end.get_string().c_str()); - sinfg::info("time_start: %s",time_start.get_string().c_str()); +/* synfig::info("curr_frame_: %d",curr_frame_); + synfig::info("total_frames: %d",total_frames); + synfig::info("time_end: %s",time_end.get_string().c_str()); + synfig::info("time_start: %s",time_start.get_string().c_str()); */ -// sinfg::info("time: %s",time.get_string().c_str()); +// synfig::info("time: %s",time.get_string().c_str()); return total_frames- curr_frame_+1; } bool -sinfg::Target_Scanline::render(ProgressCallback *cb) +synfig::Target_Scanline::render(ProgressCallback *cb) { SuperCallback super_cb; int @@ -146,7 +147,7 @@ sinfg::Target_Scanline::render(ProgressCallback *cb) // Grab the time int i=next_frame(t); - //sinfg::info("1time_set_to %s",t.get_string().c_str()); + //synfig::info("1time_set_to %s",t.get_string().c_str()); if(i>1) do{ @@ -167,7 +168,7 @@ sinfg::Target_Scanline::render(ProgressCallback *cb) Context context; - #ifdef SINFG_OPTIMIZE_LAYER_TREE + #ifdef SYNFIG_OPTIMIZE_LAYER_TREE Canvas::Handle op_canvas(Canvas::create()); optimize_layers(canvas->get_context(), op_canvas); context=op_canvas->get_context(); @@ -181,12 +182,12 @@ sinfg::Target_Scanline::render(ProgressCallback *cb) { if(threads_<=0) { - if(!sinfg::render(context,this,desc,0)) + if(!synfig::render(context,this,desc,0)) return false; } else { - if(!sinfg::render_threaded(context,this,desc,0,threads_)) + if(!synfig::render_threaded(context,this,desc,0,threads_)) return false; } } @@ -195,7 +196,7 @@ sinfg::Target_Scanline::render(ProgressCallback *cb) #if USE_PIXELRENDERING_LIMIT if(desc.get_w()*desc.get_h() > PIXEL_RENDERING_LIMIT) { - sinfg::info("Render BROKEN UP! (%d pixels)", desc.get_w()*desc.get_h()); + synfig::info("Render BROKEN UP! (%d pixels)", desc.get_w()*desc.get_h()); Surface surface; int rowheight = PIXEL_RENDERING_LIMIT/desc.get_w(); @@ -204,7 +205,7 @@ sinfg::Target_Scanline::render(ProgressCallback *cb) rows++; - sinfg::info("\t blockh=%d,remh=%d,totrows=%d", rowheight,lastrowheight,rows); + synfig::info("\t blockh=%d,remh=%d,totrows=%d", rowheight,lastrowheight,rows); // loop through all the full rows if(!start_frame()) @@ -301,7 +302,7 @@ sinfg::Target_Scanline::render(ProgressCallback *cb) canvas->set_time(t); Context context; - #ifdef SINFG_OPTIMIZE_LAYER_TREE + #ifdef SYNFIG_OPTIMIZE_LAYER_TREE Canvas::Handle op_canvas(Canvas::create()); optimize_layers(canvas->get_context(), op_canvas); context=op_canvas->get_context(); @@ -315,12 +316,12 @@ sinfg::Target_Scanline::render(ProgressCallback *cb) { if(threads_<=0) { - if(!sinfg::render(context,this,desc,cb)) + if(!synfig::render(context,this,desc,cb)) return false; } else { - if(!sinfg::render_threaded(context,this,desc,cb,threads_)) + if(!synfig::render_threaded(context,this,desc,cb,threads_)) return false; } } @@ -329,7 +330,7 @@ sinfg::Target_Scanline::render(ProgressCallback *cb) #if USE_PIXELRENDERING_LIMIT if(desc.get_w()*desc.get_h() > PIXEL_RENDERING_LIMIT) { - sinfg::info("Render BROKEN UP! (%d pixels)", desc.get_w()*desc.get_h()); + synfig::info("Render BROKEN UP! (%d pixels)", desc.get_w()*desc.get_h()); Surface surface; int totalheight = desc.get_h(); @@ -339,7 +340,7 @@ sinfg::Target_Scanline::render(ProgressCallback *cb) rows++; - sinfg::info("\t blockh=%d,remh=%d,totrows=%d", rowheight,lastrowheight,rows); + synfig::info("\t blockh=%d,remh=%d,totrows=%d", rowheight,lastrowheight,rows); // loop through all the full rows if(!start_frame())