$thisDate = getDate($diagramDate); $xCoord = $diagramWidth / $daysToShow * $i; // draw day mark and day number imageLine($image, $xCoord, $diagramHeight - 25, $xCoord, $diagramHeight - 20, $colorGrid); imageString($image, 3, $xCoord - 5, $diagramHeight - 16, $thisDate["mday"], $colorGrid); $diagramDate += $nrSecondsPerDay; } // draw rectangle around diagram (marks its boundaries) imageRectangle($image, 0, 0, $diagramWidth - 1, $diagramHeight - 20, $colorGrid); // draw middle cross imageLine($image, 0, ($diagramHeight - 20) / 2, $diagramWidth, ($diagramHeight - 20) / 2, $colorCross); imageLine($image, $diagramWidth / 2, 0, $diagramWidth / 2, $diagramHeight - 20, $colorCross); // print descriptive text into the diagram imageString($image, 3, 10, 10, $TEXT['bio-birthday'] . ": {$birthDay}.{$birthMonth}.{$birthYear}", $colorCross); imageString($image, 3, 10, 26, $TEXT['bio-today'] . ": " . date("d.m.Y"), $colorCross); imageString($image, 3, 10, $diagramHeight - 42, $TEXT['bio-physical'], $colorPhysical); imageString($image, 3, 10, $diagramHeight - 58, $TEXT['bio-emotional'], $colorEmotional); imageString($image, 3, 10, $diagramHeight - 74, $TEXT['bio-intellectual'], $colorIntellectual); // now draw each curve with its appropriate parameters drawRhythm($daysGone, 23, $colorPhysical); drawRhythm($daysGone, 28, $colorEmotional); drawRhythm($daysGone, 33, $colorIntellectual); // set the content type header("Content-Type: image/png"); // create an interlaced image for better loading in the browser imageInterlace($image, 1); // mark background color as being transparent imageColorTransparent($image, $colorBackgr); // now send the picture to the client (this outputs all image data directly) imagePNG($image); exit;
$diagramDate += $nrSecondsPerDay; } # draw rectangle around diagram (marks its boundaries) $GDImage->rectangle(0, 0, $diagramWidth - 1, $diagramHeight, 1, False); # draw middle cross $GDImage->line(0, $diagramHeight / 2, $diagramWidth, $diagramHeight / 2, 1); $GDImage->line($diagramWidth / 2, 0, $diagramWidth / 2, $diagramHeight, 1); # now draw each curve with its appropriate parameters if ($P == 1) { drawRhythm($daysGone, 23); } if ($E == 1) { drawRhythm($daysGone, 28); } if ($I == 1) { drawRhythm($daysGone, 33); } # print values if ($I == 1) { $GDImage->drawtext(1, 0, 33, sprintf(Aastra_get_label('I=%+.3f', $language), $array['day']['I']), 1); } if ($E == 1) { $GDImage->drawtext(1, 51, 33, sprintf(Aastra_get_label('E=%+.3f', $language), $array['day']['E']), 1); } if ($P == 1) { $GDImage->drawtext(1, 104, 33, sprintf(Aastra_get_label('P=%+.3f', $language), $array['day']['P']), 1); } # Attach GD image $object->setGDImage($GDImage); # Create Softkeys if ($I == 1) {