fixed 9-patch generation
|
@ -13,7 +13,7 @@ resolutions = {
|
||||||
images = {
|
images = {
|
||||||
'ic_launcher.svg' => ['ic_launcher', 48],
|
'ic_launcher.svg' => ['ic_launcher', 48],
|
||||||
'main_logo.svg' => ['main_logo', 200],
|
'main_logo.svg' => ['main_logo', 200],
|
||||||
'main_logo.svg' => ['splash_logo', 144],
|
'splash_logo.svg' => ['splash_logo', 144],
|
||||||
'ic_search_black.svg' => ['ic_search_background_black', 144],
|
'ic_search_black.svg' => ['ic_search_background_black', 144],
|
||||||
'ic_search_white.svg' => ['ic_search_background_white', 144],
|
'ic_search_white.svg' => ['ic_search_background_white', 144],
|
||||||
'ic_no_results_white.svg' => ['ic_no_results_background_white', 144],
|
'ic_no_results_white.svg' => ['ic_no_results_background_white', 144],
|
||||||
|
@ -79,7 +79,7 @@ images = {
|
||||||
# "/Applications/Inkscape.app/Contents/Resources/bin/inkscape"
|
# "/Applications/Inkscape.app/Contents/Resources/bin/inkscape"
|
||||||
|
|
||||||
inkscape = "inkscape"
|
inkscape = "inkscape"
|
||||||
imagemagick = "convert"
|
imagemagick = "magick"
|
||||||
|
|
||||||
def execute_cmd(cmd)
|
def execute_cmd(cmd)
|
||||||
puts cmd
|
puts cmd
|
||||||
|
@ -143,7 +143,7 @@ images.each do |source_filename, settings|
|
||||||
|
|
||||||
execute_cmd "#{imagemagick} -background none PNG32:#{path} -gravity center -extent #{width+2}x#{height+2} PNG32:#{path}"
|
execute_cmd "#{imagemagick} -background none PNG32:#{path} -gravity center -extent #{width+2}x#{height+2} PNG32:#{path}"
|
||||||
|
|
||||||
draw_format = "-draw \"rectangle %d,%d %d,%d\""
|
draw_format = "-draw \"line %d,%d %d,%d\""
|
||||||
top_line = draw_format % [top.min + 1, 0, top.max, 0]
|
top_line = draw_format % [top.min + 1, 0, top.max, 0]
|
||||||
right_line = draw_format % [width + 1, right.min + 1, width + 1, right.max]
|
right_line = draw_format % [width + 1, right.min + 1, width + 1, right.max]
|
||||||
bottom_line = draw_format % [bottom.min + 1, height + 1, bottom.max, height + 1]
|
bottom_line = draw_format % [bottom.min + 1, height + 1, bottom.max, height + 1]
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
ic_launcher.svg
|
Before Width: | Height: | Size: 657 B After Width: | Height: | Size: 657 B |
Before Width: | Height: | Size: 689 B After Width: | Height: | Size: 689 B |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 772 B After Width: | Height: | Size: 772 B |
Before Width: | Height: | Size: 773 B After Width: | Height: | Size: 773 B |
Before Width: | Height: | Size: 750 B After Width: | Height: | Size: 750 B |
Before Width: | Height: | Size: 776 B After Width: | Height: | Size: 776 B |
Before Width: | Height: | Size: 779 B After Width: | Height: | Size: 779 B |
Before Width: | Height: | Size: 687 B After Width: | Height: | Size: 687 B |
Before Width: | Height: | Size: 707 B After Width: | Height: | Size: 707 B |
Before Width: | Height: | Size: 514 B After Width: | Height: | Size: 514 B |
Before Width: | Height: | Size: 525 B After Width: | Height: | Size: 525 B |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 596 B After Width: | Height: | Size: 596 B |
Before Width: | Height: | Size: 617 B After Width: | Height: | Size: 617 B |
Before Width: | Height: | Size: 595 B After Width: | Height: | Size: 595 B |
Before Width: | Height: | Size: 599 B After Width: | Height: | Size: 599 B |
Before Width: | Height: | Size: 610 B After Width: | Height: | Size: 610 B |
Before Width: | Height: | Size: 558 B After Width: | Height: | Size: 558 B |
Before Width: | Height: | Size: 568 B After Width: | Height: | Size: 568 B |
Before Width: | Height: | Size: 739 B After Width: | Height: | Size: 739 B |
Before Width: | Height: | Size: 769 B After Width: | Height: | Size: 769 B |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 936 B After Width: | Height: | Size: 936 B |
Before Width: | Height: | Size: 926 B After Width: | Height: | Size: 926 B |
Before Width: | Height: | Size: 915 B After Width: | Height: | Size: 915 B |
Before Width: | Height: | Size: 916 B After Width: | Height: | Size: 916 B |
Before Width: | Height: | Size: 935 B After Width: | Height: | Size: 935 B |
Before Width: | Height: | Size: 857 B After Width: | Height: | Size: 857 B |
Before Width: | Height: | Size: 842 B After Width: | Height: | Size: 842 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |