X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Frenddesc.cpp;h=9a498b176d841640e2abe0d4465a57565ed573d2;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=0973b81957997688176b99ec59cf061856cd808a;hpb=e3acc0b267b14fda5db3c7bbb2f218b993ef84b3;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/renddesc.cpp b/synfig-core/trunk/src/synfig/renddesc.cpp index 0973b81..9a498b1 100644 --- a/synfig-core/trunk/src/synfig/renddesc.cpp +++ b/synfig-core/trunk/src/synfig/renddesc.cpp @@ -1,20 +1,22 @@ -/* === S I N F G =========================================================== */ -/*! \file renddesc.h_ +/* === S Y N F I G ========================================================= */ +/*! \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 +** Copyright (c) 2008 Chris Moore ** -** 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 */ /* ========================================================================= */ @@ -37,10 +39,13 @@ using namespace std; using namespace etl; -using namespace sinfg; +using namespace synfig; /* === M A C R O S ========================================================= */ +#undef FLAGS +#define FLAGS(x,y) (((x)&(y))==(y)) + /* === G L O B A L S ======================================================= */ /* === M E T H O D S ======================================================= */ @@ -99,25 +104,25 @@ RendDesc::get_w()const RendDesc & RendDesc::set_w(int x) { - if(FLAGS(flags,LINK_PX_ASPECT)) + if(FLAGS(flags,LINK_PX_ASPECT)) // never set { h_=h_*x/w_; w_=x; } - else if(FLAGS(flags,LINK_PX_AREA)) + else if(FLAGS(flags,LINK_PX_AREA)) // never set { //! \writeme w_=x; } - else if(FLAGS(flags,PX_ASPECT)) + else if(FLAGS(flags,PX_ASPECT)) // "Pixel 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[1]/x*w_) // never set + || (FLAGS(flags,IM_ZOOMOUT) && d[1]d[0]/y*h_) - || (FLAGS(flags,IM_ZOOMOUT) && d[0]d[0]/y*h_) // never set + || (FLAGS(flags,IM_ZOOMOUT) && d[0]