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 | 33 | use parent 'Khonsu::Shape'; | |||
5 | 10 | ||||||
5 | 27 | ||||||
4 | |||||||
5 | sub shape { | ||||||
6 | 92 | 92 | 0 | 498 | my ($self, $file, $shape, %args) = @_; | ||
7 | 92 | 578 | my $box = $shape->rect($args{x}, $file->page->h - ($args{y} + $args{h}), $args{w}, $args{h}); | ||||
8 | 92 | 50 | 12402 | $box->fillcolor($args{fill_colour}) unless $args{fill_colour} eq 'transparent'; | |||
9 | 92 | 15415 | $box->fill; | ||||
10 | } | ||||||
11 | |||||||
12 | 1; |