1 class Pettanr.View.Image
\r
3 @thumbnail_size: () ->
\r
4 [Manifest.manifest().magic_numbers['thumbnail_width'], Manifest.manifest().magic_numbers['thumbnail_height']]
\r
6 @to_thumbnail_size: (w, h) ->
\r
7 s = @thumbnail_size()
\r
8 @fix_size_both(s[0], s[1], w, h)
\r
10 @minicon_size: () ->
\r
11 [Math.floor(Manifest.manifest().magic_numbers['thumbnail_width'] / 2), Math.floor(Manifest.manifest().magic_numbers['thumbnail_height'] / 2)]
\r
13 @to_minicon_size: (w, h) ->
\r
15 @fix_size_both(s[0], s[1], w, h)
\r
17 @fix_size_both: (limw, limh, w, h)->
\r
27 [Math.floor(w*wr/100), Math.floor(h*wr/100)]
\r
29 [Math.floor(w*hr/100), Math.floor(h*hr/100)]
\r
35 @icon_prof_file: () ->
\r
36 new Pettanr.ImageFile(@image_dir() + 'prof.gif')
\r
38 @icon_inspire_file: () ->
\r
39 new Pettanr.ImageFile(@image_dir() + 'inspire.gif')
\r
41 @icon_loading_file: () ->
\r
42 new Pettanr.ImageFile(@image_dir() + 'loading.gif')
\r
44 @icon_root_file: () ->
\r
45 new Pettanr.ImageFile(@image_dir() + 'root.png')
\r
47 @icon_pick_file: (type) ->
\r
48 new Pettanr.ImageFile(@image_dir() + type + '.png')
\r