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\Pattern\Surface as PatternSurface; |
||
|
0 ignored issues
–
show
The type
Cairo\Pattern\Surface 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\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...
|
|||
| 7 | 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...
|
|||
| 8 | |||
| 9 | $surface = new Image(ImageFormat::ARGB32, 5, 5); |
||
| 10 | $context = new Context($surface); |
||
| 11 | |||
| 12 | $color = ''; |
||
| 13 | $color .= chr(0x4c); |
||
| 14 | $color .= chr(0x33); |
||
| 15 | $color .= chr(0x19); |
||
| 16 | $color .= chr(0x80); |
||
| 17 | |||
| 18 | $s = new Image(ImageFormat::ARGB32, 1, 1); |
||
| 19 | $s->createForData($color, ImageFormat::ARGB32, 1, 1, 4); |
||
| 20 | |||
| 21 | $pat = new PatternSurface($s); |
||
| 22 | $pat->setExtend(Extend::REPEAT); |
||
| 23 | |||
| 24 | for ($i = 0; $i < 5; $i++) |
||
| 25 | { |
||
| 26 | switch ($i) |
||
| 27 | { |
||
| 28 | case 0: |
||
| 29 | $context->setSourceRgb(.6, .7, .8); |
||
| 30 | break; |
||
| 31 | case 1: |
||
| 32 | $context->setSourceRgba(.2, .4, .6, .5); |
||
| 33 | break; |
||
| 34 | case 2: |
||
| 35 | $context->setSourceRgba(.2, .4, .6, .5); |
||
| 36 | break; |
||
| 37 | case 3: |
||
| 38 | default: |
||
| 39 | $context->setPattern($pat); |
||
| 40 | } |
||
| 41 | |||
| 42 | $context->rectangle($i, 0, 1, 5); |
||
| 43 | $context->fill(); |
||
| 44 | } |
||
| 45 | |||
| 46 | $surface->writeToPng(dirname(__FILE__).'/set-source-php.png'); |
||
| 47 |
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