1 | <?php |
||
2 | |||
3 | use Cairo\Context; |
||
0 ignored issues
–
show
|
|||
4 | use Cairo\Filter; |
||
0 ignored issues
–
show
The type
Cairo\Filter 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, 32, 32); |
||
9 | $context = new Context($surface); |
||
10 | |||
11 | $data = ''; |
||
12 | |||
13 | for ($i = 0; $i < 2; $i++) |
||
14 | { |
||
15 | $data .= chr(0x80); |
||
16 | $data .= chr(0x80); |
||
17 | $data .= chr(0x80); |
||
18 | $data .= chr(0x80); |
||
19 | |||
20 | $data .= chr(0x80); |
||
21 | $data .= chr(0x80); |
||
22 | $data .= chr(0x80); |
||
23 | $data .= chr(0x80); |
||
24 | |||
25 | $data .= chr(0x00); |
||
26 | $data .= chr(0x00); |
||
27 | $data .= chr(0x80); |
||
28 | $data .= chr(0x80); |
||
29 | |||
30 | $data .= chr(0x00); |
||
31 | $data .= chr(0x00); |
||
32 | $data .= chr(0x80); |
||
33 | $data .= chr(0x80); |
||
34 | } |
||
35 | |||
36 | for ($i = 0; $i < 2; $i++) |
||
37 | { |
||
38 | $data .= chr(0x00); |
||
39 | $data .= chr(0x80); |
||
40 | $data .= chr(0x00); |
||
41 | $data .= chr(0x80); |
||
42 | |||
43 | $data .= chr(0x00); |
||
44 | $data .= chr(0x80); |
||
45 | $data .= chr(0x00); |
||
46 | $data .= chr(0x80); |
||
47 | |||
48 | $data .= chr(0x80); |
||
49 | $data .= chr(0x00); |
||
50 | $data .= chr(0x00); |
||
51 | $data .= chr(0x80); |
||
52 | |||
53 | $data .= chr(0x80); |
||
54 | $data .= chr(0x00); |
||
55 | $data .= chr(0x00); |
||
56 | $data .= chr(0x80); |
||
57 | } |
||
58 | |||
59 | echo $data; |
||
60 | |||
61 | $s = new Image(ImageFormat::ARGB32, 100, 100); |
||
62 | $s->createForData($data, ImageFormat::ARGB32, 4, 4, 16); |
||
63 | $context->scale(4, 4); |
||
64 | $context->setSurface($s, 2, 2); |
||
65 | $pat = $context->getPattern(); |
||
66 | $pat->setFilter(Filter::NEAREST); |
||
67 | $context->paint(); |
||
68 | |||
69 | $surface->writeToPng(dirname(__FILE__).'/paint-source-alpha-php.png'); |
||
70 |
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