- add a new style "primary" which is primary_red with a light grey
authorTony Cook <tony@develop-help.com>
Mon, 21 Apr 2008 06:39:54 +0000 (06:39 +0000)
committerTony Cook <tony@develop-help.com>
Mon, 21 Apr 2008 06:39:54 +0000 (06:39 +0000)
   background, and made that the default, so the default graphs aren't
   quite so ugly.

Changes
Graph.pm
t/t10pie.t
testimg/t10_pie1.png
testimg/t10_pie2.png

diff --git a/Changes b/Changes
index a2240d47371461c29246da5558e37c425ce90764..f6c20530ac89db154d3e20c485e96ac91bcc7a37 100644 (file)
--- a/Changes
+++ b/Changes
@@ -10,6 +10,10 @@ Imager-Graph 0.06 - unreleased
 
  - add horizontal legend boxes
 
+ - add a new style "primary" which is primary_red with a light grey
+   background, and made that the default, so the default graphs aren't
+   quite so ugly.
+
 Imager-Graph 0.05 - 17 December 2007
 =================
 
index 127e30490e3919a86f5c77789ba8cdd795c67c97..68d938a2df391e3623f8bb8d198fd10e47ccfe15 100644 (file)
--- a/Graph.pm
+++ b/Graph.pm
@@ -88,15 +88,22 @@ The currently defined styles are:
 
 =over
 
+=item primary
+
+a light grey background with no outlines.  Uses primary colors for the
+data fills.
+
+This is the default style.
+
 =item primary_red
 
 a light red background with no outlines.  Uses primary colors for the
-data fills.  This style is compatible with all versions of Imager.
+data fills.
 
 Graphs drawn using this style should save well as a gif, even though
 some graphs may perform a slight blur.
 
-This is the default style.
+This was the default style, but the red was too loud.
 
 =item mono
 
@@ -113,8 +120,6 @@ background, by supplying C<<bg=>'00000000', channels=>4>>.
 
 This style outlines the legend if present and outlines the hashed fills.
 
-This and following styles require versions of Imager after 0.38.
-
 =item fount_lin
 
 designed as a "pretty" style this uses linear fountain fills for the
@@ -700,10 +705,23 @@ sub _style_defs {
   \%style_defs;
 }
 
-my $def_style = 'primary_red';
+my $def_style = 'primary';
 
 my %styles =
   (
+   primary =>
+   {
+    fills=>
+    [
+     qw(FF0000 00FF00 0000FF C0C000 00C0C0 FF00FF)
+    ],
+    fg=>'000000',
+    bg=>'E0E0E0',
+    legend=>
+    {
+     #patchborder=>'000000'
+    },
+   },
    primary_red =>
    {
     fills=>
index 9e4ac2f19e3fd281496b3ffb015de0d5bb315fb3..39711b74bcd2e552d4b27c30368fdbac6dcb01e0 100644 (file)
@@ -51,7 +51,7 @@ my $img2 = $pie->draw(data=>\@data,
                      title=>{ text=>'Imager::Graph::Pie', size=>36 },
                      features=>{ labelspconly=>1, _debugblur=>1,
                                   legend=>1 },
-                      legend=>{ border=>'000000', fill=>'FF8080', },
+                      legend=>{ border=>'000000', fill=>'C0C0C0', },
                       fills=>[ qw(404040 606060 808080 A0A0A0 C0C0C0 E0E0E0) ],
                     );
 
index 9675de4c49e7c27bf47e98c7120decc710bb32f6..b9a71057d8836e9eda6608c2a3d23099bce138c8 100644 (file)
Binary files a/testimg/t10_pie1.png and b/testimg/t10_pie1.png differ
index 4186cd0f50f36ad8c2a9cc2475482db9e1c7b45e..4cb33650d80b2cae297b86a6cd66490343ac5f98 100644 (file)
Binary files a/testimg/t10_pie2.png and b/testimg/t10_pie2.png differ