conversations-classic/art/render.rb

22 lines
531 B
Ruby
Raw Normal View History

2014-06-23 23:35:43 +00:00
#!/bin/env ruby
resolutions={
'mdpi'=> 1,
'hdpi' => 1.5,
'xhdpi' => 2,
'xxhdpi' => 3,
}
images = {
2014-11-17 16:23:58 +00:00
'conversations_baloon.svg' => ['ic_launcher', 48],
'conversations_mono.svg' => ['ic_notification', 24],
'ic_received_indicator.svg' => ['ic_received_indicator', 12],
}
2014-06-23 23:35:43 +00:00
images.each do |source, result|
resolutions.each do |name, factor|
size = factor * result[1]
2014-11-01 21:27:11 +00:00
path = "../src/main/res/drawable-#{name}/#{result[0]}.png"
2014-06-23 23:35:43 +00:00
cmd = "inkscape -e #{path} -C -h #{size} -w #{size} #{source}"
puts cmd
system cmd
end
end