Issues (331)

examples/move-to-show.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::RGB24, 2, 2);
8
$context = new Context($surface);
9
$s = new Image(ImageFormat::RGB24, 2, 2);
10
11
$c = [];
12
13
$color = '';
14
$color .= chr(0xff);
15
$color .= chr(0xff);
16
$color .= chr(0xff);
17
$color .= chr(0xff);
18
19
$c[0] = $color;
20
21
$color = '';
22
$color .= chr(0x00);
23
$color .= chr(0x00);
24
$color .= chr(0xff);
25
$color .= chr(0xff);
26
27
$c[1] = $color;
28
29
$color = '';
30
$color .= chr(0x00);
31
$color .= chr(0xff);
32
$color .= chr(0x00);
33
$color .= chr(0xff);
34
35
$c[2] = $color;
36
37
$color = '';
38
$color .= chr(0xff);
39
$color .= chr(0x00);
40
$color .= chr(0x00);
41
$color .= chr(0xff);
42
43
$c[3] = $color;
44
45
for ($i = 0; $i < 4; $i++)
46
{
47
	$s->createForData($c[$i], ImageFormat::RGB24, 1, 1, 4);
48
	$context->setSurface($s, $i % 2, $i / 2);
49
	$context->paint();
50
}
51
52
$surface->writeToPng(dirname(__FILE__).'/move-to-show-php.png');
53