package Rect @ISA = qw() sub new my ($module, $x0, $y0, $x1, $y1) = @_; return $this; sub DESTROY my $this = shift; sub x0 return shift->{'x0'}; sub x1 return shift->{'x1'}; sub y0 return shift->{'y0'}; sub y1 return shift->{'y1'}; sub SetRect my ($this, $x0, $y0, $x1, $y1) = @_; return unless(defined $x0); sub Merge my ($this, $x0, $y0, $x1, $y1) = @_; return $this->MergeByBox($x0, $y0, $x1, $y1); sub MergeByBox my ($this, $x0, $y0, $x1, $y1) = @_; return $this; sub IsInside my ($this, $x, $y) = @_; return 0; return 0; return 1;