diff options
author | Sam Whited <sam@samwhited.com> | 2014-10-22 18:26:47 -0400 |
---|---|---|
committer | Sam Whited <sam@samwhited.com> | 2014-10-22 18:26:47 -0400 |
commit | 5e3b7132862e7211a3abca634d3ad7020c6e306c (patch) | |
tree | 30d54ab9caa0d750c59b860d55088bf327843a5f /art/render.rb | |
parent | 5f4b6e39bcf96435acb79dcf8c660b0819232544 (diff) |
Add non-project files back
Diffstat (limited to 'art/render.rb')
-rwxr-xr-x | art/render.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/art/render.rb b/art/render.rb new file mode 100755 index 00000000..2847891d --- /dev/null +++ b/art/render.rb @@ -0,0 +1,22 @@ +#!/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], + 'ic_received_indicator.svg' => ['ic_received_indicator', 12], + } +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 |