HomeCurrent UR
|
NAME
Circle
SYNPOSIS
use Carp;
use GD;
use WWPlot;
use Fun;
DESCRIPTIONThis 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
|
||
Last update: Wednesday, January 10, 2007 at 9:51:46 PM.
This site maintained using Manila and Frontier software. |
|||