Issues (331)

examples/over-above-source.php (4 issues)

Labels
Severity
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\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. 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\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...
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. 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...
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 / 2, $size / 2);
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
$surface->writeToPng(dirname(__FILE__).'/over-above-source-php.png');
34