#$Id: Circle.pm,v 1.1 2003/04/29 18:19:54 malay Exp $
# Perl module for Pastel::Geometry::Circle
# Author: Malay < curiouser@ccmb.res.in >
# Copyright (c) 2003 by Malay. All rights reserved.
# You may distribute this module under the same terms as perl itself
Pastel::Geometry::Circle - DESCRIPTION of Object
package Pastel
::Geometry
::Circle
;
@ISA = qw(Pastel::Geometry::Ellipse);
use Pastel
::Mixin
::Mixin
;
my ( $class, @args ) = @_;
$class = ref($class) || $class;
Pastel
::Mixin
::Mixin
->_rearrange( [ "X", "Y", "DIA" ], @args );
#print STDERR "circle:", " $x "," $y "," $d ", "\n";
my $self = $class->SUPER::new
( $x, $y, $d, $d );
#print "****", $self->{_mac_header}, "\n";
my ( $self, @args ) = @_;
#print STDERR "Circle init callled\n@args\n";
$self->SUPER::_init
(@args);
Describe your function here
my $x = $self->get_x() + ($self->get_width() / 2);
my $y = $self->get_y() + ($self->get_height()/ 2);
return Pastel
::Geometry
::Point
->new(-x
=>$x, -y
=>$y);
Describe your function here
if ($self->get_width() == $self->get_height()){
return $self->get_width() / 2;
Describe your function here
my $style = $self->get_style($g);
my $s = "<circle cx=\"".$self->get_center()->get_x()."\" cy=\"";
$s .= $self->get_center()->get_y()."\" r=\"";
$s .= $self->get_radius(). "\" style=\"$style\" />";
Copyright (c) 2003 by Malay <curiouser@ccmb.res.in>. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.