document opacity fill in changes, typo fixes, fix some alpha ->
authorTony Cook <tony@develop=help.com>
Tue, 10 Nov 2009 12:07:44 +0000 (12:07 +0000)
committerTony Cook <tony@develop=help.com>
Tue, 10 Nov 2009 12:07:44 +0000 (12:07 +0000)
opacity I missed

Changes
lib/Imager/Fill.pm
t/t20fill.t

diff --git a/Changes b/Changes
index 6f3207374dc4710adde7fda9b202fbf997f99733..07a464bf767ff2d4cb2039312677776b97f5d981 100644 (file)
--- a/Changes
+++ b/Changes
@@ -3,6 +3,9 @@ Imager release history.  Older releases can be found in Changes.old
 Imager 0.71 - unreleased
 ===========
 
+ - add the opacity fill type - an adaptor that modifies the opacity of
+   another fill.
+
 Bug fixes:
 
  - the conv filter now enforces that the sum of the coefficients is
index aca9c56d89502772a572ac111e148df97e4c680f..34786eade761df3dc4bdcd21f549c18bd6a67c96 100644 (file)
@@ -128,7 +128,7 @@ sub new {
   elsif (defined $hsh{type} && $hsh{type} eq "opacity") {
     my $other_fill = delete $hsh{other};
     unless (defined $other_fill) {
-      Imager->_set_error("'other' parameter required to create alpha fill");
+      Imager->_set_error("'other' parameter required to create opacity fill");
       return;
     }
     unless (ref $other_fill &&
@@ -142,7 +142,7 @@ sub new {
        undef $other_fill;
       }
       unless ($other_fill) {
-       Imager->_set_error("'other' parameter must be an Imager::Fill object to create an alpha fill");
+       Imager->_set_error("'other' parameter must be an Imager::Fill object to create an opacity fill");
        return;
       }
     }
@@ -187,7 +187,8 @@ sub combines {
                                 dx=>$dx, dy=>$dy);
   my $fill3 = Imager::Fill->new(fountain=>$type, ...);
   my $fill4 = Imager::Fill->new(image=>$img, ...);
-  my $fill5 = Imager::Fill->new(type => "alpha", other => $fill, alpha => ...);
+  my $fill5 = Imager::Fill->new(type => "opacity", other => $fill,
+                                opacity => ...);
 
 =head1 DESCRIPTION 
 
@@ -376,7 +377,7 @@ The matrix parameter will significantly slow down the fill.
   my $fill = Imager::Fill->new(type => "opacity",
       other => $fill, opacity => 0.25);
 
-This can be used to make a fill that is a more translucent of opaque
+This can be used to make a fill that is a more translucent or opaque
 version of an existing fill.  This is intended for use where you
 receive a fill object as a parameter and need to change the opacity.
 
index 0eee844fc3ef06fd83e08a8e1dc082a0d595c319..8e2bb21ff5bb66844b43f0079c4d543243428380 100644 (file)
@@ -568,11 +568,11 @@ SKIP:
   }
   ok(!Imager::Fill->new(type => "opacity"),
      "should fail to make an opacity fill with no other fill object");
-  is(Imager->errstr, "'other' parameter required to create alpha fill",
+  is(Imager->errstr, "'other' parameter required to create opacity fill",
      "check error message");
   ok(!Imager::Fill->new(type => "opacity", other => "xx"),
      "should fail to make an opacity fill with a bad other parameter");
-  is(Imager->errstr, "'other' parameter must be an Imager::Fill object to create an alpha fill", 
+  is(Imager->errstr, "'other' parameter must be an Imager::Fill object to create an opacity fill", 
         "check error message");
 
   # check auto conversion of hashes