aboutsummaryrefslogtreecommitdiffstats
path: root/art/render.rb
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-06-24 01:35:43 +0200
committeriNPUTmice <daniel@gultsch.de>2014-06-24 01:35:43 +0200
commit2a8f9642d562179b20938908e28a93f2d0480a4b (patch)
tree5fb570375732da8acfaa16792e39ce5f3774ea1f /art/render.rb
parent6f51cc85547c0b4f105da682e0b7e3d14145099d (diff)
added rendering script for artwork
Diffstat (limited to '')
-rwxr-xr-xart/render.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/art/render.rb b/art/render.rb
new file mode 100755
index 00000000..ed306072
--- /dev/null
+++ b/art/render.rb
@@ -0,0 +1,12 @@
+#!/bin/env ruby
+resolutions={'mdpi'=> 1, 'hdpi' => 1.5, 'xhdpi' => 2, 'xxhdpi' => 3}
+images = { 'conversations.svg' => ['ic_launcher',48], 'conversations_baloon.svg' => ['ic_activity', 32], 'conversations_mono.svg' => ['ic_notification',24] }
+images.each do |source, result|
+ resolutions.each do |name, factor|
+ size = factor * result[1]
+ path = "../res/drawable-#{name}/#{result[0]}.png"
+ cmd = "inkscape -e #{path} -C -h #{size} -w #{size} #{source}"
+ puts cmd
+ system cmd
+ end
+end