update page now

Voting

: min(zero, seven)?
(Example: nine)

The Note You're Voting On

paulcharltonthomson at hotmail dot com
20 years ago
Here's a slightly better way to get the colours for the pie chart shaded wall as posted by double-zonk at wp dot pl

<?php

$rgb0 = array (255, 153, 204); 
$rgb1 = array (255, 153, 0); 
$rgb2 = array (153, 204, 0); 
$rgb3 = array (51, 153, 102); 
$rgb4 = array (51, 204, 204); 
$rgb5 = array (51, 102, 255); 
$rgb6 = array (128, 0, 128); 
$rgb7 = array (150, 150, 150); 

for ($r = 0; $r < 8; ++$r)
    { 
        if(${"rgb" . $r}[0] < 50) $shadowr = 0; else $shadowr = ${"rgb" . $r}[0] - 50; 
        if(${"rgb" . $r}[1] < 50) $shadowg = 0; else $shadowg = ${"rgb" . $r}[1] - 50; 
        if(${"rgb" . $r}[2] < 50) $shadowb = 0; else $shadowb = ${"rgb" . $r}[2] - 50; 
        ${"wall" . $r} = array ($shadowr, $shadowg, $shadowb); 
    } 

for ($s = 0; $s < 8; ++$s)
    { 
        $kolor[$s] = imagecolorallocate($image, ${"rgb" . $s}[0], ${"rgb" . $s}[1], ${"rgb" . $s}[2]); 
        $cien[$s] = imagecolorallocate($image, ${"wall" . $s}[0], ${"wall" . $s}[1], ${"wall" . $s}[2]); 
    } 

?>

<< Back to user notes page

To Top