X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftags%2Fsynfig_0_61_04%2Fsynfig-core%2Fsrc%2Fsynfig%2Frenddesc.cpp;fp=synfig-core%2Ftags%2Fsynfig_0_61_04%2Fsynfig-core%2Fsrc%2Fsynfig%2Frenddesc.cpp;h=0000000000000000000000000000000000000000;hb=6fa8f2f38d4b0b35f8539bf94e27ae27015c7689;hp=92eeae7c7aa1ffdcacd6c545d4d9e3f641bba77c;hpb=47fce282611fbba1044921d22ca887f9b53ad91a;p=synfig.git diff --git a/synfig-core/tags/synfig_0_61_04/synfig-core/src/synfig/renddesc.cpp b/synfig-core/tags/synfig_0_61_04/synfig-core/src/synfig/renddesc.cpp deleted file mode 100644 index 92eeae7..0000000 --- a/synfig-core/tags/synfig_0_61_04/synfig-core/src/synfig/renddesc.cpp +++ /dev/null @@ -1,559 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file renddesc.h_ -** \brief RendDesc -** -** $Id: renddesc.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $ -** -** \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 ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "renddesc.h" -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === M E T H O D S ======================================================= */ - -RendDesc & -RendDesc::apply(const RendDesc &x) -{ - operator=(x); - return *this; -} - -const Color & -RendDesc::get_bg_color()const -{ - return background; -} - -RendDesc & -RendDesc::set_bg_color(const Color &bg) -{ - background=bg; return *this; -} - -Real -RendDesc::get_physical_w()const -{ - return (Real)get_w()/get_x_res(); -} - -Real -RendDesc::get_physical_h()const -{ - return (Real)get_h()/get_y_res(); -} - -RendDesc& -RendDesc::set_physical_w(Real w) -{ - set_w(round_to_int(w*get_x_res())); - return *this; -} - -RendDesc& -RendDesc::set_physical_h(Real h) -{ - set_h(round_to_int(h*get_y_res())); - return *this; -} - -int -RendDesc::get_w()const -{ - return w_; -} - -RendDesc & -RendDesc::set_w(int x) -{ - if(FLAGS(flags,LINK_PX_ASPECT)) - { - h_=h_*x/w_; - w_=x; - } - else if(FLAGS(flags,LINK_PX_AREA)) - { - //! \writeme - w_=x; - } - else if(FLAGS(flags,PX_ASPECT)) - { - Vector d=br_-tl_; - float old_span=get_span(); - - // If we should preserve image width - if( FLAGS(flags,IM_W) - || (FLAGS(flags,IM_ZOOMIN) && d[1]>d[1]/x*w_) - || (FLAGS(flags,IM_ZOOMOUT) && d[1]d[0]/y*h_) - || (FLAGS(flags,IM_ZOOMOUT) && d[0]time_end) - time_begin=time_end=x; - else - time_begin=x; - return *this; -} - - -const Time -RendDesc::get_time_end()const -{ - return time_end; -} - -RendDesc & -RendDesc::set_time_end(Time x) -{ - if(x