Issues (331)

examples/clip-push-group.php (3 issues)

1
<?php
2
3
use Cairo\Context;
0 ignored issues
show
The type Cairo\Context 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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

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\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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
7
$size = 10;
8
$pad = 2;
9
10
$surface = new Image(ImageFormat::ARGB32, $size, $size);
11
$context = new Context($surface);
12
13
$context->setSourceRgb(1, 0, 0);
14
$context->paint();
15
16
$context->arc($size / 2, $size / 2, $size / 2 - $pad, 0, 2 * M_PI);
17
$context->clip();
18
$context->pushGroup();
19
$context->setSourceRgb(0, 0, 1);
20
$context->paint();
21
$context->popGroupToSource();
22
$context->paint();
23
24
$surface->writeToPng(dirname(__FILE__).'/clip-push-group-php.png');
25
26