Issues (331)

examples/leaky-dash.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
$width = 71;
8
$height = 28;
9
$surface = new Image(ImageFormat::ARGB32, $width, $height);
10
$context = new Context($surface);
11
12
$dash = [8.0, 2.0];
13
$context->setSourceRgb(1, 1, 1);
14
$context->paint();
15
$context->setSourceRgb(0., 0., 0);
16
$context->setLineWidth(2); /* This is vital to reproduce the bug. */
17
18
/* First check simple rectangles */
19
$context->rectangle(2, 2, 67, 24);
20
$context->setDash($dash, 9.0);
21
$context->stroke();
22
23
$surface->writeToPng(dirname(__FILE__).'/leaky-dash-php.png');
24