| Draft documentation | Contained in the Draft distribution. |
Draft::TkGui::Entity::Reference - reference
Points to one or more Draft::Drawing objects and places them in space.
A reference has some interesting attributes; coordinates for placing it in space, paths to Draft::Drawing objects and parts of them to ignore.
| Draft documentation | Contained in the Draft distribution. |
package Draft::TkGui::Entity::Reference;
use strict; use warnings; # FIXME should subclass Draft::Entity::Reference, not the other way around #use Draft::Entity::Reference; #use vars qw(@ISA); #@ISA = qw(Draft::Entity::Reference);
sub Draw { my $self = shift; my ($canvas, $offset, $parents, $ignore) = @_; my $new_offset = [map ($offset->[$_] + $self->{0}->[$_], 0 .. 2)]; my $new_parents = [@$parents, $self->{_path}]; my $new_ignore = [@$ignore, @{$self->{ignore}}]; for my $path (@{$self->{location}}) { $Draft::WORLD->{$path}->Draw ($canvas, $new_offset, $new_parents, $new_ignore); } } 1;