- round the pie radius down to avoid running over the edge of the
authorTony Cook <tony@develop-help.com>
Mon, 21 Apr 2008 08:29:13 +0000 (08:29 +0000)
committerTony Cook <tony@develop-help.com>
Mon, 21 Apr 2008 08:29:13 +0000 (08:29 +0000)
   image

Changes
lib/Imager/Graph/Pie.pm
testimg/t10_hlegend.png
testimg/t10_mono.png
testimg/t10_noother.png
testimg/t10_pie1.png
testimg/t10_pie2.png
testimg/t10_rad_fount.png

diff --git a/Changes b/Changes
index 0b9e82fe25250bda2954a10c6511a8c8280d5103..0965c96923dc9b02f67e606936cc2ad30c556d9d 100644 (file)
--- a/Changes
+++ b/Changes
@@ -18,6 +18,9 @@ Imager-Graph 0.06 - unreleased
    drawing zero sized segments.
    https://rt.cpan.org/Ticket/Display.html?id=34813
 
+ - round the pie radius down to avoid running over the edge of the
+   image
+
 Imager-Graph 0.05 - 17 December 2007
 =================
 
index 84047dfa736cd3c2096c7fda6343f413185a9f59..72c832207b07abe8846d09dfb59d7f9db4928607 100644 (file)
@@ -252,7 +252,7 @@ sub draw {
     int($self->_small_extent(\@chart_box) * $style->{pie}{size} * 0.5);
   my $max_width = $chart_box[2] - $chart_box[0] + $ebox[0] - $ebox[2];
   if ($radius > $max_width / 2) {
-    $radius = $max_width / 2;
+    $radius = int($max_width / 2);
   }
   $chart_box[0] -= $ebox[0];
   $chart_box[2] -= $ebox[2];
index f23633689ca07ba8a1c2e93d3b4f4a4b7a82c2c9..7844d2f937c9047ffcb66822ab30f380261584b5 100644 (file)
Binary files a/testimg/t10_hlegend.png and b/testimg/t10_hlegend.png differ
index dfa0ce62dd203d2c752a0aa025e0e79199c9360b..31f40071900d2a61f6483675f09738fc76be03c2 100644 (file)
Binary files a/testimg/t10_mono.png and b/testimg/t10_mono.png differ
index fd9f414642d36a4ad95a939e4ed69ba941520db0..d0783a3d1369d767b99c389a92d159c75e882035 100644 (file)
Binary files a/testimg/t10_noother.png and b/testimg/t10_noother.png differ
index b9a71057d8836e9eda6608c2a3d23099bce138c8..3de05b1d039420fd53928a7bd5a9e54dcefd3371 100644 (file)
Binary files a/testimg/t10_pie1.png and b/testimg/t10_pie1.png differ
index 4cb33650d80b2cae297b86a6cd66490343ac5f98..293f504b946daafc51dfeb7a7899be0b19d982a5 100644 (file)
Binary files a/testimg/t10_pie2.png and b/testimg/t10_pie2.png differ
index bbfbc4fe55996aa135b695f2f31d4bf00f1b4f1a..1edf40e824fe7771cb99cdfa2e4a0ded0aba46b9 100644 (file)
Binary files a/testimg/t10_rad_fount.png and b/testimg/t10_rad_fount.png differ