Ajout Elisabeth 2

This commit is contained in:
2022-09-10 07:31:06 +02:00
parent 0bf16e3ab5
commit 61453396d6
4 changed files with 19 additions and 8 deletions
+16 -5
View File
@@ -78,6 +78,12 @@ class blockchain
{ {
self::$special_blocks = array (); self::$special_blocks = array ();
self::$special_blocks[] = new block(
'00000000000000000001f5beb60d9ca47adf18db5136b558379ed533fc9f6c85',
753335,
'ELISABETH_2_HAS_DIED'
);
self::$special_blocks[] = new block( self::$special_blocks[] = new block(
'000000000000000000065676a19a2dfba0171b592d52f5ea7db54d45bb386400', '000000000000000000065676a19a2dfba0171b592d52f5ea7db54d45bb386400',
724697, 724697,
@@ -549,7 +555,7 @@ class blockchain
// pour splinelineblack // pour splinelineblack
[ [
[17,61,86], [17,61,86],
[254,254,254] [255,255,255]
], ],
[ [
[17,61,86], [17,61,86],
@@ -590,16 +596,18 @@ class blockchain
// Rajout des HASHES // Rajout des HASHES
$white = imagecolorallocate($vImage, 254, 254, 254); $white = imagecolorallocate($vImage, 254, 254, 254);
$black = imagecolorallocate($vImage, $color_tab[$color][1][0], $color_tab[$color][1][1], $color_tab[$color][1][2]); $fond = imagecolorallocate($vImage, 255, 255, 255);
$fond = imagecolorallocate($vImage, $color_tab[$color][0][0], $color_tab[$color][0][1], $color_tab[$color][0][2]); $black = imagecolorallocate($vImage, 0, 0, 0);
$w = imagesx($vImage); $w = imagesx($vImage);
$h = imagesy($vImage); $h = imagesy($vImage);
// On rend le blanc transparent // On rend le blanc transparent
imagecolortransparent($vImage, $white); imagecolortransparent($vImage, $white);
// On place un fond transparent // On place un fond transparent sur toute l'image
imagefilledrectangle($vImage, 0, 0, $w, $h, $white); imagefilledrectangle($vImage, 0, 0, $w, $h, $white);
// Puis un fond sur la zone de dessin...
imagefilledrectangle($vImage, 0, $hauteur, $w, $h-$hauteur, $fond);
$len = strlen($the_block->hash); $len = strlen($the_block->hash);
$ratio_w = ($w - 10) / $len; $ratio_w = ($w - 10) / $len;
@@ -704,7 +712,10 @@ class blockchain
$bbox = imagettfbbox(14, 0, $font, $the_name); $bbox = imagettfbbox(14, 0, $font, $the_name);
imagettftext($vImage, 14, 0, ($w-3)-($bbox[2]-$bbox[0]), ($hauteur-5), $black, $font, $the_name); imagettftext($vImage, 14, 0, ($w-3)-($bbox[2]-$bbox[0]), ($hauteur-5), $black, $font, $the_name);
return [$white, $fond, $black, $font, $color_tab[$color][1], $color_tab[$color][0]]; $draw = imagecolorallocate($vImage, $color_tab[$color][1][0], $color_tab[$color][1][1], $color_tab[$color][1][2]);
$fond = imagecolorallocate($vImage, $color_tab[$color][0][0], $color_tab[$color][0][1], $color_tab[$color][0][2]);
return [$white, $fond, $draw, $font, $color_tab[$color][1], $color_tab[$color][0]];
} }
public static function getTransactionData($the_block, $type=1) public static function getTransactionData($the_block, $type=1)
BIN
View File
Binary file not shown.
+2 -2
View File
@@ -53,8 +53,8 @@ function DrawBlock($the_block, $vImage, $parametres)
//if (($x2 - $x1) < ($width*0.015)) break; //if (($x2 - $x1) < ($width*0.015)) break;
//if (($y2 - $y1) < ($height*0.015)) break; //if (($y2 - $y1) < ($height*0.015)) break;
$factor=$the_block->nonce % 100; $factor=($x1*$x2*$y1*$y2) % 100;
// Je triche: les petits rectangle sont blancs // Je triche: les petits rectangles sont blancs
if (($x2 - $x1) < 6) $factor=90; if (($x2 - $x1) < 6) $factor=90;
if (($y2 - $y1) < 6) $factor=90; if (($y2 - $y1) < 6) $factor=90;