Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 19 lines (17 sloc) 0.658 kB
a5eaf6b @openaki Starting Tag for examples changed from <? to <?php
openaki authored
1 <?php
a94f59b @mgdm Fix major flaws in examples, some specifics and warnings remain
mgdm authored
2 $sur = new CairoImageSurface(CairoFormat::ARGB32, 256 + 32*2, 192 + 32*2);
804a66b @openaki Adding examples ....
openaki authored
3 $con = new CairoContext($sur);
a94f59b @mgdm Fix major flaws in examples, some specifics and warnings remain
mgdm authored
4 $s = new CairoImageSurface(CairoFormat::ARGB32,100, 100);
0e31a6f @auroraeosrose Fixed last remaining warning, use absolute paths in examples, rename …
auroraeosrose authored
5 $s->createFromPng(dirname(__FILE__) . "/romedalen.png");
a94f59b @mgdm Fix major flaws in examples, some specifics and warnings remain
mgdm authored
6 //$s1 = new CairoImageSurface(FORMATARGB32,100, 100);
9572451 @openaki Some more changes ... created a function to get ce for path and matrix
openaki authored
7 $s1 = $sur->createSimilar($sur->getContent(), 320, 256);
804a66b @openaki Adding examples ....
openaki authored
8 $con2 = new CairoContext($s1);
9 $con2->setSourceSurface($s, 32 ,32);
a94f59b @mgdm Fix major flaws in examples, some specifics and warnings remain
mgdm authored
10 $con2->setOperator(CairoOperator::SOURCE);
804a66b @openaki Adding examples ....
openaki authored
11 $pat = $con2->getSource();
a94f59b @mgdm Fix major flaws in examples, some specifics and warnings remain
mgdm authored
12 $pat->setExtend(CairoExtend::REPEAT);
804a66b @openaki Adding examples ....
openaki authored
13 $con2->paint();
14 $con->setSourceSurface($s1, 0, 0);
15 $con->paint();
0e31a6f @auroraeosrose Fixed last remaining warning, use absolute paths in examples, rename …
auroraeosrose authored
16 $sur->writeToPng(dirname(__FILE__) . "/extend-repeat-similar-php.png");
804a66b @openaki Adding examples ....
openaki authored
17 ?>
18
Something went wrong with that request. Please try again.