swen100 /
cairo
| 1 | <?php |
||
| 2 | |||
| 3 | use Cairo\Context; |
||
|
0 ignored issues
–
show
|
|||
| 4 | use Cairo\FillRule; |
||
|
0 ignored issues
–
show
The type
Cairo\FillRule 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 Loading history...
|
|||
| 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 Loading history...
|
|||
| 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 Loading history...
|
|||
| 7 | |||
| 8 | $starsize = 20; |
||
| 9 | |||
| 10 | $surface = new Image(ImageFormat::ARGB32, $starsize * 2 + 2, $starsize + 2); |
||
| 11 | $context = new Context($surface); |
||
| 12 | $context->setSourceRgb(1, 0, 0); |
||
| 13 | $context->translate(1, 1); |
||
| 14 | $context->save(); |
||
| 15 | |||
| 16 | $context->moveTo(10, 0); |
||
| 17 | $context->relLineTo(6, 20); |
||
| 18 | $context->relLineTo(-16, -12); |
||
| 19 | $context->relLineTo(20, 0); |
||
| 20 | $context->relLineTo(-16, 12); |
||
| 21 | |||
| 22 | $context->setFillRule(FillRule::WINDING); |
||
| 23 | $context->clip(); |
||
| 24 | $context->paint(); |
||
| 25 | |||
| 26 | $context->restore(); |
||
| 27 | $context->translate($starsize + 1, 0); |
||
| 28 | $context->save(); |
||
| 29 | |||
| 30 | $context->moveTo(10, 0); |
||
| 31 | $context->relLineTo(6, 20); |
||
| 32 | $context->relLineTo(-16, -12); |
||
| 33 | $context->relLineTo(20, 0); |
||
| 34 | $context->relLineTo(-16, 12); |
||
| 35 | |||
| 36 | $context->setFillRule(FillRule::EVEN_ODD); |
||
| 37 | $context->clip(); |
||
| 38 | $context->paint(); |
||
| 39 | |||
| 40 | $context->restore(); |
||
| 41 | $surface->writeToPng(dirname(__FILE__).'/clip-fill-rule-php.png'); |
||
| 42 | |||
| 43 | |||
| 44 |
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