X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fmodules%2Flyr_std%2Frotate.cpp;h=a17a8546ee7b80c9d269e87d56cfd9e44f9adfdd;hb=756c0d29ac1742f231e6615f9a577e574e35a4af;hp=932a3d408668c9ca945cbeb9daca34726f8ab921;hpb=5ddcf36f04cfbd10fabda4e3c5633cb27cdd4c0a;p=synfig.git diff --git a/synfig-core/trunk/src/modules/lyr_std/rotate.cpp b/synfig-core/trunk/src/modules/lyr_std/rotate.cpp index 932a3d4..a17a854 100644 --- a/synfig-core/trunk/src/modules/lyr_std/rotate.cpp +++ b/synfig-core/trunk/src/modules/lyr_std/rotate.cpp @@ -1,9 +1,12 @@ -/*! ======================================================================== -** Synfig -** Template File -** $Id: rotate.cpp,v 1.2 2005/01/24 05:00:18 darco Exp $ +/* === S Y N F I G ========================================================= */ +/*! \file rotate.cpp +** \brief Implementation of the "Rotate" layer ** +** $Id$ +** +** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -14,6 +17,7 @@ ** 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 ** ** === N O T E S =========================================================== ** @@ -48,10 +52,10 @@ SYNFIG_LAYER_INIT(Rotate); SYNFIG_LAYER_SET_NAME(Rotate,"rotate"); -SYNFIG_LAYER_SET_LOCAL_NAME(Rotate,_("Rotate")); -SYNFIG_LAYER_SET_CATEGORY(Rotate,_("Transform")); +SYNFIG_LAYER_SET_LOCAL_NAME(Rotate,N_("Rotate")); +SYNFIG_LAYER_SET_CATEGORY(Rotate,N_("Transform")); SYNFIG_LAYER_SET_VERSION(Rotate,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(Rotate,"$Id: rotate.cpp,v 1.2 2005/01/24 05:00:18 darco Exp $"); +SYNFIG_LAYER_SET_CVS_ID(Rotate,"$Id$"); /* === P R O C E D U R E S ================================================= */ @@ -76,7 +80,7 @@ Rotate::set_param(const String & param, const ValueBase &value) { IMPORT(origin); - if(param=="amount" && value.same_as(amount)) + if(param=="amount" && value.same_type_as(amount)) { amount=value.get(amount); sin_val=Angle::sin(amount).get(); @@ -253,7 +257,7 @@ Rotate::accelerated_render(Context context,Surface *surface,int quality, const R tmp=Point(cos_val*(point[0]-origin[0])+sin_val*(point[1]-origin[1]),-sin_val*(point[0]-origin[0])+cos_val*(point[1]-origin[1])) +origin; (*surface)[y][x]=source.cubic_sample((tmp[0]-tl[0])*pw,(tmp[1]-tl[1])*ph); } - if(y&31==0 && cb) + if((y&31)==0 && cb) { if(!stagetwo.amount_complete(y,surface->get_h())) return false; @@ -273,7 +277,7 @@ Rotate::accelerated_render(Context context,Surface *surface,int quality, const R tmp=Point(cos_val*(point[0]-origin[0])+sin_val*(point[1]-origin[1]),-sin_val*(point[0]-origin[0])+cos_val*(point[1]-origin[1])) +origin; (*surface)[y][x]=source.linear_sample((tmp[0]-tl[0])*pw,(tmp[1]-tl[1])*ph); } - if(y&31==0 && cb) + if((y&31)==0 && cb) { if(!stagetwo.amount_complete(y,surface->get_h())) return false; @@ -303,7 +307,7 @@ Rotate::accelerated_render(Context context,Surface *surface,int quality, const R //pen.set_value(source[v][u]); (*surface)[y][x]=source[v][u]; } - if(y&31==0 && cb) + if((y&31)==0 && cb) { if(!stagetwo.amount_complete(y,surface->get_h())) return false;