1 | <?php |
||
2 | |||
3 | use Cairo\Context; |
||
0 ignored issues
–
show
|
|||
4 | use Cairo\Surface\Content; |
||
0 ignored issues
–
show
The type
Cairo\Surface\Content was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
5 | use Cairo\Surface\Image; |
||
0 ignored issues
–
show
The type
Cairo\Surface\Image was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
6 | use Cairo\Surface\ImageFormat; |
||
0 ignored issues
–
show
The type
Cairo\Surface\ImageFormat was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
7 | |||
8 | $surface = new Image(ImageFormat::ARGB32, 12, 12); |
||
9 | $context = new Context($surface); |
||
10 | $source = $surface->createSimilar(Content::COLOR_ALPHA, 12, 12); |
||
11 | $con2 = new Context($source); |
||
12 | |||
13 | /* Fill the source surface with green */ |
||
14 | $con2->setSourceRgb(0, 1, 0); |
||
15 | $con2->paint(); |
||
16 | |||
17 | /* Draw a blue square in the middle of the source with clipping, |
||
18 | * and leave the clip there. */ |
||
19 | $con2->rectangle(12 / 4, 12 / 4, 12 / 2, 12 / 2); |
||
20 | $con2->clip(); |
||
21 | $con2->setSourceRgb(0, 0, 1); |
||
22 | $con2->paint(); |
||
23 | |||
24 | /* Fill the destination surface with solid red (should not appear |
||
25 | * in final result) */ |
||
26 | $context->setSourceRgb(1, 0, 0); |
||
27 | $context->paint(); |
||
28 | |||
29 | /* Now draw the source surface onto the destination surface */ |
||
30 | $context->setSurface($source, 0, 0); |
||
31 | $context->paint(); |
||
32 | |||
33 | $surface->writeToPng(dirname(__FILE__).'/source-clip-php.png'); |
||
34 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths