WeBWorKdocs

sq_webwork:


Home
Current UR
courses
Visitor
page
Intro to
WeBWorK
WeBWorK 2
Twiki
WW
Community
Grant Support
& awards
Discussion
group
Problem
library
Write/modify
problems
Create &
manage course
Tutorial on
running a course
HowTos
FAQ
WeBWorK2
FAQ
Software
Download
How to
Install WW server
Feedback
Site Map
Change
preferences
Change
password





Prev | Next | pod


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 |>


Prev | Next | pod

Last update: Wednesday, January 10, 2007 at 9:51:46 PM.
This site maintained using Manila and Frontier software.