r73849 - in /trunk/libconvert-color-perl: ./ debian/ examples/ lib/Convert/ lib/Convert/Color/ t/
mxey-guest at users.alioth.debian.org
mxey-guest at users.alioth.debian.org
Sat Apr 30 12:47:00 UTC 2011
Author: mxey-guest
Date: Sat Apr 30 12:46:39 2011
New Revision: 73849
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=73849
Log:
Import upstream release 0.08-1
Added:
trunk/libconvert-color-perl/META.json
- copied unchanged from r73848, branches/upstream/libconvert-color-perl/current/META.json
trunk/libconvert-color-perl/examples/gradient.pl
- copied unchanged from r73848, branches/upstream/libconvert-color-perl/current/examples/gradient.pl
Modified:
trunk/libconvert-color-perl/Changes
trunk/libconvert-color-perl/LICENSE
trunk/libconvert-color-perl/MANIFEST
trunk/libconvert-color-perl/META.yml
trunk/libconvert-color-perl/Makefile.PL
trunk/libconvert-color-perl/debian/changelog
trunk/libconvert-color-perl/lib/Convert/Color.pm
trunk/libconvert-color-perl/lib/Convert/Color/CMY.pm
trunk/libconvert-color-perl/lib/Convert/Color/CMYK.pm
trunk/libconvert-color-perl/lib/Convert/Color/HSL.pm
trunk/libconvert-color-perl/lib/Convert/Color/HSV.pm
trunk/libconvert-color-perl/lib/Convert/Color/HueBased.pm
trunk/libconvert-color-perl/lib/Convert/Color/RGB.pm
trunk/libconvert-color-perl/lib/Convert/Color/RGB16.pm
trunk/libconvert-color-perl/lib/Convert/Color/RGB8.pm
trunk/libconvert-color-perl/lib/Convert/Color/VGA.pm
trunk/libconvert-color-perl/lib/Convert/Color/X11.pm
trunk/libconvert-color-perl/t/30vga.t
trunk/libconvert-color-perl/t/31x11.t
Modified: trunk/libconvert-color-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconvert-color-perl/Changes?rev=73849&op=diff
==============================================================================
--- trunk/libconvert-color-perl/Changes (original)
+++ trunk/libconvert-color-perl/Changes Sat Apr 30 12:46:39 2011
@@ -1,4 +1,11 @@
Revision history for Convert-Color
+
+0.08 CHANGES:
+ * Fix VGA colours so the indices agree with VT100/ANSI colour
+ numbering
+ * Don't rely on rgb8:255,255,255 as X11 being called 'white' during
+ testing
+ * Added an example script for generating gradients
0.07 CHANGES:
* Add warnings in 'deprecated' category for AUTOLOAD and COLOR_SPACE
Modified: trunk/libconvert-color-perl/LICENSE
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconvert-color-perl/LICENSE?rev=73849&op=diff
==============================================================================
--- trunk/libconvert-color-perl/LICENSE (original)
+++ trunk/libconvert-color-perl/LICENSE Sat Apr 30 12:46:39 2011
@@ -1,4 +1,4 @@
-This software is copyright (c) 2010 by Paul Evans <leonerd at leonerd.org.uk>.
+This software is copyright (c) 2011 by Paul Evans <leonerd at leonerd.org.uk>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
@@ -12,7 +12,7 @@
--- The GNU General Public License, Version 1, February 1989 ---
-This software is Copyright (c) 2010 by Paul Evans <leonerd at leonerd.org.uk>.
+This software is Copyright (c) 2011 by Paul Evans <leonerd at leonerd.org.uk>.
This is free software, licensed under:
@@ -270,7 +270,7 @@
--- The Artistic License 1.0 ---
-This software is Copyright (c) 2010 by Paul Evans <leonerd at leonerd.org.uk>.
+This software is Copyright (c) 2011 by Paul Evans <leonerd at leonerd.org.uk>.
This is free software, licensed under:
Modified: trunk/libconvert-color-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconvert-color-perl/MANIFEST?rev=73849&op=diff
==============================================================================
--- trunk/libconvert-color-perl/MANIFEST (original)
+++ trunk/libconvert-color-perl/MANIFEST Sat Apr 30 12:46:39 2011
@@ -1,5 +1,6 @@
Build.PL
Changes
+examples/gradient.pl
examples/html-sample.pl
lib/Convert/Color.pm
lib/Convert/Color/CMY.pm
@@ -34,3 +35,4 @@
t/30vga.t
t/31x11.t
t/99pod.t
+META.json
Modified: trunk/libconvert-color-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconvert-color-perl/META.yml?rev=73849&op=diff
==============================================================================
--- trunk/libconvert-color-perl/META.yml (original)
+++ trunk/libconvert-color-perl/META.yml Sat Apr 30 12:46:39 2011
@@ -5,8 +5,9 @@
build_requires:
Test::More: 0
configure_requires:
- Module::Build: 0.36
-generated_by: 'Module::Build version 0.3607'
+ Module::Build: 0.38
+dynamic_config: 1
+generated_by: 'Module::Build version 0.38, CPAN::Meta::Converter version 2.110930'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -15,37 +16,37 @@
provides:
Convert::Color:
file: lib/Convert/Color.pm
- version: 0.07
+ version: 0.08
Convert::Color::CMY:
file: lib/Convert/Color/CMY.pm
- version: 0.07
+ version: 0.08
Convert::Color::CMYK:
file: lib/Convert/Color/CMYK.pm
- version: 0.07
+ version: 0.08
Convert::Color::HSL:
file: lib/Convert/Color/HSL.pm
- version: 0.07
+ version: 0.08
Convert::Color::HSV:
file: lib/Convert/Color/HSV.pm
- version: 0.07
+ version: 0.08
Convert::Color::RGB:
file: lib/Convert/Color/RGB.pm
- version: 0.07
+ version: 0.08
Convert::Color::RGB16:
file: lib/Convert/Color/RGB16.pm
- version: 0.07
+ version: 0.08
Convert::Color::RGB8:
file: lib/Convert/Color/RGB8.pm
- version: 0.07
+ version: 0.08
Convert::Color::VGA:
file: lib/Convert/Color/VGA.pm
- version: 0.07
+ version: 0.08
Convert::Color::X11:
file: lib/Convert/Color/X11.pm
- version: 0.07
+ version: 0.08
requires:
List::UtilsBy: 0
Module::Pluggable: 0
resources:
license: http://dev.perl.org/licenses/
-version: 0.07
+version: 0.08
Modified: trunk/libconvert-color-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconvert-color-perl/Makefile.PL?rev=73849&op=diff
==============================================================================
--- trunk/libconvert-color-perl/Makefile.PL (original)
+++ trunk/libconvert-color-perl/Makefile.PL Sat Apr 30 12:46:39 2011
@@ -1,4 +1,4 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.3607
+# Note: this file was auto-generated by Module::Build::Compat version 0.3800
use ExtUtils::MakeMaker;
WriteMakefile
(
Modified: trunk/libconvert-color-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconvert-color-perl/debian/changelog?rev=73849&op=diff
==============================================================================
--- trunk/libconvert-color-perl/debian/changelog (original)
+++ trunk/libconvert-color-perl/debian/changelog Sat Apr 30 12:46:39 2011
@@ -1,3 +1,9 @@
+libconvert-color-perl (0.08-1) UNRELEASED; urgency=low
+
+ * New upstream release
+
+ -- Maximilian Gass <mxey at cloudconnected.org> Sat, 30 Apr 2011 14:45:24 +0200
+
libconvert-color-perl (0.07-1) unstable; urgency=low
[ Angel Abad ]
Modified: trunk/libconvert-color-perl/lib/Convert/Color.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconvert-color-perl/lib/Convert/Color.pm?rev=73849&op=diff
==============================================================================
--- trunk/libconvert-color-perl/lib/Convert/Color.pm (original)
+++ trunk/libconvert-color-perl/lib/Convert/Color.pm Sat Apr 30 12:46:39 2011
@@ -16,7 +16,7 @@
search_path => [ 'Convert::Color' ];
my @plugins = Convert::Color->plugins;
-our $VERSION = '0.07';
+our $VERSION = '0.08';
=head1 NAME
@@ -439,11 +439,10 @@
};
}
-# Keep perl happy; keep Britain tidy
-1;
-
-__END__
-
=head1 AUTHOR
Paul Evans <leonerd at leonerd.org.uk>
+
+=cut
+
+0x55AA;
Modified: trunk/libconvert-color-perl/lib/Convert/Color/CMY.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconvert-color-perl/lib/Convert/Color/CMY.pm?rev=73849&op=diff
==============================================================================
--- trunk/libconvert-color-perl/lib/Convert/Color/CMY.pm (original)
+++ trunk/libconvert-color-perl/lib/Convert/Color/CMY.pm Sat Apr 30 12:46:39 2011
@@ -13,7 +13,7 @@
use Carp;
-our $VERSION = '0.07';
+our $VERSION = '0.08';
=head1 NAME
@@ -140,11 +140,6 @@
$class->new( 1 - $r, 1 - $g, 1 - $b );
}
-# Keep perl happy; keep Britain tidy
-1;
-
-__END__
-
=head1 SEE ALSO
=over 4
@@ -166,3 +161,7 @@
=head1 AUTHOR
Paul Evans <leonerd at leonerd.org.uk>
+
+=cut
+
+0x55AA;
Modified: trunk/libconvert-color-perl/lib/Convert/Color/CMYK.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconvert-color-perl/lib/Convert/Color/CMYK.pm?rev=73849&op=diff
==============================================================================
--- trunk/libconvert-color-perl/lib/Convert/Color/CMYK.pm (original)
+++ trunk/libconvert-color-perl/lib/Convert/Color/CMYK.pm Sat Apr 30 12:46:39 2011
@@ -15,7 +15,7 @@
use Carp;
-our $VERSION = '0.07';
+our $VERSION = '0.08';
=head1 NAME
@@ -201,11 +201,6 @@
return $class->new_cmy( $cmy->cyan, $cmy->magenta, $cmy->yellow );
}
-# Keep perl happy; keep Britain tidy
-1;
-
-__END__
-
=head1 SEE ALSO
=over 4
@@ -223,3 +218,7 @@
=head1 AUTHOR
Paul Evans <leonerd at leonerd.org.uk>
+
+=cut
+
+0x55AA;
Modified: trunk/libconvert-color-perl/lib/Convert/Color/HSL.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconvert-color-perl/lib/Convert/Color/HSL.pm?rev=73849&op=diff
==============================================================================
--- trunk/libconvert-color-perl/lib/Convert/Color/HSL.pm (original)
+++ trunk/libconvert-color-perl/lib/Convert/Color/HSL.pm Sat Apr 30 12:46:39 2011
@@ -13,7 +13,7 @@
use Carp;
-our $VERSION = '0.07';
+our $VERSION = '0.08';
=head1 NAME
@@ -180,11 +180,6 @@
return $class->new( $hue, $s, $l );
}
-# Keep perl happy; keep Britain tidy
-1;
-
-__END__
-
=head1 SEE ALSO
=over 4
@@ -202,3 +197,7 @@
=head1 AUTHOR
Paul Evans <leonerd at leonerd.org.uk>
+
+=cut
+
+0x55AA;
Modified: trunk/libconvert-color-perl/lib/Convert/Color/HSV.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconvert-color-perl/lib/Convert/Color/HSV.pm?rev=73849&op=diff
==============================================================================
--- trunk/libconvert-color-perl/lib/Convert/Color/HSV.pm (original)
+++ trunk/libconvert-color-perl/lib/Convert/Color/HSV.pm Sat Apr 30 12:46:39 2011
@@ -13,7 +13,7 @@
use Carp;
-our $VERSION = '0.07';
+our $VERSION = '0.08';
=head1 NAME
@@ -185,11 +185,6 @@
);
}
-# Keep perl happy; keep Britain tidy
-1;
-
-__END__
-
=head1 SEE ALSO
=over 4
@@ -207,3 +202,7 @@
=head1 AUTHOR
Paul Evans <leonerd at leonerd.org.uk>
+
+=cut
+
+0x55AA;
Modified: trunk/libconvert-color-perl/lib/Convert/Color/HueBased.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconvert-color-perl/lib/Convert/Color/HueBased.pm?rev=73849&op=diff
==============================================================================
--- trunk/libconvert-color-perl/lib/Convert/Color/HueBased.pm (original)
+++ trunk/libconvert-color-perl/lib/Convert/Color/HueBased.pm Sat Apr 30 12:46:39 2011
@@ -44,5 +44,4 @@
return ( $hue, $min, $max );
}
-# Keep perl happy; keep Britain tidy
-1;
+0x55AA;
Modified: trunk/libconvert-color-perl/lib/Convert/Color/RGB.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconvert-color-perl/lib/Convert/Color/RGB.pm?rev=73849&op=diff
==============================================================================
--- trunk/libconvert-color-perl/lib/Convert/Color/RGB.pm (original)
+++ trunk/libconvert-color-perl/lib/Convert/Color/RGB.pm Sat Apr 30 12:46:39 2011
@@ -1,7 +1,7 @@
# You may distribute under the terms of either the GNU General Public License
# or the Artistic License (the same terms as Perl itself)
#
-# (C) Paul Evans, 2009 -- leonerd at leonerd.org.uk
+# (C) Paul Evans, 2009-2011 -- leonerd at leonerd.org.uk
package Convert::Color::RGB;
@@ -13,7 +13,7 @@
use Carp;
-our $VERSION = '0.07';
+our $VERSION = '0.08';
=head1 NAME
@@ -208,10 +208,19 @@
return $dr*$dr + $dg*$dg + $db*$db;
}
-# Keep perl happy; keep Britain tidy
-1;
-
-__END__
+=head1 EXAMPLES
+
+=head2 Generating Gradients
+
+The C<alpha_blend> method can be used to generate a smooth gradient between
+two colours.
+
+ use Convert::Color;
+
+ my $blue = Convert::Color->new("vga:blue");
+ my $cyan = Convert::Color->new("vga:cyan");
+
+ say $blue->alpha_blend( $cyan, $_/10 )->as_rgb8->hex for 0 .. 10
=head1 SEE ALSO
@@ -234,3 +243,7 @@
=head1 AUTHOR
Paul Evans <leonerd at leonerd.org.uk>
+
+=cut
+
+0x55AA;
Modified: trunk/libconvert-color-perl/lib/Convert/Color/RGB16.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconvert-color-perl/lib/Convert/Color/RGB16.pm?rev=73849&op=diff
==============================================================================
--- trunk/libconvert-color-perl/lib/Convert/Color/RGB16.pm (original)
+++ trunk/libconvert-color-perl/lib/Convert/Color/RGB16.pm Sat Apr 30 12:46:39 2011
@@ -13,7 +13,7 @@
use Carp;
-our $VERSION = '0.07';
+our $VERSION = '0.08';
=head1 NAME
@@ -271,11 +271,6 @@
return $dr*$dr + $dg*$dg + $db*$db;
}
-# Keep perl happy; keep Britain tidy
-1;
-
-__END__
-
=head1 SEE ALSO
=over 4
@@ -289,3 +284,7 @@
=head1 AUTHOR
Paul Evans <leonerd at leonerd.org.uk>
+
+=cut
+
+0x55AA;
Modified: trunk/libconvert-color-perl/lib/Convert/Color/RGB8.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconvert-color-perl/lib/Convert/Color/RGB8.pm?rev=73849&op=diff
==============================================================================
--- trunk/libconvert-color-perl/lib/Convert/Color/RGB8.pm (original)
+++ trunk/libconvert-color-perl/lib/Convert/Color/RGB8.pm Sat Apr 30 12:46:39 2011
@@ -13,7 +13,7 @@
use Carp;
-our $VERSION = '0.07';
+our $VERSION = '0.08';
=head1 NAME
@@ -272,11 +272,6 @@
return $dr*$dr + $dg*$dg + $db*$db;
}
-# Keep perl happy; keep Britain tidy
-1;
-
-__END__
-
=head1 SEE ALSO
=over 4
@@ -290,3 +285,7 @@
=head1 AUTHOR
Paul Evans <leonerd at leonerd.org.uk>
+
+=cut
+
+0x55AA;
Modified: trunk/libconvert-color-perl/lib/Convert/Color/VGA.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconvert-color-perl/lib/Convert/Color/VGA.pm?rev=73849&op=diff
==============================================================================
--- trunk/libconvert-color-perl/lib/Convert/Color/VGA.pm (original)
+++ trunk/libconvert-color-perl/lib/Convert/Color/VGA.pm Sat Apr 30 12:46:39 2011
@@ -1,7 +1,7 @@
# You may distribute under the terms of either the GNU General Public License
# or the Artistic License (the same terms as Perl itself)
#
-# (C) Paul Evans, 2009,2010 -- leonerd at leonerd.org.uk
+# (C) Paul Evans, 2009-2011 -- leonerd at leonerd.org.uk
package Convert::Color::VGA;
@@ -13,7 +13,7 @@
use Carp;
-our $VERSION = '0.07';
+our $VERSION = '0.08';
=head1 NAME
@@ -42,12 +42,12 @@
basic VGA colors. Their names are
black
+ red
+ green
+ yellow
blue
- green
+ magenta
cyan
- red
- magenta
- yellow
white
They may be looked up either by name, or by numerical index within this list.
@@ -56,18 +56,18 @@
my %vga_colors = (
black => [ 0, 0, 0 ],
+ red => [ 1, 0, 0 ],
+ green => [ 0, 1, 0 ],
+ yellow => [ 1, 1, 0 ],
blue => [ 0, 0, 1 ],
- green => [ 0, 1, 0 ],
+ magenta => [ 1, 0, 1 ],
cyan => [ 0, 1, 1 ],
- red => [ 1, 0, 0 ],
- magenta => [ 1, 0, 1 ],
- yellow => [ 1, 1, 0 ],
white => [ 1, 1, 1 ],
);
# Also indexes
my @vga_colors = qw(
- black blue green cyan red magenta yellow white
+ black red green yellow blue magenta cyan white
);
__PACKAGE__->register_palette(
@@ -150,11 +150,6 @@
return $vga_colors[$self->index];
}
-# Keep perl happy; keep Britain tidy
-1;
-
-__END__
-
=head1 SEE ALSO
=over 4
@@ -168,3 +163,7 @@
=head1 AUTHOR
Paul Evans <leonerd at leonerd.org.uk>
+
+=cut
+
+0x55AA;
Modified: trunk/libconvert-color-perl/lib/Convert/Color/X11.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconvert-color-perl/lib/Convert/Color/X11.pm?rev=73849&op=diff
==============================================================================
--- trunk/libconvert-color-perl/lib/Convert/Color/X11.pm (original)
+++ trunk/libconvert-color-perl/lib/Convert/Color/X11.pm Sat Apr 30 12:46:39 2011
@@ -1,7 +1,7 @@
# You may distribute under the terms of either the GNU General Public License
# or the Artistic License (the same terms as Perl itself)
#
-# (C) Paul Evans, 2009,2010 -- leonerd at leonerd.org.uk
+# (C) Paul Evans, 2009-2011 -- leonerd at leonerd.org.uk
package Convert::Color::X11;
@@ -13,7 +13,7 @@
use Carp;
-our $VERSION = '0.07';
+our $VERSION = '0.08';
# Different systems put it in different places. We'll try all of them taking
# the first we find
@@ -84,8 +84,8 @@
=head2 @colors = Convert::Color::X11->colors
-Returns a list of the defined color names. This is a list of hash keys, so is
-returned in no particular order.
+Returns a list of the defined color names, in the order they were found in the
+F<rgb.txt> file.
=head2 $num_colors = Convert::Color::X11->colors
@@ -159,11 +159,6 @@
return $self->[3];
}
-# Keep perl happy; keep Britain tidy
-1;
-
-__END__
-
=head1 SEE ALSO
=over 4
@@ -177,3 +172,7 @@
=head1 AUTHOR
Paul Evans <leonerd at leonerd.org.uk>
+
+=cut
+
+0x55AA;
Modified: trunk/libconvert-color-perl/t/30vga.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconvert-color-perl/t/30vga.t?rev=73849&op=diff
==============================================================================
--- trunk/libconvert-color-perl/t/30vga.t (original)
+++ trunk/libconvert-color-perl/t/30vga.t Sat Apr 30 12:46:39 2011
@@ -13,7 +13,7 @@
is( $red->blue, 0, 'red blue' );
is( $red->name, "red", 'red name' );
-is( $red->index, 4, 'red index' );
+is( $red->index, 1, 'red index' );
is_deeply( [ $red->as_rgb8->rgb8 ], [ 255, 0, 0 ], 'red as_rgb8' );
@@ -37,4 +37,4 @@
my $best_red = $darkred->as_vga;
is( $best_red->name, "red", 'best red name' );
-is( $best_red->index, 4, 'best red index' );
+is( $best_red->index, 1, 'best red index' );
Modified: trunk/libconvert-color-perl/t/31x11.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconvert-color-perl/t/31x11.t?rev=73849&op=diff
==============================================================================
--- trunk/libconvert-color-perl/t/31x11.t (original)
+++ trunk/libconvert-color-perl/t/31x11.t Sat Apr 30 12:46:39 2011
@@ -6,7 +6,7 @@
require Test::More;
if( eval { Convert::Color::X11->colors; 1 } ) {
- import Test::More tests => 11;
+ import Test::More tests => 12;
}
else {
import Test::More skip_all => "Cannot load X11 rgb.txt database";
@@ -34,4 +34,9 @@
my $white = Convert::Color::RGB8->new( 255, 255, 255 )->as_x11;
-is( $white->name, "white", 'white from RGB8 name' );
+# It's not quite guaranteed that this is "white", as some rgb.txt files might
+# contain other names with the same value, such as "Gray100"
+# https://rt.cpan.org/Ticket/Display.html?id=66544
+
+isa_ok( $white, "Convert::Color::X11", '$white' );
+is_deeply( [ $white->as_rgb8->rgb8 ], [ 255, 255, 255 ], 'white as_rgb8' );
More information about the Pkg-perl-cvs-commits
mailing list