X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Frenddesc.cpp;h=b1b28326c349e1a60b139de0f0cc57b095f3a85f;hb=fe852ad9c0a418d34cc1356b30c6fb146d189ad9;hp=94dc16d18587f4c93adad07fe520bd2211031ce8;hpb=28f28705612902c15cd0702cc891fba35bf2d2df;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/renddesc.cpp b/synfig-core/trunk/src/synfig/renddesc.cpp index 94dc16d..b1b2832 100644 --- a/synfig-core/trunk/src/synfig/renddesc.cpp +++ b/synfig-core/trunk/src/synfig/renddesc.cpp @@ -1,20 +1,21 @@ /* === S Y N F I G ========================================================= */ -/*! \file renddesc.h_ +/*! \file synfig/renddesc.cpp ** \brief RendDesc ** -** $Id: renddesc.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $ +** $Id$ ** ** \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 */ /* ========================================================================= */ @@ -338,7 +339,7 @@ RendDesc::get_interlaced()const RendDesc & RendDesc::set_interlaced(bool x) -{ interlaced=x; return *this; } +{ interlaced=x; return *this; } //! Return the status of the clamp flag const bool & @@ -348,7 +349,7 @@ RendDesc::get_clamp()const //! Set the clamp flag RendDesc & RendDesc::set_clamp(bool x) -{ clamp=x; return *this; } +{ clamp=x; return *this; } //! Set constraint flags RendDesc & @@ -450,7 +451,7 @@ RendDesc::set_span(const Real &x) /* const Gamma & RendDesc::get_gamma()const -{ return gamma; } +{ return gamma; } RendDesc & RendDesc::set_gamma(const Gamma &x) @@ -482,18 +483,18 @@ RendDesc::set_tl(const Point &x) Vector new_size(x-br_); new_size[0]=abs(new_size[0]); new_size[1]=abs(new_size[1]); - + Vector old_size(tl_-br_); old_size[0]=abs(old_size[0]); old_size[1]=abs(old_size[1]); - + if(new_size[0]!=old_size[0]) w_=round_to_int(new_size[0]*w_/old_size[0]); - + if(new_size[1]!=old_size[1]) h_=round_to_int(new_size[1]*h_/old_size[1]); } - + tl_=x; return *this; } @@ -505,14 +506,14 @@ RendDesc::set_br(const Point &x) Vector new_size(x-tl_); new_size[0]=abs(new_size[0]); new_size[1]=abs(new_size[1]); - + Vector old_size(tl_-br_); old_size[0]=abs(old_size[0]); old_size[1]=abs(old_size[1]); - + if(new_size[0]!=old_size[0]) w_=round_to_int(new_size[0]*w_/old_size[0]); - + if(new_size[1]!=old_size[1]) h_=round_to_int(new_size[1]*h_/old_size[1]); } @@ -544,7 +545,7 @@ RendDesc::set_subwindow(int x, int y, int w, int h) { const Real pw(get_pw()); const Real ph(get_ph()); - + tl_[0]+=pw*x; tl_[1]+=ph*y; @@ -553,6 +554,6 @@ RendDesc::set_subwindow(int x, int y, int w, int h) w_=w; h_=h; - + return *this; }