X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=synfig-core%2Ftrunk%2Fsrc%2Fmodules%2Fexample%2Ffilledrect.cpp;h=32a0d73536f08d9651432134b554209449c9d34c;hb=d5492843531fb8aad372df09f39c2c0ec3f6b27d;hp=57e03ab842006dd6e54ee0a7494b2aa9aebbce2e;hpb=e3f4437fedbdd74aebbf1675723978853dac8a8b;p=synfig.git diff --git a/synfig-core/trunk/src/modules/example/filledrect.cpp b/synfig-core/trunk/src/modules/example/filledrect.cpp index 57e03ab..32a0d73 100644 --- a/synfig-core/trunk/src/modules/example/filledrect.cpp +++ b/synfig-core/trunk/src/modules/example/filledrect.cpp @@ -6,6 +6,7 @@ ** ** \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 @@ -54,7 +55,7 @@ using namespace synfig; SYNFIG_LAYER_INIT(FilledRect); SYNFIG_LAYER_SET_NAME(FilledRect,"rectangle"); SYNFIG_LAYER_SET_LOCAL_NAME(FilledRect,N_("Rectangle")); -SYNFIG_LAYER_SET_CATEGORY(FilledRect,N_("Geometry")); +SYNFIG_LAYER_SET_CATEGORY(FilledRect,N_("Example")); SYNFIG_LAYER_SET_VERSION(FilledRect,"0.1"); SYNFIG_LAYER_SET_CVS_ID(FilledRect,"$Id$"); @@ -82,8 +83,8 @@ FilledRect::set_param(const String & param, const ValueBase &value) IMPORT(color); IMPORT(point1); IMPORT(point2); - IMPORT(feather_x); - IMPORT(feather_y); + IMPORT_PLUS(feather_x, if(feather_x<0)feather_x=0;); + IMPORT_PLUS(feather_y, if(feather_y<0)feather_y=0;); IMPORT(bevel); IMPORT(bevCircle); @@ -331,12 +332,12 @@ FilledRect::accelerated_render(Context context,Surface *surface,int quality, con //the bounds of the rectangle Point p[2] = {point1,point2}; - if((p[0][0] > p[1][0]) ^ wpp < 0) + if((p[0][0] > p[1][0]) ^ (wpp < 0)) { swap(p[0][0],p[1][0]); } - if((p[0][1] > p[1][1]) ^ hpp < 0) + if((p[0][1] > p[1][1]) ^ (hpp < 0)) { swap(p[0][1],p[1][1]); }