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






Previous topic: Next topic:
inactiveTopic Circle.pm topic started 5/22/2000; 10:40:30 PM
last post 5/22/2000; 10:40:30 PM
user Michael Gage - Circle.pm  blueArrow
5/22/2000; 10:40:30 PM (reads: 2933, 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 |>



Last update: Sunday, January 28, 2001 at 5:47:53 PM.
This site maintained using Manila and Frontier software.