swen100 /
cairo
| 1 | <?php |
||
| 2 | |||
| 3 | use Cairo\Context; |
||
|
0 ignored issues
–
show
|
|||
| 4 | use Cairo\Operator; |
||
|
0 ignored issues
–
show
The type
Cairo\Operator 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 | $size = 40; |
||
| 9 | $pad = 2; |
||
| 10 | $width = ($pad + $size + $pad); |
||
| 11 | $height = $width; |
||
| 12 | |||
| 13 | $surface = new Image(ImageFormat::ARGB32, $width, $height); |
||
| 14 | $context = new Context($surface); |
||
| 15 | |||
| 16 | $context->translate($pad, $pad); |
||
| 17 | $context->moveTo($size / 5, $size / 5); |
||
| 18 | $context->relLineTo($size / 2, 0); |
||
| 19 | $context->relLineTo($size / -2, $size / 2); |
||
| 20 | $context->closePath(); |
||
| 21 | |||
| 22 | $context->setOperator(Operator::SOURCE); |
||
| 23 | $context->setSourceRgba(1, 0, 0, 0.5); |
||
| 24 | |||
| 25 | $context->fill(); |
||
| 26 | |||
| 27 | $context->arc($size / 2, $size / 2, $size / 4, 0, 2 * M_PI); |
||
| 28 | $context->setOperator(Operator::OVER); |
||
| 29 | $context->setSourceRgba(0, 1, 0, 0.5); |
||
| 30 | |||
| 31 | $context->fill(); |
||
| 32 | |||
| 33 | $context->moveTo($size / 2, $size / 2); |
||
| 34 | $context->relLineTo($size / 2, 0); |
||
| 35 | $context->relLineTo($size / -2, $size / 2); |
||
| 36 | $context->closePath(); |
||
| 37 | |||
| 38 | $context->setOperator(Operator::SOURCE); |
||
| 39 | $context->setSourceRgba(1, 0, 0, 0.5); |
||
| 40 | |||
| 41 | $context->fill(); |
||
| 42 | |||
| 43 | $surface->writeToPng(dirname(__FILE__).'/over-between-source-php.png'); |
||
| 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