Issues (331)

examples/sphere.php (5 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\Pattern\Gradient\Linear;
0 ignored issues
show
The type Cairo\Pattern\Gradient\Linear 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\Pattern\Gradient\Radial;
0 ignored issues
show
The type Cairo\Pattern\Gradient\Radial 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\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...
7
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...
8
9
$surface = new Image(0, 256, 256);
10
$ctx = new Context($surface);
11
$ctx->setAntialias(0);
12
$ctx->setFillRule(0);
13
$ctx->scale(256 / 1.0, 256 / 1.0);
14
15
$pat = new Linear(0.0, 0.0, 0.0, 1.0);
16
$pat->addColorStopRgba(1, 0, 0, 0, 1);
17
$pat->addColorStopRgba(0, 1, 1, 1, 1);
18
$ctx->rectangle(0, 0, 1, 1);
19
$ctx->setPattern($pat);
20
$ctx->fill();
21
22
$pat = new Radial(0.45, 0.4, 0.1, 0.4, 0.4, 0.5);
23
$pat->addColorStopRgba(0, 1, 1, 1, 1);
24
$pat->addColorStopRgba(1, 0, 0, 0, 1);
25
$ctx->setPattern($pat);
26
$ctx->arc(.5, .5, .3, 0, 2 * 3.14);
27
$ctx->fill();
28
29
$check = $ctx->getSurface();
30
31
$check->writeToPng(dirname(__FILE__).'/sphere-php.png');
32