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 | $surface = new Image(ImageFormat::ARGB32, 10, 20); |
||
8 | $context = new Context($surface); |
||
9 | $context->translate(1.0, 1.0); |
||
10 | $context->setSourceRgb(1, 0, 0); /* red */ |
||
11 | |||
12 | /* First draw the desired shape with a fill */ |
||
13 | $context->rectangle(0.5, 0.5, 4.0, 4.0); |
||
14 | $context->rectangle(3.5, 3.5, 4.0, 4.0); |
||
15 | $context->rectangle(3.5, 1.5, -2.0, 2.0); |
||
16 | $context->rectangle(6.5, 4.5, -2.0, 2.0); |
||
17 | $context->fill(); |
||
18 | |||
19 | /* Then try the same thing with a stroke */ |
||
20 | $context->translate(0, 10); |
||
21 | $context->moveTo(1.0, 1.0); |
||
22 | $context->relLineTo(3.0, 0.0); |
||
23 | $context->relLineTo(0.0, 6.0); |
||
24 | $context->relLineTo(3.0, 0.0); |
||
25 | $context->relLineTo(0.0, -3.0); |
||
26 | $context->relLineTo(-6.0, 0.0); |
||
27 | $context->closePath(); |
||
28 | |||
29 | $context->setLineWidth(1.0); |
||
30 | $context->stroke(); |
||
31 | |||
32 | $surface->writeToPng(dirname(__FILE__).'/self-intersecting-php.png'); |
||
33 |
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