Added some test cases ....
[phpCairo.git] / testcases / phpCairo / rectangle-rounding-error.php
blobc04f6f1ae7c673da10c2a37fea93267adc9eda95
1 <?
2 $sur = new CairoImageSurface(FORMAT_ARGB32, 76,76);
3 $con = new CairoContext($sur);
5 $con->set_source_rgb ( 1, 1, 1);
6 $con->paint ();
7 $con->set_antialias (ANTIALIAS_NONE);
8 $con->set_source_rgb ( 0, 0, 0);
10 $con->translate( -300, -300);
11 $con->scale( 677.0/26, 677.0/26);
12 $con->translate( 1, 1);
13 $con->rectangle( 11, 11, 1, 1);
14 $con->rectangle( 11, 12, 1, 1);
15 $con->rectangle( 12, 11, 1, 1);
16 $con->rectangle( 12, 12, 1, 1);
17 $con->set_source_rgb( 0, 0, 0);
18 $con->fill();
20 $sur->write_to_png("rectangle-rounding-error-php.png");