aboutsummaryrefslogtreecommitdiffstats
path: root/art/render.rb
blob: 2ab3e94fc6181755e004a62fd3490ad4048ed038 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/env ruby
resolutions={
	'mdpi'=> 1,
	'hdpi' => 1.5,
	'xhdpi' => 2,
	'xxhdpi' => 3,
	'xxxhdpi' => 4,
	}
images = {
	'conversations_baloon.svg' => ['ic_launcher', 48],
	'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 = "../src/main/res/drawable-#{name}/#{result[0]}.png"
		cmd = "inkscape -e #{path} -C -h #{size} -w #{size} #{source}"
		puts cmd
		system cmd
	end
end