1 | <?php |
||
2 | |||
3 | use Cairo\Context; |
||
0 ignored issues
–
show
|
|||
4 | use Cairo\Matrix; |
||
0 ignored issues
–
show
The type
Cairo\Matrix 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\Pattern\Surface as PatternSurface; |
||
0 ignored issues
–
show
The type
Cairo\Pattern\Surface 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\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 ![]() |
|||
7 | 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 ![]() |
|||
8 | |||
9 | $data = ''; |
||
10 | |||
11 | $surface = new Image(ImageFormat::ARGB32, 10, 10); |
||
12 | $context = new Context($surface); |
||
13 | |||
14 | for ($i = 0; $i < 4; $i++) |
||
15 | { |
||
16 | $data = $data.chr(0x80); |
||
17 | $data = $data.chr(0x00); |
||
18 | $data = $data.chr(0x00); |
||
19 | $data = $data.chr(0x00); |
||
20 | } |
||
21 | |||
22 | $s = new Image(ImageFormat::ARGB32, 1, 1); |
||
23 | $s->createForData($data, ImageFormat::ARGB32, 2, 2, 8); |
||
24 | $pat = new PatternSurface($s); |
||
25 | |||
26 | $context->setSourceRgb(1, 0, 0); |
||
27 | $context->save(); |
||
28 | $context->translate(2, 2); |
||
29 | $context->mask($pat); |
||
30 | $context->restore(); |
||
31 | |||
32 | $matrix = new Matrix(); |
||
33 | $matrix->translate(-4, -4); |
||
34 | $pat->setMatrix($matrix); |
||
35 | |||
36 | $context->mask($pat); |
||
37 | $context->translate(2, 2); |
||
38 | $context->mask($pat); |
||
39 | |||
40 | $surface->writeToPng(dirname(__FILE__).'/mask-ctm-php.png'); |
||
41 |
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