PageRenderTime 82ms CodeModel.GetById 40ms app.highlight 3ms RepoModel.GetById 37ms app.codeStats 1ms

/hphp/test/zend/good/ext/gd/tests/bug40764.php

http://github.com/facebook/hiphop-php
PHP | 21 lines | 17 code | 4 blank | 0 comment | 0 complexity | e638f278226cebc045e128bd8c3df521 MD5 | raw file
 1<?hh <<__EntryPoint>> function main(): void {
 2$image=imagecreatetruecolor(400, 400);
 3$white = imagecolorallocate($image, 255, 255, 255);
 4$black = imagecolorallocate($image, 0, 0, 0);
 5$red = imagecolorallocate($image, 255, 0, 0);
 6
 7imagefill($image, 0, 0, $white);
 8imagesetthickness($image, 10);
 9
10imageline($image, 200, 0, 200, 400, $black);
11imageline($image, 0, 200, 400, 200, $black);
12imageline($image, 0, 0, 392, 392, $black);
13
14imagesetthickness($image, 1);
15
16imageline($image, 200, 0, 200, 400, $red);
17imageline($image, 0, 200, 400, 200, $red);
18imageline($image, 0, 0, 392, 392, $red);
19print_r(imagecolorat($image, 195, 0));
20print_r(imagecolorat($image, 0, 195));
21}