Issues (331)

examples/close-path.php (3 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\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
$surface = new Image(ImageFormat::ARGB32, 32, 16);
8
$context = new Context($surface);
9
10
$context->save();
11
$context->setSourceRgb(1, 1, 1);
12
$context->paint();
13
$context->restore();
14
15
$context->arc(8, 8, 4, 0, M_PI);
16
$context->closePath();
17
$context->arc(8, 8, 4, M_PI, 2 * M_PI);
18
$context->fill();
19
20
$context->translate(16, 0);
21
$context->moveTo(8, 4);
22
$context->arcNegative(8, 8, 4, 3 * M_PI / 2, M_PI / 2);
23
$context->closePath();
24
$context->curveTo(12, 4, 12, 12, 8, 12);
25
26
$path = $context->copyPathFlat();
27
$context->newPath();
28
$context->appendPath($path);
29
$context->fill();
30
31
$surface->writeToPng(dirname(__FILE__).'/close-path-php.png');
32
33
34