package Tk @ISA = qw() sub SetSmoothLine sub SetSmoothLine { my ($this,$f)= return $this->{'SmoothLine'} = $f; sub SmoothLine sub SmoothLine { my ($this)= return $this->{'SmoothLine'}; sub LastDrawnObject return shift->{'LastDrawnObject'}; sub ClipRect my ($this) = @_; return undef unless($this->{'DoClip'}); return $this->{'ClipRect'}; sub SetClipRect my ($this, $rt) = @_; return $this->{'ClipRect'} = $rt; sub Populate my($cw, $args) = return; sub ClassInit my ($class, $mw) = @_; return $class; sub new my ($class, @args) = @_; return bless $self, ref($class) || $class; sub DESTROY my $this = shift; $this->SUPER::DESTROY( sub ClearAll my ($this) = @_; sub SavePostScript my ($this, $OpenApp, $StartApp, $DefPath) = @_; return undef unless($filepath); return undef if($ret ne 'Yes'); return undef; return $filepath; sub MoveTo my ($this, $x, $y) = @_; return $this->{'LinesRect'} = new Rect($x, $y, $x, $y); sub LineTo my ($this, $x2, $y2, $width, $color, $tags) = @_; return $this->{'LinesRect'}->Merge($x1, $y1, $x2, $y2); sub PrepareDrawLines my ($this, $LineWidth, $LineColor, $Tag) = @_; return; sub DrawPushedLines my ($this) = @_; return unless(defined $this->SmoothLine() and $this->SmoothLine() > 0); return if(!defined $pPushLineXYArray or @$pPushLineXYArray < 4); sub DrawClippedLine my ($this, $x1, $y1, $x2, $y2, $width, $color, $tags) = @_; return $this->DoDrawClippedLine($Action, $x1, $y1, $x2, $y2, $width, $color, $tags); sub DoDrawClippedLine my ($this, $Action, $x1, $y1, $x2, $y2, $width, $color, $tags) = @_; return if($Action !~ /draw/i and !defined $pPushLineXYArray); return new Rect($x1, $y1, $x2, $y2); return undef if(!$In1 and !$In2); return undef if(!defined $xcut or !defined !$ycut); return new Rect($x1, $y1, $xcut, $ycut); sub DrawLine my ($this, $x1, $y1, $x2, $y2, $width, $color, $tags) = @_; return new Rect($x1, $y1, $x2, $y2); sub DrawBox my ($this, $x1, $y1, $x2, $y2, $width, $fillcolor, $outcolor, $tags) = @_; return new Rect($x1, $y1, $x2, $y2); sub GetTextHeight my ($this, $pFont) = @_; return $h; sub GetTextWidth my ($this, $text, $pFont) = @_; return $w; sub DrawText my ($this, $x, $y, $text, $pFont, $anchor, $color, $tags) = @_; return new Rect($x-$w, $y-$h/2.0, $x, $y+$h/2.0); return new Rect($x, $y-$h/2.0, $x+$w, $y+$h/2.0); return new Rect($x-$w/2.0, $y, $x+$w/2.0, $y+$h); return new Rect($x-$w/2.0, $y-$h, $x+$w/2.0, $y); return new Rect($x-$w, $y, $x, $y+$h); return new Rect($x-$w, $y-$h, $x, $y); return new Rect($x, $y, $x+$w, $y+$h); return new Rect($x, $y-$h, $x+$w, $y); return new Rect($x-$w/2.0, $y-$h/2.0, $x+$w/2.0, $y+$h/2.0); sub DrawOval my ($this, $x1, $y1, $x2, $y2, $width, $fillcolor, $outcolor, $tags) = @_; return new Rect($x1, $y1, $x2, $y2); sub DrawCircle my ($this, $x, $y, $r, $width, $fillcolor, $outcolor, $tags) = @_; return new Rect($x-$r, $y-$r, $x+$r, $y+$r); sub CreateFont my ($this, $FontName, $FontSize, $FontStyle) = @_; return [$FontName, $FontSize, $FontStyle]; sub SetFontBypFont my ($this, $pFont) = @_; return $this->{'pFont'} = $pFont; sub SetFont my ($this, $FontName, $FontSize, $FontStyle) = @_; return undef unless($FontName); return $this->SetFontBypFont($FontName); return $this->SetFontBypFont($font); sub UpdateFont my ($this, $FontName, $FontSize, $FontStyle) = @_; sub Update return 1;