| 1 | package Image::WMF::Rectangle; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 0 | ▶ | sub new { | ||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 6 | 0 | my ($class,$x,$y,$width,$height) = @_; | |||||||||
| 7 | 0 | my $obj = bless { | |||||||||
| 8 | _x => 0, | ||||||||||
| 9 | _y => 0, | ||||||||||
| 10 | _width => 0, | ||||||||||
| 11 | _height => 0, | ||||||||||
| 12 | }, $class; | ||||||||||
| 13 | 0 | $obj->_initialise($x,$y,$width,$height); | |||||||||
| 14 | 0 | return $obj; | |||||||||
| 15 | } | ||||||||||
| 16 | |||||||||||
| 17 | 0 | ▶ | sub x { | ||||||||
|
Subroutine
x: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 18 | 0 | my ($self,$x) = @_; | |||||||||
| 19 | 0 | ▶ | if (defined $x){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | 0 | $self->{'_x'} = $x; | |||||||||
| 21 | } else { | ||||||||||
| 22 | 0 | return($self->{'_x'}); | |||||||||
| 23 | } | ||||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | 0 | ▶ | sub y { | ||||||||
|
Subroutine
y: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 27 | 0 | my ($self,$y) = @_; | |||||||||
| 28 | 0 | ▶ | if (defined $y){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 29 | 0 | $self->{'_y'} = $y; | |||||||||
| 30 | } else { | ||||||||||
| 31 | 0 | return($self->{'_y'}); | |||||||||
| 32 | } | ||||||||||
| 33 | } | ||||||||||
| 34 | |||||||||||
| 35 | 0 | ▶ | sub width { | ||||||||
|
Subroutine
width: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 36 | 0 | my ($self,$width) = @_; | |||||||||
| 37 | 0 | ▶ | if (defined $width){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 38 | 0 | $self->{'_width'} = $width; | |||||||||
| 39 | } else { | ||||||||||
| 40 | 0 | return($self->{'_width'}); | |||||||||
| 41 | } | ||||||||||
| 42 | } | ||||||||||
| 43 | |||||||||||
| 44 | 0 | ▶ | sub height { | ||||||||
|
Subroutine
height: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 45 | 0 | my ($self,$height) = @_; | |||||||||
| 46 | 0 | ▶ | if (defined $height){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 47 | 0 | $self->{'_height'} = $height; | |||||||||
| 48 | } else { | ||||||||||
| 49 | 0 | return($self->{'_height'}); | |||||||||
| 50 | } | ||||||||||
| 51 | } | ||||||||||
| 52 | |||||||||||
| 53 | 0 | ▶ | sub _initialise { | ||||||||
|
Subroutine
_initialise: not called CC=1 SCAR=6.9
| |||||||||||
| 54 | 0 | my ($self,$x,$y,$width,$height) = @_; | |||||||||
| 55 | 0 | $self->x($x); | |||||||||
| 56 | 0 | $self->y($y); | |||||||||
| 57 | 0 | $self->width($width); | |||||||||
| 58 | 0 | $self->height($height); | |||||||||
| 59 | } | ||||||||||
| 60 | |||||||||||
| 61 | 1 | 1; | |||||||||