| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Khonsu::Text::H1; |
|
2
|
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
41
|
use parent 'Khonsu::Text'; |
|
|
5
|
|
|
|
|
15
|
|
|
|
5
|
|
|
|
|
26
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub BUILD { |
|
6
|
4
|
|
|
4
|
0
|
36
|
my ($self, %params) = @_; |
|
7
|
4
|
|
50
|
|
|
46
|
$self->font->size($params{font_size} || 50); |
|
8
|
4
|
|
50
|
|
|
20
|
$self->font->line_height($params{line_height} || 30); |
|
9
|
|
|
|
|
|
|
} |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub add { |
|
12
|
61
|
|
|
61
|
0
|
231
|
my ($self, $file, %attributes) = @_; |
|
13
|
61
|
|
33
|
|
|
470
|
$attributes{h} ||= $self->font->size; |
|
14
|
61
|
100
|
|
|
|
347
|
$file->toc->outline($file, 'h1', %attributes) if $attributes{toc}; |
|
15
|
61
|
|
|
|
|
372
|
return $self->SUPER::add($file, %attributes); |
|
16
|
|
|
|
|
|
|
} |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
1; |