swen100 /
cairo
| 1 | <?php |
||
| 2 | |||
| 3 | use Cairo\Context; |
||
|
0 ignored issues
–
show
|
|||
| 4 | use Cairo\Extend; |
||
|
0 ignored issues
–
show
The type
Cairo\Extend 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 | $surface = new Image(ImageFormat::ARGB32, 90, 90); |
||
| 9 | $context = new Context($surface); |
||
| 10 | $context->setSourceRgba(0, 0, 0, 1); |
||
| 11 | $context->rectangle(0, 0, 90, 90); |
||
| 12 | $context->fill(); |
||
| 13 | |||
| 14 | $surfaceSize = (90 - 30) / 10; |
||
| 15 | |||
| 16 | $surface = new Image(ImageFormat::RGB24, $surfaceSize, $surfaceSize); |
||
| 17 | $con2 = new Context($surface); |
||
| 18 | $con2->setSourceRgb(1, 1, 1); |
||
| 19 | $con2->rectangle(0, 0, $surfaceSize / 2, $surfaceSize / 2); |
||
| 20 | $con2->fill(); |
||
| 21 | $con2->setSourceRgb(1, 0, 0); |
||
| 22 | $con2->rectangle($surfaceSize / 2, 0, $surfaceSize / 2, $surfaceSize / 2); |
||
| 23 | $con2->fill(); |
||
| 24 | $con2->setSourceRgb(0, 1, 0); |
||
| 25 | $con2->rectangle(0, $surfaceSize / 2, $surfaceSize / 2, $surfaceSize / 2); |
||
| 26 | $con2->fill(); |
||
| 27 | $con2->setSourceRgb(0, 0, 1); |
||
| 28 | $con2->rectangle($surfaceSize / 2, $surfaceSize / 2, $surfaceSize / 2, $surfaceSize / 2); |
||
| 29 | $con2->fill(); |
||
| 30 | |||
| 31 | $context->scale(10, 10); |
||
| 32 | $context->setSurface($surface, 1.5, 1.5); |
||
| 33 | |||
| 34 | /* Using EXTEND_REFLECT makes this test pass for image and xlib backends */ |
||
| 35 | $pattern = $context->getPattern(); |
||
| 36 | $pattern->setExtend(Extend::PAD); |
||
| 37 | $context->rectangle(1.5, 1.5, 6, 6); |
||
| 38 | $context->clip(); |
||
| 39 | $context->setPattern($pattern); |
||
| 40 | $context->paint(); |
||
| 41 | $surface->writeToPng(dirname(__FILE__).'/extend-pad-php.png'); |
||
| 42 | |||
| 43 | |||
| 44 | |||
| 45 | |||
| 46 |
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