hash); if ($the_name == $the_block->hash) $the_name =''; $bandeau = 50; $marge = 25; $text_border = 20; $width = GRAPH_WIDTH; $height = GRAPH_HEIGHT; $img_w = $marge + ($width*2) + (2*$text_border); $img_h = $marge + ($height*2) + (2*$bandeau); // création d'une image plus haute pour inclure bandeaux haut et bas $img = imagecreatetruecolor( $img_w, $img_h); $param_header = blockchain::DrawBlockHeaderFooter($the_block, $img, $bandeau); $tr_color = $param_header[0]; $fond = $param_header[1]; $font = $param_header[3]; $fontColor = $param_header[2]; // Les parties du block : outputs, fees, reward topisto_treemap::DrawBlock($the_block, $img, $text_border+0, $bandeau,$marge+($width*2), $height, $mode, 1); topisto_treemap::DrawBlock($the_block, $img, $text_border+0, $marge+$height + $bandeau, $width, $height, $mode, 3); topisto_treemap::DrawBlock($the_block, $img, $text_border+$marge+$width, $marge+$height + $bandeau, $width, $height, $mode, 4); imagefilledrectangle($img, 0, $bandeau, $text_border, $img_h-$bandeau, $fond); imagefilledrectangle($img, $img_w-$text_border, $bandeau, $img_w, $img_h-$bandeau, $fond); imagefilledrectangle($img, $text_border+$width, $bandeau + $height, $text_border+$marge+$width, $img_h-$bandeau, $fond); imagefilledrectangle($img, 0, $bandeau+$height, $img_w - $text_border, $bandeau+$marge+$height, $fond); // Les textes $the_texte = "Outputs : ".$the_block->topisto_inputs; imagettftext($img,15, 90, $text_border-3, $bandeau+$height, $fontColor, $font, $the_texte); $the_texte = "Fees : ".$the_block->topisto_fees; imagettftext($img,15, 90, $text_border-3, $bandeau+(2*$height)+$marge-3, $fontColor, $font, $the_texte); $the_texte = "Reward : ".$the_block->topisto_reward; imagettftext($img,15, 90, $text_border+$width+$marge-3, $bandeau+(2*$height)+$marge-3, $fontColor, $font, $the_texte); imagepng($img, DATA_PATH.'/full_treemap/'.$the_block->hash.'.png'); imagedestroy($img); ?>