2 $sur = new CairoImageSurface(FORMAT_ARGB32
, 6, 6);
3 $con = new CairoContext($sur);
29 for($i=0; $i<2;$i++
) {
51 $con->set_source_rgb(0,0,0);
54 $s = new CairoImageSurface(FORMAT_ARGB32
, 100,100);
55 $s->create_from_data($data, FORMAT_RGB24
, 4, 4, 16);
56 //$con->test_paint_checkered();
58 $con->set_source_surface($s,4,4);
59 $pat = $con->get_source();
60 $pat->set_filter( FILTER_NEAREST
);
63 $sur->write_to_png("scale-down-source-surface-paint-php.png");