Forum archive 2000-2006

Michael Gage - Circle.pm

Michael Gage - Circle.pm

by Arnold Pizer -
Number of replies: 0
inactiveTopicCircle.pm topic started 5/22/2000; 10:40:30 PM
last post 5/22/2000; 10:40:30 PM
userMichael Gage - Circle.pm  blueArrow
5/22/2000; 10:40:30 PM (reads: 2716, responses: 0)


NAME

    Circle


SYNPOSIS

    use Carp;
use GD;
use WWPlot;
use Fun;


DESCRIPTION

This module defines a circle which can be inserted as a stamp in a graph (WWPlot) object.

Command:

    $circle_object = new Circle( $center_pos_x, $center_pos_y, $radius, $border_color, 
$fill_color);

Examples:

    Here is the code used to define the subroutines open_circle
and closed_circle in PGgraphmacros.pl
        sub open_circle {
my ($cx,$cy,$color) = @_;
new Circle ($cx, $cy, 4,$color,'nearwhite');
}
        sub closed_circle {
my ($cx,$cy, $color) = @_;
$color = 'black' unless defined $color;
new Circle ($cx, $cy, 4,$color, $color);
}
    $circle_object2 = closed_circle( $x_position, $y_position, $color );
    @circle_objects = $graph -> stamps($circle_object2);
# puts a filled dot at ($x_position, $y_position) on the graph -- using real
world coordinates.
File path = /ww/webwork/pg/lib/Circle.pm

<| Post or View Comments |>