blib/lib/Khonsu/Shape/Box.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 7 | 7 | 100.0 |
branch | 1 | 2 | 50.0 |
condition | n/a | ||
subroutine | 2 | 2 | 100.0 |
pod | 0 | 1 | 0.0 |
total | 10 | 12 | 83.3 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Khonsu::Shape::Box; | ||||||
2 | |||||||
3 | 5 | 5 | 54 | use parent 'Khonsu::Shape'; | |||
5 | 9 | ||||||
5 | 29 | ||||||
4 | |||||||
5 | sub shape { | ||||||
6 | 92 | 92 | 0 | 539 | my ($self, $file, $shape, %args) = @_; | ||
7 | 92 | 637 | my $box = $shape->rect($args{x}, $file->page->h - ($args{y} + $args{h}), $args{w}, $args{h}); | ||||
8 | 92 | 50 | 12786 | $box->fillcolor($args{fill_colour}) unless $args{fill_colour} eq 'transparent'; | |||
9 | 92 | 15305 | $box->fill; | ||||
10 | } | ||||||
11 | |||||||
12 | 1; |