line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
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 objects and places them in |
10
|
|
|
|
|
|
|
space. |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=cut |
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
34
|
|
15
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
192
|
|
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 objects and parts of them to |
29
|
|
|
|
|
|
|
ignore. |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=cut |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub Draw |
34
|
|
|
|
|
|
|
{ |
35
|
0
|
|
|
0
|
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}}]; |
|
0
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
for my $path (@{$self->{location}}) |
|
0
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
{ |
44
|
0
|
|
|
|
|
|
$Draft::WORLD->{$path}->Draw ($canvas, $new_offset, $new_parents, $new_ignore); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |