line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package PDF::API2::Resource::ColorSpace::Indexed::WebColor; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
1118
|
use base 'PDF::API2::Resource::ColorSpace::Indexed'; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
615
|
|
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
14
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
40
|
|
6
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
84
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '2.043'; # VERSION |
9
|
|
|
|
|
|
|
|
10
|
2
|
|
|
2
|
|
12
|
use PDF::API2::Basic::PDF::Utils; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
161
|
|
11
|
2
|
|
|
2
|
|
13
|
use PDF::API2::Util; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
278
|
|
12
|
2
|
|
|
2
|
|
16
|
use Scalar::Util qw(weaken); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
913
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
15
|
1
|
|
|
1
|
1
|
3
|
my ($class, $pdf) = @_; |
16
|
|
|
|
|
|
|
|
17
|
1
|
50
|
|
|
|
5
|
$class = ref($class) if ref($class); |
18
|
1
|
|
|
|
|
5
|
my $self = $class->SUPER::new($pdf, pdfkey()); |
19
|
1
|
50
|
|
|
|
3
|
$pdf->new_obj($self) unless $self->is_obj($pdf); |
20
|
1
|
|
|
|
|
3
|
$self->{' apipdf'} = $pdf; |
21
|
1
|
|
|
|
|
4
|
weaken $self->{' apipdf'}; |
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
|
|
3
|
my $csd = PDFDict(); |
24
|
1
|
|
|
|
|
4
|
$pdf->new_obj($csd); |
25
|
|
|
|
|
|
|
|
26
|
1
|
|
|
|
|
3
|
$csd->{'Filter'} = PDFArray(PDFName('ASCIIHexDecode')); |
27
|
1
|
|
|
|
|
2
|
$csd->{' stream'} = ''; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
# 0-215 |
30
|
1
|
|
|
|
|
4
|
foreach my $r (0, 0x33, 0x66, 0x99, 0xCC, 0xFF) { |
31
|
6
|
|
|
|
|
11
|
foreach my $g (0, 0x33, 0x66, 0x99, 0xCC, 0xFF) { |
32
|
36
|
|
|
|
|
50
|
foreach my $b (0, 0x33, 0x66, 0x99, 0xCC, 0xFF) { |
33
|
216
|
|
|
|
|
423
|
$csd->{' stream'} .= pack('CCC', $r, $g, $b); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# 216-231 |
39
|
1
|
|
|
|
|
3
|
foreach my $r ( 0, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, |
40
|
|
|
|
|
|
|
0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF) |
41
|
|
|
|
|
|
|
{ |
42
|
16
|
|
|
|
|
30
|
$csd->{' stream'} .= pack('CCC', $r, $r, $r); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
# 232-247 |
46
|
1
|
|
|
|
|
2
|
foreach my $r ( 0, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, |
47
|
|
|
|
|
|
|
0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF) |
48
|
|
|
|
|
|
|
{ |
49
|
|
|
|
|
|
|
$csd->{' stream'} .= pack('CCC', |
50
|
16
|
|
|
|
|
70
|
map { $_ * 255 } |
|
48
|
|
|
|
|
454
|
|
51
|
|
|
|
|
|
|
namecolor('!' . sprintf('%02X', $r) . 'FFFF')); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
# 248-255 |
55
|
1
|
|
|
|
|
3
|
foreach my $r (0, 0x22, 0x44, 0x66, 0x88, 0xAA, 0xCC, 0xEE) { |
56
|
|
|
|
|
|
|
$csd->{' stream'} .= pack('CCC', |
57
|
8
|
|
|
|
|
30
|
map { $_ * 255 } |
|
24
|
|
|
|
|
69
|
|
58
|
|
|
|
|
|
|
namecolor('!' . sprintf('%02X', $r) . 'FF99')); |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
1
|
|
|
|
|
16
|
$csd->{' stream'} .= "\x00" x 768; |
62
|
1
|
|
|
|
|
5
|
$csd->{' stream'} = substr($csd->{' stream'}, 0, 768); |
63
|
|
|
|
|
|
|
|
64
|
1
|
|
|
|
|
5
|
$self->add_elements(PDFName('DeviceRGB'), PDFNum(255), $csd); |
65
|
1
|
|
|
|
|
3
|
$self->{' csd'} = $csd; |
66
|
|
|
|
|
|
|
|
67
|
1
|
|
|
|
|
5
|
return $self; |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
1; |