djibel has asked for the wisdom of the Perl Monks concerning the following question:

Dear,

Do you know a module in CPAN which allow to create a canvas with background gradient color ?
Else, I have create a personal module called Tk::Canvas::GradientColor. I intend to upload to CPAN the Tk::Canvas::GradientColor. I am looking for comments/complaints/ideas about the namespace and/or usefulness of this module (e.g., any functionality missing or not necessary).

Thank you,

Best Regards,

Djibril

Replies are listed 'Best First'.
Re: perl tk and background gradient color.
by djibel (Novice) on Jun 01, 2010 at 09:19 UTC
    Dear,
    =head1 NAME Tk::Canvas::GradientColor - To create a Canvas widget with background +gradient color. =head1 SYNOPSIS #!/usr/bin/perl use strict; use warnings; use Tk; use Tk::Canvas::GradientColor; my $mw = new MainWindow( -title => 'Tk::Canvas::GradientColor', -background => 'white', ); my $canvas = $mw->GradientColor( -width => 400, -height => 400, )->pack( qw/ -fill both -expand 1 / ); MainLoop(); =head1 DESCRIPTION Tk::Canvas::GradientColor is an extension of the Canvas widget. It is +an easy way to build a canvas widget with gradient background color. ... ...

    The module allows to use 7 types of background gradient color : linear_horizontal, linear_vertical, mirror_horizontal, mirror_vertical, radial, corner_right and corner_left.

    # WIDGET-SPECIFIC METHODS

    • disabled_gradientcolor
    • enabled_gradientcolor
    • get_gradientcolor
    • set_gradientcolor
    • RGBtoHex
    • HextoRGB

    I am looking for comments or complaints about the name-space or anything else. Best regards,