Issues (331)

examples/dash-curve.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
$dash = [20.0, 20.0];
9
10
$surface = new Image(ImageFormat::ARGB32, 25 * 60, 4 * 60);
11
$context = new Context($surface);
12
13
$context->setSourceRgb(0, 0, 0);
14
$context->paint();
15
16
for ($a = 0; $a < 4; $a++)
17
{
18
	for ($b = 0; $b < 5; $b++)
19
	{
20
		for ($c = 0; $c < 5; $c++)
21
		{
22
			$context->moveTo((($b * 5) + $c) * 60 + 10, $a * 60 + 10);
23
			$context->relCurveTo(0, $b * 10, 0, $b * 10, $c * 10, $b * 10);
24
			$context->setSourceRgb(1, 1, 1);
25
			$context->setLineWidth(8);
26
			$context->setLineCap(LineCap::ROUND);
27
			$context->setDash($dash, $a * 10);
28
			$context->strokePreserve();
29
			$context->setSourceRgb(0, 0.5, 1);
30
			$context->setLineWidth(2);
31
			$context->setLineCap(2);
32
			$ar = [8.0, 8.0];
33
			$context->setDash($ar, 0);
34
			$context->stroke();
35
		}
36
	}
37
}
38
39
$surface->writeToPng(dirname(__FILE__).'/dash-curve-php.png');
40