| 1 | package Khonsu::File; | ||
| 2 | |||
| 3 | 2 | ▶ | use parent 'Khonsu::Ra'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 2 | ▶ | use Khonsu::Page; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | sub attributes { | ||
| 8 | 1 | ▶ | my $a = shift; |
|
Subroutine
attributes: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 9 | return ( | ||
| 10 | 1 | file_name => {$a->RW, $a->REQ, $a->STR}, | |
| 11 | pdf => {$a->RW, $a->REQ, $a->OBJ}, | ||
| 12 | pages => {$a->RW, $a->REQ, $a->AR}, | ||
| 13 | page => {$a->RW, $a->OBJ}, | ||
| 14 | page_args => {$a->RW, $a->DHR}, | ||
| 15 | onsave_cbs => {$a->RW, $a->DAR}, | ||
| 16 | page_offset => {$a->RW, $a->NUM}, | ||
| 17 | $a->LINE, | ||
| 18 | $a->BOX, | ||
| 19 | $a->CIRCLE, | ||
| 20 | $a->PIE, | ||
| 21 | $a->ELLIPSE, | ||
| 22 | $a->FONT, | ||
| 23 | $a->TEXT, | ||
| 24 | $a->H1, | ||
| 25 | $a->H2, | ||
| 26 | $a->H3, | ||
| 27 | $a->H4, | ||
| 28 | $a->H5, | ||
| 29 | $a->H6 | ||
| 30 | ); | ||
| 31 | } | ||
| 32 | |||
| 33 | sub add_page { | ||
| 34 | 2 | ▶ | my ($self, %args) = @_; |
|
Subroutine
add_page: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 35 | |||
| 36 | my $page = $self->page(Khonsu::Page->new( | ||
| 37 | page_size =>'A4', | ||
| 38 | 2 | num => scalar @{$self->pages}, | |
| 39 | 2 | %{ $self->page_args }, | |
| 40 | %args | ||
| 41 | ))->add($self); | ||
| 42 | |||
| 43 | 2 | push @{$self->pages}, $page; | |
| 44 | |||
| 45 | 2 | return $self; | |
| 46 | } | ||
| 47 | |||
| 48 | sub add_line { | ||
| 49 | 1 | ▶ | my ($self, %args) = @_; |
|
Subroutine
add_line: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 50 | 1 | $self->line->add($self, %args); | |
| 51 | 1 | return $self; | |
| 52 | } | ||
| 53 | |||
| 54 | sub add_box { | ||
| 55 | 1 | ▶ | my ($self, %args) = @_; |
|
Subroutine
add_box: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 56 | 1 | $self->box->add($self, %args); | |
| 57 | 1 | return $self; | |
| 58 | } | ||
| 59 | |||
| 60 | sub add_circle { | ||
| 61 | 1 | ▶ | my ($self, %args) = @_; |
|
Subroutine
add_circle: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 62 | 1 | $self->circle->add($self, %args); | |
| 63 | 1 | return $self; | |
| 64 | } | ||
| 65 | |||
| 66 | sub add_pie { | ||
| 67 | 2 | ▶ | my ($self, %args) = @_; |
|
Subroutine
add_pie: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 68 | 2 | $self->pie->add($self, %args); | |
| 69 | 2 | return $self; | |
| 70 | } | ||
| 71 | |||
| 72 | sub add_ellipse { | ||
| 73 | 1 | ▶ | my ($self, %args) = @_; |
|
Subroutine
add_ellipse: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 74 | 1 | $self->ellipse->add($self, %args); | |
| 75 | 1 | return $self; | |
| 76 | } | ||
| 77 | |||
| 78 | sub load_font { | ||
| 79 | 0 | ▶ | my ($self, %args) = @_; |
|
Subroutine
load_font: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 80 | 0 | $self->font->load($self, %args); | |
| 81 | 0 | return $self; | |
| 82 | } | ||
| 83 | |||
| 84 | sub add_text { | ||
| 85 | 5 | ▶ | my ($self, %args) = @_; |
|
Subroutine
add_text: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 86 | 5 | $self->text->add($self, %args); | |
| 87 | 5 | return $self; | |
| 88 | } | ||
| 89 | |||
| 90 | sub add_h1 { | ||
| 91 | 2 | ▶ | my ($self, %args) = @_; |
|
Subroutine
add_h1: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 92 | 2 | $self->h1->add($self, %args); | |
| 93 | 2 | return $self; | |
| 94 | } | ||
| 95 | |||
| 96 | sub add_h2 { | ||
| 97 | 1 | ▶ | my ($self, %args) = @_; |
|
Subroutine
add_h2: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 98 | 1 | $self->h2->add($self, %args); | |
| 99 | 1 | return $self; | |
| 100 | } | ||
| 101 | |||
| 102 | sub add_h3 { | ||
| 103 | 1 | ▶ | my ($self, %args) = @_; |
|
Subroutine
add_h3: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 104 | 1 | $self->h3->add($self, %args); | |
| 105 | 1 | return $self; | |
| 106 | } | ||
| 107 | |||
| 108 | sub add_h4 { | ||
| 109 | 1 | ▶ | my ($self, %args) = @_; |
|
Subroutine
add_h4: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 110 | 1 | $self->h4->add($self, %args); | |
| 111 | 1 | return $self; | |
| 112 | } | ||
| 113 | |||
| 114 | sub add_h5 { | ||
| 115 | 1 | ▶ | my ($self, %args) = @_; |
|
Subroutine
add_h5: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 116 | 1 | $self->h5->add($self, %args); | |
| 117 | 1 | return $self; | |
| 118 | } | ||
| 119 | |||
| 120 | sub add_h6 { | ||
| 121 | 1 | ▶ | my ($self, %args) = @_; |
|
Subroutine
add_h6: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 122 | 1 | $self->h6->add($self, %args); | |
| 123 | 1 | return $self; | |
| 124 | } | ||
| 125 | |||
| 126 | sub save { | ||
| 127 | 1 | ▶ | my ($self) = shift; |
|
Subroutine
save: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 128 | 1 | $self->pdf->saveas(); | |
| 129 | 1 | $self->pdf->end(); | |
| 130 | } | ||
| 131 | |||
| 132 | 2 | 1; | |