package Pastel
::Geometry
::Shape
;
# Perl interface for the Geometry objects. The function get_bounds()
# Called by all the Geometry objects. Parameters passed are the
my ($max_x, $max_y, $min_x, $min_y); # Hold the maximum and the minimum coordinates
for (my $i = 0; $i < @args; $i +=2) { #Pick even number X values
if ($args[$i] > $max_x) {
elsif ($args[$i] < $min_x){
for (my $i = 1; $i <@args; $i +=2) { #Pick odd number Y values
if ($args[$i] > $max_y) {
elsif ($args[$i] < $min_y) {
my $bb = Pastel
::Geometry
::Rectangle
->new($min_x, $min_y, ($max_x - $min_x), ($max_y - $min_y));
$self->{stroke
} = $stroke;