| 1 | package Draft::TkGui::Drawing; | ||||||||||
| 2 | |||||||||||
| 3 | =head1 NAME | ||||||||||
| 4 | |||||||||||
| 5 | Draft::TkGui::Drawing - Tk drawing type | ||||||||||
| 6 | |||||||||||
| 7 | =head1 SYNOPSIS | ||||||||||
| 8 | |||||||||||
| 9 | A container for multiple drawing entities. | ||||||||||
| 10 | |||||||||||
| 11 | =head1 DESCRIPTION | ||||||||||
| 12 | |||||||||||
| 13 | Code for displaying a drawing on screen. | ||||||||||
| 14 | |||||||||||
| 15 | =cut | ||||||||||
| 16 | |||||||||||
| 17 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 18 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 19 | |||||||||||
| 20 | # FIXME should subclass Draft::Drawing, not the other way around | ||||||||||
| 21 | |||||||||||
| 22 | #use vars qw(@ISA); | ||||||||||
| 23 | #@ISA = qw(Draft::Drawing); | ||||||||||
| 24 | |||||||||||
| 25 | sub Draw | ||||||||||
| 26 | 0 | ▶ | { | ||||||||
|
Subroutine
Draw: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||
| 27 | 0 | my $self = shift; | |||||||||
| 28 | 0 | my ($canvas, $offset, $parents, $ignore) = @_; | |||||||||
| 29 | |||||||||||
| 30 | 0 | $self->Read; | |||||||||
| 31 | |||||||||||
| 32 | 0 | foreach my $key (keys %{$self}) | |||||||||
| 33 | { | ||||||||||
| 34 | 0 | ▶ | next if ($key =~ /^_/); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 35 | 0 | ▶ | next if grep (/^$key$/, @{$ignore}); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 36 | |||||||||||
| 37 | 0 | $self->{$key}->Draw ($canvas, $offset, $parents, $ignore); | |||||||||
| 38 | } | ||||||||||
| 39 | } | ||||||||||
| 40 | |||||||||||
| 41 | 1 | 1; | |||||||||