Issues (331)

examples/a1-traps-sample.php (4 issues)

Labels
Severity
1
<?php
2
3
use Cairo\Antialias;
0 ignored issues
show
The type Cairo\Antialias 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\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...
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
$points = 10;
9
$step = 1.0 / $points;
10
$pad = 1;
11
$width = ($pad + ($points * 2) + $pad);
12
$height = $width;
13
14
$surface = new Image(ImageFormat::ARGB32, $width, $height);
15
$context = new Context($surface);
16
$context->setSourceRgb(1, 1, 1);
17
$context->paint();
18
$context->setSourceRgb(0, 0, 0);
19
$context->translate($pad, $pad);
20
$context->setAntialias(Antialias::NONE);
21
22
for ($i = 0; $i < $points; $i++)
23
{
24
	for ($j = 0; $j < $points; $j++)
25
	{
26
		$t1 = (2 * $i) + (($i + 1) * $step);
27
		$t2 = (2 * $j) + (($j + 1) * $step);
28
		
29
		$context->rectangle($t1, $t2, 1, 1);
30
		$context->fill();
31
	}
32
}
33
34
$surface->writeToPng(dirname(__FILE__).'/a1-traps-sample-php.png');
35
36
37