AttributionsTogether: 1 IDependOn-Set: 1 IDependOn-Set: 103 IDependOn-Set: 116 IDependOn-Set: 117 IDependOn-Set: 98 LastModifiedSecs: 1006810277 Parent: 103 SequenceNumber: 5 Title: triangle.php Part: 0 Author-Set: sauer@cloudmaster.com LastModifiedSecs: 1006810249 Type: Lines: 1 Generate an equilateral triangle on the base of an image, then positions it within a range on the bottom of the image. The image would probably be a horizontal scale with values from 0 to $range. EndPart: 0 Part: 1 Author-Set: sauer@cloudmaster.com LastModifiedSecs: 1006810268 Type: Lines: 1 http://www.cloudmaster.com/~sauer/demos/triangle.php EndPart: 1 Part: 2 Author-Set: sauer@cloudmaster.com LastModifiedSecs: 1006810277 Type: monospaced Lines: 43 = 20){ $imageName .= "_ready.png"; }else if($CENTER >= 10){ $imageName .= "_smwtrdy.png"; }else{ $imageName .= "_notrdy.png"; } list($length, $height, $type, $str) = GetImageSize($imageName); $length = $length - ($rborder + $lborder); $CENTER *= $length / $range; $CENTER += $lborder; // load the image $im = ImageCreateFromPNG($imageName); $white = ImageColorAllocate($im, 255, 255, 255); // build the image $top = $height - $tri_height; $lbott = $CENTER - ($tri_half_width); $rbott = $CENTER + ($tri_half_width); $points = array($CENTER, $top, $lbott, $height, $rbott, $height); ImageFilledPolygon($im, $points, 3, $white); // print the image ImageJPEG($im, "", $quality); ImageDestroy($im); // free up some memory ?> EndPart: 2