Issues (331)

examples/degenerate-arc.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\LineCap;
0 ignored issues
show
The type Cairo\LineCap 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
$surface = new Image(ImageFormat::ARGB32, 40, 40);
9
$context = new Context($surface);
10
11
$context->setSourceRgb(1, 1, 1);
12
$context->paint();
13
$context->setLineCap(LineCap::ROUND);
14
$context->setLineWidth(5);
15
$context->setSourceRgb(0, 1, 0);
16
17
for ($n = 0; $n < 8; $n++)
18
{
19
	$theta = $n * 2 * M_PI / 8;
20
	$context->newSubPath();
21
	$context->arc(20, 20, 15, $theta, $theta);
22
	$context->closePath();
23
}
24
25
$context->stroke();
26
$context->setLineWidth(2);
27
$context->setSourceRgb(0, 0, 1);
28
29
for ($n = 0; $n < 8; $n++)
30
{
31
	$theta = $n * 2 * M_PI / 8;
32
	$context->moveTo(20, 20);
33
	$context->arc(20, 20, 15, $theta, $theta);
34
	$context->closePath();
35
}
36
37
$context->stroke();
38
$context->setSourceRgb(1, 0, 0);
39
$context->arc(20, 20, 2, 0, 2 * M_PI);
40
$context->fill();
41
42
$surface->writeToPng(dirname(__FILE__).'/degenerate-arc-php.png');
43