[gimp/ell/blending-mode-icons: 7/9] icons: auto-generate blending mode icons for the Color theme



commit a5616c3b310f89cbd9e4e00748b4224b010fac3b
Author: Ell <ell_se yahoo com>
Date:   Sun Jan 1 16:18:28 2017 -0500

    icons: auto-generate blending mode icons for the Color theme

 icons/Color/Makefile.am |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/icons/Color/Makefile.am b/icons/Color/Makefile.am
index c6c4480..da11cb1 100644
--- a/icons/Color/Makefile.am
+++ b/icons/Color/Makefile.am
@@ -15,6 +15,27 @@ include $(top_srcdir)/icons/icon-list.mk
 #      SVG=`$(top_srcdir)/tools/extract-vector-icon.sh $< $*` && \
 #      echo $${SVG} > $@
 
+# The blending mode icons are auto-generated from the Symbolic icons, by
+# overlaying a white version of the corresponding symbolic icon on top of the
+# blending-mode icon backdrop (gimp-mode-backdrop.{svg,png} in this theme).
+MAKE_SVG_ICON = \
+       mkdir -p `dirname $@` && \
+       (sed -r '/<\/metadata>/,$s/#[0-9a-f]{6}\b/#ffffff/gi;/<\/svg>/Q' $< && \
+        sed -r '1,/<\/metadata>/d' `dirname $< | sed 's/\bSymbolic\b/Color/'`/gimp-mode-backdrop.svg) > $@
+
+scalable/gimp-%-mode.svg: ../Symbolic/scalable/gimp-%-mode.svg scalable/gimp-mode-backdrop.svg
+       $(MAKE_SVG_ICON)
+
+MAKE_ICON = \
+       mkdir -p `dirname $@` && \
+       GEGL_USE_OPENCL=no GEGL_SWAP=ram $(GEGL) $< -o $@ -- \
+       over input=[ png-load path=`dirname $< | sed 's/\bSymbolic\b/Color/'`/gimp-mode-backdrop.png ] \
+            aux=[ png-load path=$< levels out-low=1] \
+            srgb=true
+
+16/gimp-%-mode.png: ../Symbolic/16/gimp-%-mode.png 16/gimp-mode-backdrop.png
+       $(MAKE_ICON)
+
 ## Compiled-in icons for both the core and libgimpwidgets
 
 CORE_IMAGES = \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]