Permalink
Browse files

generate highlighted map icons

  • Loading branch information...
trey0 committed Aug 22, 2011
1 parent 2054bb2 commit 30fccfa47586e11f8d73665b3d06b8fe84554071
Showing with 12 additions and 3 deletions.
  1. +12 −3 geocamLens/management/appCommands/prep.py
@@ -11,7 +11,7 @@
from django.core.management.base import NoArgsCommand
from geocamUtil.Builder import Builder
-from geocamUtil.icons import svg, rotate
+from geocamUtil.icons import svg, rotate, halo
from geocamUtil.Installer import Installer
from geocamLens import settings
@@ -26,9 +26,9 @@ def handle_noargs(self, **options):
builder = Builder()
# render svg to png
+ svgOutput = '%s/build/media/geocamLens/icons/map/' % appDir
if settings.GEOCAM_LENS_RENDER_SVG_ICONS:
svgGlob = '%s/media_src/icons/*.svg' % appDir
- svgOutput = '%s/build/media/geocamLens/icons/map/' % appDir
logging.debug('svgIcons %s %s' % (svgGlob, svgOutput))
for imPath in glob(svgGlob):
svg.buildIcon(builder, imPath, outputDir=svgOutput)
@@ -38,8 +38,17 @@ def handle_noargs(self, **options):
inst.installRecurseGlob('%s/static/*' % appDir,
'%s/build/media' % appDir)
+ # make highlighted versions of icons
+ dstGlob = svgOutput + '*.png'
+ logging.debug('highlightIcons %s' % dstGlob)
+ for dst in glob(dstGlob):
+ if 'Highlighted' in dst:
+ continue
+ dstHighlighted = os.path.splitext(dst)[0] + 'Highlighted.png'
+ halo.addHalo(builder, dst, dstHighlighted)
+
# rotate pngs
- rotGlob = '%s/build/media/geocamLens/icons/map/*Point.png' % appDir
+ rotGlob = '%s/build/media/geocamLens/icons/map/*Point*.png' % appDir
rotOutput = '%s/build/media/geocamLens/icons/mapr' % appDir
logging.debug('rotateIcons %s %s' % (rotGlob, rotOutput))
for imPath in glob(rotGlob):

0 comments on commit 30fccfa

Please sign in to comment.