line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package PDF::API2::Resource::ColorSpace::Indexed::WebColor; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
1028
|
use base 'PDF::API2::Resource::ColorSpace::Indexed'; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
608
|
|
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
19
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
50
|
|
6
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
81
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '2.044'; # VERSION |
9
|
|
|
|
|
|
|
|
10
|
2
|
|
|
2
|
|
21
|
use PDF::API2::Basic::PDF::Utils; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
160
|
|
11
|
2
|
|
|
2
|
|
19
|
use PDF::API2::Util; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
267
|
|
12
|
2
|
|
|
2
|
|
17
|
use Scalar::Util qw(weaken); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
957
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
15
|
1
|
|
|
1
|
1
|
4
|
my ($class, $pdf) = @_; |
16
|
|
|
|
|
|
|
|
17
|
1
|
50
|
|
|
|
3
|
$class = ref($class) if ref($class); |
18
|
1
|
|
|
|
|
6
|
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
|
|
|
|
|
5
|
$csd->{'Filter'} = PDFArray(PDFName('ASCIIHexDecode')); |
27
|
1
|
|
|
|
|
2
|
$csd->{' stream'} = ''; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
# 0-215 |
30
|
1
|
|
|
|
|
3
|
foreach my $r (0, 0x33, 0x66, 0x99, 0xCC, 0xFF) { |
31
|
6
|
|
|
|
|
10
|
foreach my $g (0, 0x33, 0x66, 0x99, 0xCC, 0xFF) { |
32
|
36
|
|
|
|
|
52
|
foreach my $b (0, 0x33, 0x66, 0x99, 0xCC, 0xFF) { |
33
|
216
|
|
|
|
|
387
|
$csd->{' stream'} .= pack('CCC', $r, $g, $b); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# 216-231 |
39
|
1
|
|
|
|
|
2
|
foreach my $r ( 0, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, |
40
|
|
|
|
|
|
|
0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF) |
41
|
|
|
|
|
|
|
{ |
42
|
16
|
|
|
|
|
28
|
$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
|
|
|
|
|
71
|
map { $_ * 255 } |
|
48
|
|
|
|
|
141
|
|
51
|
|
|
|
|
|
|
namecolor('!' . sprintf('%02X', $r) . 'FFFF')); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
# 248-255 |
55
|
1
|
|
|
|
|
4
|
foreach my $r (0, 0x22, 0x44, 0x66, 0x88, 0xAA, 0xCC, 0xEE) { |
56
|
|
|
|
|
|
|
$csd->{' stream'} .= pack('CCC', |
57
|
8
|
|
|
|
|
28
|
map { $_ * 255 } |
|
24
|
|
|
|
|
68
|
|
58
|
|
|
|
|
|
|
namecolor('!' . sprintf('%02X', $r) . 'FF99')); |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
1
|
|
|
|
|
14
|
$csd->{' stream'} .= "\x00" x 768; |
62
|
1
|
|
|
|
|
5
|
$csd->{' stream'} = substr($csd->{' stream'}, 0, 768); |
63
|
|
|
|
|
|
|
|
64
|
1
|
|
|
|
|
4
|
$self->add_elements(PDFName('DeviceRGB'), PDFNum(255), $csd); |
65
|
1
|
|
|
|
|
3
|
$self->{' csd'} = $csd; |
66
|
|
|
|
|
|
|
|
67
|
1
|
|
|
|
|
11
|
return $self; |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
1; |