2 $sur = new CairoImageSurface(FORMAT_ARGB32
, 120, 100);
3 $con = new CairoContext($sur);
5 $con->setSourceRgb ( 1, 1, 1);
8 $con->setSourceRgb ( 0, 0, 0);
9 $con->setMiterLimit (100000);
10 for ($xscale = 1; $xscale <= 1000; $xscale +
= 999)
11 for ($yscale = 1; $yscale <= 1000; $yscale +
= 999)
13 //$max_scale = ($xscale > $yscale) ? $xscale : $yscale;
14 $max_scale = max($xscale, $yscale);
17 $con->translate (50, 0);
19 $con->translate ( 0, 50);
20 $con->scale ( $xscale,$yscale);
21 $con->setLineWidth ( 10.0 / $max_scale);
22 $con->moveTo ( 10.0 / $xscale, 10.0 / $yscale);
23 $con->lineTo ( 40.0 / $xscale, 10.0 / $yscale);
24 $con->lineTo ( 10.0 / $xscale, 30.0 / $yscale);
28 $sur->writeToPng("miter-precision-php.png");