| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package PDF::API2::Resource::ColorSpace::Indexed::Hue; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1073
|
use base 'PDF::API2::Resource::ColorSpace::Indexed'; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
103
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
7
|
use strict; |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
21
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
42
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '2.045'; # VERSION |
|
9
|
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
19
|
use PDF::API2::Basic::PDF::Utils; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
98
|
|
|
11
|
1
|
|
|
1
|
|
7
|
use PDF::API2::Util; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
128
|
|
|
12
|
1
|
|
|
1
|
|
8
|
use Scalar::Util qw(weaken); |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
379
|
|
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
|
15
|
0
|
|
|
0
|
1
|
|
my ($class, $pdf) = @_; |
|
16
|
|
|
|
|
|
|
|
|
17
|
0
|
0
|
|
|
|
|
$class = ref($class) if ref($class); |
|
18
|
0
|
|
|
|
|
|
my $self = $class->SUPER::new($pdf, pdfkey()); |
|
19
|
0
|
0
|
|
|
|
|
$pdf->new_obj($self) unless $self->is_obj($pdf); |
|
20
|
0
|
|
|
|
|
|
$self->{' apipdf'} = $pdf; |
|
21
|
0
|
|
|
|
|
|
weaken $self->{' apipdf'}; |
|
22
|
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
my $csd = PDFDict(); |
|
24
|
0
|
|
|
|
|
|
$pdf->new_obj($csd); |
|
25
|
0
|
|
|
|
|
|
$csd->{'Filter'} = PDFArray(PDFName('FlateDecode')); |
|
26
|
|
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
|
my %cc; |
|
28
|
|
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
my $stream = ''; |
|
30
|
0
|
|
|
|
|
|
foreach my $s (4, 3, 2, 1) { |
|
31
|
0
|
|
|
|
|
|
foreach my $v (4, 3) { |
|
32
|
0
|
|
|
|
|
|
foreach my $r (0..31) { |
|
33
|
|
|
|
|
|
|
$stream .= pack('CCC', |
|
34
|
0
|
|
|
|
|
|
map { $_ * 255 } |
|
|
0
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
namecolor(join('', |
|
36
|
|
|
|
|
|
|
'!', |
|
37
|
|
|
|
|
|
|
sprintf('%02X', $r * 255 / 31), |
|
38
|
|
|
|
|
|
|
sprintf('%02X', $s * 255 / 4), |
|
39
|
|
|
|
|
|
|
sprintf('%02X', $v * 255 / 4)))); |
|
40
|
|
|
|
|
|
|
} |
|
41
|
|
|
|
|
|
|
} |
|
42
|
|
|
|
|
|
|
} |
|
43
|
0
|
|
|
|
|
|
$stream .= "\x00" x 768; |
|
44
|
0
|
|
|
|
|
|
$stream = substr($stream, 0, 768); |
|
45
|
0
|
|
|
|
|
|
$csd->{' stream'} = $stream; |
|
46
|
|
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
$self->add_elements(PDFName('DeviceRGB'), PDFNum(255), $csd); |
|
48
|
0
|
|
|
|
|
|
$self->{' csd'} = $csd; |
|
49
|
|
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
return $self; |
|
51
|
|
|
|
|
|
|
} |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |