1 | <?php |
||
2 | |||
3 | use Cairo\Context; |
||
0 ignored issues
–
show
|
|||
4 | 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 ![]() |
|||
5 | 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 ![]() |
|||
6 | |||
7 | $redmask = 0x5; |
||
8 | $greenmask = 0x50; |
||
9 | |||
10 | $surface = new Image(ImageFormat::ARGB32, 20, 20); |
||
11 | $context = new Context($surface); |
||
12 | $context->setSourceRgb(0, 0, 1); |
||
13 | $context->paint(); |
||
14 | $s = new Image(ImageFormat::A1, 6400, 20); |
||
15 | $stride = $s->getStride(); |
||
16 | $height = $s->getHeight(); |
||
17 | $width = $s->getWidth(); |
||
18 | |||
19 | $data = ''; |
||
20 | |||
21 | for ($y = 0; $y < $height; $y++) |
||
22 | { |
||
23 | for ($x = 0; $x < ($width + 7) / 8; $x++) |
||
24 | { |
||
25 | $data = $data.chr(5); |
||
26 | } |
||
27 | } |
||
28 | |||
29 | $s->createForData($data, ImageFormat::A1, $width, $height, $stride); |
||
30 | $context->setSourceRgb(1, 0, 0); |
||
31 | $context->maskSurface($s); |
||
32 | $context->fill(); |
||
33 | $s = new Image(ImageFormat::A1, 20, 6400); |
||
34 | $stride = $s->getStride(); |
||
35 | $height = $s->getHeight(); |
||
36 | $width = $s->getWidth(); |
||
37 | |||
38 | $data = ''; |
||
39 | |||
40 | for ($y = 0; $y < $height; $y++) |
||
41 | { |
||
42 | for ($x = 0; $x < ($width + 7) / 8; $x++) |
||
43 | { |
||
44 | $data = $data.chr(80); |
||
45 | } |
||
46 | } |
||
47 | |||
48 | $s->createForData($data, ImageFormat::A1, $width, $height, $stride); |
||
49 | $context->setSourceRgb(0, 1, 0); |
||
50 | $context->maskSurface($s, 0, 0); |
||
51 | |||
52 | $surface->writeToPng(dirname(__FILE__).'/large-source-php.png'); |
||
53 |
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