TreeIter.pm (gscan2pdf-2.13.1.tar.xz) | : | TreeIter.pm (gscan2pdf-2.13.2.tar.xz) | ||
---|---|---|---|---|
package Gscan2pdf::Canvas::TreeIter; | package Gscan2pdf::Canvas::TreeIter; | |||
use strict; | use strict; | |||
use warnings; | use warnings; | |||
use Carp; | use Carp; | |||
use Readonly; | use Readonly; | |||
Readonly my $EMPTY_LIST => -1; | Readonly my $EMPTY_LIST => -1; | |||
our $VERSION = '2.13.1'; | our $VERSION = '2.13.2'; | |||
sub new { | sub new { | |||
my ( $class, $bbox ) = @_; | my ( $class, $bbox ) = @_; | |||
if ( not defined $bbox or not $bbox->isa('Gscan2pdf::Canvas::Bbox') ) { | if ( not defined $bbox or not $bbox->isa('Gscan2pdf::Canvas::Bbox') ) { | |||
croak "$bbox is not a bbox object"; | croak "$bbox is not a bbox object"; | |||
} | } | |||
my $self = { bbox => [$bbox], iter => [] }; | my $self = { bbox => [$bbox], iter => [] }; | |||
while ( $bbox->{type} ne 'page' ) { | while ( $bbox->{type} ne 'page' ) { | |||
my $parent = $bbox->get_property('parent'); | my $parent = $bbox->get_property('parent'); | |||
unshift @{ $self->{iter} }, $parent->get_child_ordinal($bbox); | unshift @{ $self->{iter} }, $parent->get_child_ordinal($bbox); | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |