lib/Draft/TkGui/Entity/Reference.pm

filter: Statementstmt 43.7% 7 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod 0.0% 0 / 1 totaltotal 45.0% 9 / 20 CC 2 SCAR 12.5
CC
2
Cov
44%
Draw
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.5
« lib/Draft/TkGui/Entity/Line.pm ↑ Summary lib/Draft.pm »
1 package Draft::TkGui::Entity::Reference;
2  
3 =head1 NAME
4  
5 Draft::TkGui::Entity::Reference - reference
6  
7 =head1 SYNOPSIS
8  
9 Points to one or more L<Draft::Drawing> objects and places them in
10 space.
11  
12 =cut
13  
14 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 # FIXME should subclass Draft::Entity::Reference, not the other way around
18  
19 #use Draft::Entity::Reference;
20 #use vars qw(@ISA);
21 #@ISA = qw(Draft::Entity::Reference);
22  
23 =pod
24  
25 =head1 DESCRIPTION
26  
27 A reference has some interesting attributes; coordinates for placing
28 it in space, paths to L<Draft::Drawing> objects and parts of them to
29 ignore.
30  
31 =cut
32  
33 sub Draw
34 0 ▶{
Subroutine Draw: not called CC=2 SCAR=17.9
Pod undocumented
35 0 my $self = shift;
36 0 my ($canvas, $offset, $parents, $ignore) = @_;
37  
38 0 my $new_offset = [map ($offset->[$_] + $self->{0}->[$_], 0 .. 2)];
39 0 my $new_parents = [@$parents, $self->{_path}];
40 0 my $new_ignore = [@$ignore, @{$self->{ignore}}];
41  
42 0 for my $path (@{$self->{location}})
43 {
44 0 $Draft::WORLD->{$path}->Draw ($canvas, $new_offset, $new_parents, $new_ignore);
45 }
46 }
47  
48 1 1;
« lib/Draft/TkGui/Entity/Line.pm ↑ Summary lib/Draft.pm »