line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CSS::SpriteBuilder::Constants; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
21
|
use warnings; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
107
|
|
4
|
4
|
|
|
4
|
|
33
|
use strict; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
106
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
22
|
use base 'Exporter'; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
608
|
|
7
|
|
|
|
|
|
|
our @EXPORT = qw( |
8
|
|
|
|
|
|
|
LAYOUT_LIST |
9
|
|
|
|
|
|
|
PACKED_LAYOUT |
10
|
|
|
|
|
|
|
HORIZONTAL_LAYOUT |
11
|
|
|
|
|
|
|
VERTICAL_LAYOUT |
12
|
|
|
|
|
|
|
SPRITE_OPTS |
13
|
|
|
|
|
|
|
IMAGE_OPTS |
14
|
|
|
|
|
|
|
DEF_IMAGE_QUALITY |
15
|
|
|
|
|
|
|
DEF_MAX_IMAGE_SIZE |
16
|
|
|
|
|
|
|
DEF_MAX_IMAGE_WIDTH |
17
|
|
|
|
|
|
|
DEF_MAX_IMAGE_HEIGHT |
18
|
|
|
|
|
|
|
DEF_MAX_SPRITE_WIDTH |
19
|
|
|
|
|
|
|
DEF_MAX_SPRITE_HEIGHT |
20
|
|
|
|
|
|
|
DEF_MARGIN |
21
|
|
|
|
|
|
|
DEF_LAYOUT |
22
|
|
|
|
|
|
|
DEF_CSS_SELECTOR_PREFIX |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
use constant { |
26
|
4
|
|
|
|
|
544
|
LAYOUT_LIST => [qw/ packed horizontal vertical /], |
27
|
|
|
|
|
|
|
PACKED_LAYOUT => 'packed', |
28
|
|
|
|
|
|
|
HORIZONTAL_LAYOUT => 'horizontal', |
29
|
|
|
|
|
|
|
VERTICAL_LAYOUT => 'vertical', |
30
|
4
|
|
|
4
|
|
37
|
}; |
|
4
|
|
|
|
|
10
|
|
31
|
|
|
|
|
|
|
|
32
|
4
|
|
|
|
|
220
|
use constant SPRITE_OPTS => [qw/ |
33
|
|
|
|
|
|
|
source_dir |
34
|
|
|
|
|
|
|
image_quality |
35
|
|
|
|
|
|
|
max_image_size |
36
|
|
|
|
|
|
|
max_image_width |
37
|
|
|
|
|
|
|
max_image_height |
38
|
|
|
|
|
|
|
max_sprite_width |
39
|
|
|
|
|
|
|
max_sprite_height |
40
|
|
|
|
|
|
|
margin |
41
|
|
|
|
|
|
|
transparent_color |
42
|
|
|
|
|
|
|
is_background |
43
|
|
|
|
|
|
|
layout |
44
|
|
|
|
|
|
|
css_selector_prefix |
45
|
|
|
|
|
|
|
css_url_prefix |
46
|
|
|
|
|
|
|
is_add_timestamp |
47
|
4
|
|
|
4
|
|
20
|
/]; |
|
4
|
|
|
|
|
7
|
|
48
|
|
|
|
|
|
|
|
49
|
4
|
|
|
|
|
333
|
use constant IMAGE_OPTS => [qw/ |
50
|
|
|
|
|
|
|
is_background |
51
|
|
|
|
|
|
|
is_repeat |
52
|
|
|
|
|
|
|
css_selector |
53
|
4
|
|
|
4
|
|
17
|
/]; |
|
4
|
|
|
|
|
12
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
# default options |
56
|
|
|
|
|
|
|
use constant { |
57
|
4
|
|
|
|
|
507
|
DEF_IMAGE_QUALITY => 90, |
58
|
|
|
|
|
|
|
DEF_MAX_IMAGE_SIZE => 64 * 1024, |
59
|
|
|
|
|
|
|
DEF_MAX_IMAGE_WIDTH => 2000, |
60
|
|
|
|
|
|
|
DEF_MAX_IMAGE_HEIGHT => 2000, |
61
|
|
|
|
|
|
|
DEF_MAX_SPRITE_WIDTH => 2000, |
62
|
|
|
|
|
|
|
DEF_MAX_SPRITE_HEIGHT => 2000, |
63
|
|
|
|
|
|
|
DEF_MARGIN => 0, |
64
|
|
|
|
|
|
|
DEF_LAYOUT => PACKED_LAYOUT, |
65
|
|
|
|
|
|
|
DEF_CSS_SELECTOR_PREFIX => '.spr-', |
66
|
4
|
|
|
4
|
|
20
|
}; |
|
4
|
|
|
|
|
8
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
1; |