Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

/var/sites/help-site.com/auto/tmp/CPAN/9677/Chart-Clicker-1.4.2/lib/Chart/Clicker/Drawing/ColorAllocator.pm

/var/sites/help-site.com/auto/tmp/CPAN/9677/Chart-Clicker-1.4.2/lib/Chart/Clicker/Drawing/ColorAllocator.pm


NAME

Chart::Clicker::Drawing::ColorAllocator


DESCRIPTION

Allocates colors for use in the chart. The position in the color allocator corresponds to the series that will be colored.


SYNOPSIS


    use Chart::Clicker::Drawing::ColorAllocator;

    my $ca = new Chart::Clicker::Drawing::ColorAllocator({

        colors => (

            new Chart::Clicker::Drawing::Color(1.0, 0, 0, 1.0),

            ...

        )

    });

    my $red = $ca->get(0);


METHODS

Constructor

new
Create a new ColorAllocator. You can optionally pass an arrayref of colors to 'seed' the allocator.

Class Methods

position
Gets the current position.

next
Returns the next color. Each call to next increments the position, so subsequent calls will return different colors.

reset
Resets this allocator back to the beginning.

get
Gets the color at the specified index. Returns undef if that position has no color.


AUTHOR

Cory 'G' Watson <gphat@cpan.org>


SEE ALSO

perl(1)


LICENSE

You can redistribute and/or modify this code under the same terms as Perl itself.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy