[GRASS-SVN] r52394 - grass/branches/releasebranch_6_4/scripts/d.rast.leg

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jul 17 07:48:26 PDT 2012


Author: neteler
Date: 2012-07-17 07:48:25 -0700 (Tue, 17 Jul 2012)
New Revision: 52394

Modified:
   grass/branches/releasebranch_6_4/scripts/d.rast.leg/d.rast.leg
Log:
propagate -s flag from d.legend

Modified: grass/branches/releasebranch_6_4/scripts/d.rast.leg/d.rast.leg
===================================================================
--- grass/branches/releasebranch_6_4/scripts/d.rast.leg/d.rast.leg	2012-07-17 08:38:37 UTC (rev 52393)
+++ grass/branches/releasebranch_6_4/scripts/d.rast.leg/d.rast.leg	2012-07-17 14:48:25 UTC (rev 52394)
@@ -47,6 +47,10 @@
 #%  key: n
 #%  description: Omit entries with missing label
 #%end
+#%flag
+#%  key: s
+#%  description: Draw smooth gradient
+#%end
 #%option
 #% key: map
 #% type: string
@@ -100,6 +104,12 @@
   FLIP="-f"
 fi
 
+if [ $GIS_FLAG_S -eq 1 ] ; then
+  SMOOTH="-s"
+else
+  SMOOTH=""
+fi
+
 if [ ! -z "$GIS_OPT_TITLE" ] ; then
    MAPNAME="$GIS_OPT_TITLE"
 else
@@ -158,16 +168,16 @@
 	if [ -z "$GIS_OPT_RAST" ] ; then
 		g.message -d "No lines; own legend"
 		if test -f $HISTFILEDIR/$GIS_OPT_MAP/histogram ; then
-	  	     d.legend $FLIP -n map="$GIS_OPT_MAP" $LEG_AT
+	  	     d.legend $FLIP $SMOOTH -n map="$GIS_OPT_MAP" $LEG_AT
         	else
-	             d.legend $FLIP $OMIT map="$GIS_OPT_MAP" $LEG_AT
+	             d.legend $FLIP $SMOOTH $OMIT map="$GIS_OPT_MAP" $LEG_AT
         	fi
 	else
 		g.message -d "No lines; external legend"
 		if test -f $HISTFILEDIR/$GIS_OPT_RAST/histogram ; then
-		     d.legend $FLIP -n map="$GIS_OPT_RAST" $LEG_AT
+		     d.legend $FLIP $SMOOTH -n map="$GIS_OPT_RAST" $LEG_AT
 		else
-		     d.legend $FLIP $OMIT map="$GIS_OPT_RAST" $LEG_AT
+		     d.legend $FLIP $SMOOTH $OMIT map="$GIS_OPT_RAST" $LEG_AT
 		fi
 	fi
 



More information about the grass-commit mailing list