]> git.imager.perl.org - imager.git/blobdiff - lib/Imager/Draw.pod
fix for rt 62855
[imager.git] / lib / Imager / Draw.pod
index 9e3632b7a59e5234f71fc94cb78b2bb67f0d1243..4138968080a7eb370280d934d0375fb399177315 100644 (file)
@@ -95,6 +95,15 @@ values, for example:
   $image->line(..., color=>'#FF0000');
   $image->flood_fill(..., color=>[ 255, 0, 255 ]);
 
+While supplying colors as names, array references or CSS color
+specifiers is convenient, for maximum performance you should supply
+the color as an L<Imager::Color> object:
+
+  my @colors = map Imager::Color->new($_), qw/red green blue/
+  for my $i (1..1000) {
+    $image->box(..., color => $colors[rand @colors]);
+  }
+
 =head2 Fill Parameters
 
 X<fill parameters>All filled primitives, i.e. C<arc()>, C<box()>,