[GRASS-SVN] r68945 - in grass/trunk/display/d.northarrow: . thumbnails
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jul 11 13:48:48 PDT 2016
Author: neteler
Date: 2016-07-11 13:48:47 -0700 (Mon, 11 Jul 2016)
New Revision: 68945
Added:
grass/trunk/display/d.northarrow/thumbnails/
grass/trunk/display/d.northarrow/thumbnails/README
grass/trunk/display/d.northarrow/thumbnails/n_arrow_1a.png
grass/trunk/display/d.northarrow/thumbnails/n_arrow_1b.png
grass/trunk/display/d.northarrow/thumbnails/n_arrow_2.png
grass/trunk/display/d.northarrow/thumbnails/n_arrow_3.png
grass/trunk/display/d.northarrow/thumbnails/n_arrow_4.png
grass/trunk/display/d.northarrow/thumbnails/n_arrow_5.png
grass/trunk/display/d.northarrow/thumbnails/n_arrow_6.png
grass/trunk/display/d.northarrow/thumbnails/n_arrow_7a.png
grass/trunk/display/d.northarrow/thumbnails/n_arrow_7b.png
grass/trunk/display/d.northarrow/thumbnails/n_arrow_8a.png
grass/trunk/display/d.northarrow/thumbnails/n_arrow_8b.png
grass/trunk/display/d.northarrow/thumbnails/n_arrow_9.png
grass/trunk/display/d.northarrow/thumbnails/n_arrow_basic_compass.png
grass/trunk/display/d.northarrow/thumbnails/n_arrow_fancy_compass.png
Modified:
grass/trunk/display/d.northarrow/Makefile
Log:
d.northarrow: thumbnails added (trac #3032)
Modified: grass/trunk/display/d.northarrow/Makefile
===================================================================
--- grass/trunk/display/d.northarrow/Makefile 2016-07-11 18:52:07 UTC (rev 68944)
+++ grass/trunk/display/d.northarrow/Makefile 2016-07-11 20:48:47 UTC (rev 68945)
@@ -7,4 +7,14 @@
include $(MODULE_TOPDIR)/include/Make/Module.make
-default: cmd
+# thumbnail previews
+IMGSRC := $(wildcard thumbnails/*.png)
+IMGDST := $(patsubst thumbnails/%,$(HTMLDIR)/northarrows/%,$(IMGSRC))
+
+default: cmd $(IMGDST)
+
+$(HTMLDIR)/northarrows/%.png: thumbnails/%.png | $(HTMLDIR)/northarrows
+ $(INSTALL_DATA) $< $@
+
+$(HTMLDIR)/northarrows: $(HTMLDIR)
+ $(MKDIR) $@
Added: grass/trunk/display/d.northarrow/thumbnails/README
===================================================================
--- grass/trunk/display/d.northarrow/thumbnails/README (rev 0)
+++ grass/trunk/display/d.northarrow/thumbnails/README 2016-07-11 20:48:47 UTC (rev 68945)
@@ -0,0 +1,23 @@
+#How to generate new scale bar thumbnail
+#=======================================
+#Expects North Carolina dataset. The thumbnail height should be 24 px.
+#
+
+export GRASS_RENDER_IMMEDIATE=png
+export GRASS_RENDER_TRUECOLOR=TRUE
+export GRASS_RENDER_WIDTH=300
+export GRASS_RENDER_HEIGHT=300
+g.region raster=elevation
+
+for STYLE in 1a 1b 2 3 4 5 6 7a 7b 8a 8b 9 fancy_compass basic_compass
+do
+ echo ${STYLE}
+ export GRASS_RENDER_FILE=n_arrow_${STYLE}.png
+ d.northarrow style=${STYLE} at=20,20
+ mogrify -trim n_arrow_${STYLE}.png
+ identify -format "%[fx:w]x%[fx:h]" n_arrow_${STYLE}.png
+# convert n_arrow_${STYLE}.png -gravity center -background white -extent 170x24 n_arrow_${STYLE}.png
+ convert n_arrow_${STYLE}.png -gravity center -background white n_arrow_${STYLE}.png
+ optipng -o5 n_arrow_${STYLE}.png n_arrow_${STYLE}.png --quiet
+done
+
Property changes on: grass/trunk/display/d.northarrow/thumbnails/README
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Author Date Id
Added: svn:eol-style
+ native
Added: grass/trunk/display/d.northarrow/thumbnails/n_arrow_1a.png
===================================================================
(Binary files differ)
Property changes on: grass/trunk/display/d.northarrow/thumbnails/n_arrow_1a.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: grass/trunk/display/d.northarrow/thumbnails/n_arrow_1b.png
===================================================================
(Binary files differ)
Property changes on: grass/trunk/display/d.northarrow/thumbnails/n_arrow_1b.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: grass/trunk/display/d.northarrow/thumbnails/n_arrow_2.png
===================================================================
(Binary files differ)
Property changes on: grass/trunk/display/d.northarrow/thumbnails/n_arrow_2.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: grass/trunk/display/d.northarrow/thumbnails/n_arrow_3.png
===================================================================
(Binary files differ)
Property changes on: grass/trunk/display/d.northarrow/thumbnails/n_arrow_3.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: grass/trunk/display/d.northarrow/thumbnails/n_arrow_4.png
===================================================================
(Binary files differ)
Property changes on: grass/trunk/display/d.northarrow/thumbnails/n_arrow_4.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: grass/trunk/display/d.northarrow/thumbnails/n_arrow_5.png
===================================================================
(Binary files differ)
Property changes on: grass/trunk/display/d.northarrow/thumbnails/n_arrow_5.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: grass/trunk/display/d.northarrow/thumbnails/n_arrow_6.png
===================================================================
(Binary files differ)
Property changes on: grass/trunk/display/d.northarrow/thumbnails/n_arrow_6.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: grass/trunk/display/d.northarrow/thumbnails/n_arrow_7a.png
===================================================================
(Binary files differ)
Property changes on: grass/trunk/display/d.northarrow/thumbnails/n_arrow_7a.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: grass/trunk/display/d.northarrow/thumbnails/n_arrow_7b.png
===================================================================
(Binary files differ)
Property changes on: grass/trunk/display/d.northarrow/thumbnails/n_arrow_7b.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: grass/trunk/display/d.northarrow/thumbnails/n_arrow_8a.png
===================================================================
(Binary files differ)
Property changes on: grass/trunk/display/d.northarrow/thumbnails/n_arrow_8a.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: grass/trunk/display/d.northarrow/thumbnails/n_arrow_8b.png
===================================================================
(Binary files differ)
Property changes on: grass/trunk/display/d.northarrow/thumbnails/n_arrow_8b.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: grass/trunk/display/d.northarrow/thumbnails/n_arrow_9.png
===================================================================
(Binary files differ)
Property changes on: grass/trunk/display/d.northarrow/thumbnails/n_arrow_9.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: grass/trunk/display/d.northarrow/thumbnails/n_arrow_basic_compass.png
===================================================================
(Binary files differ)
Property changes on: grass/trunk/display/d.northarrow/thumbnails/n_arrow_basic_compass.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: grass/trunk/display/d.northarrow/thumbnails/n_arrow_fancy_compass.png
===================================================================
(Binary files differ)
Property changes on: grass/trunk/display/d.northarrow/thumbnails/n_arrow_fancy_compass.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
More information about the grass-commit
mailing list