X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftags%2Fsynfig_0_61_07_rc1%2Fsrc%2Fsynfig%2Ftarget.cpp;fp=synfig-core%2Ftags%2Fsynfig_0_61_07_rc1%2Fsrc%2Fsynfig%2Ftarget.cpp;h=0000000000000000000000000000000000000000;hb=3a6643238c67c043fc3592837a05d6d2861967f1;hp=a6c75a940c2364c676cb565f0f6c185c0206015e;hpb=47fce282611fbba1044921d22ca887f9b53ad91a;p=synfig.git diff --git a/synfig-core/tags/synfig_0_61_07_rc1/src/synfig/target.cpp b/synfig-core/tags/synfig_0_61_07_rc1/src/synfig/target.cpp deleted file mode 100644 index a6c75a9..0000000 --- a/synfig-core/tags/synfig_0_61_07_rc1/src/synfig/target.cpp +++ /dev/null @@ -1,113 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file target.cpp -** \brief Target Class Implementation -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** 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. -** -** 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 -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_NO_ANGLE - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "target.h" -#include "string.h" -#include "canvas.h" -#include "target_null.h" -#include "target_null_tile.h" - -using namespace synfig; -using namespace etl; -using namespace std; - -synfig::Target::Book* synfig::Target::book_; -synfig::Target::ExtBook* synfig::Target::ext_book_; - -static synfig::Gamma* default_gamma_; - -/* === P R O C E D U R E S ================================================= */ - -bool -Target::subsys_init() -{ - book_=new synfig::Target::Book(); - ext_book_=new synfig::Target::ExtBook(); - - default_gamma_=new synfig::Gamma(1.0/2.2); - //default_gamma_->set_black_level(0.05); // Default to 5% black level. - - book()["null"]=std::pair(Target_Null::create,"null"); - ext_book()["null"]="null"; - book()["null-tile"]=std::pair(Target_Null_Tile::create,"null-tile"); - ext_book()["null-tile"]="null-tile"; - - return true; -} - -bool -Target::subsys_stop() -{ - delete book_; - delete ext_book_; - delete default_gamma_; - return true; -} - -Target::Book& -Target::book() -{ - return *book_; -} - -Target::ExtBook& -Target::ext_book() -{ - return *ext_book_; -} - - -/* === M E T H O D S ======================================================= */ - -Target::Target(): - quality_(4), - gamma_(*default_gamma_), - remove_alpha(false), - avoid_time_sync_(false) -{ -} - -void -synfig::Target::set_canvas(Canvas::Handle c) -{ - canvas=c; - RendDesc desc=canvas->rend_desc(); - set_rend_desc(&desc); -} - - -Target::Handle -Target::create(const String &name, const String &filename) -{ - if(!book().count(name)) - return handle(); - - return Target::Handle(book()[name].first(filename.c_str())); -}