1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
use Cairo\Context; |
|
|
|
|
4
|
|
|
use Cairo\FillRule; |
|
|
|
|
5
|
|
|
use Cairo\Surface\Image; |
|
|
|
|
6
|
|
|
use Cairo\Surface\ImageFormat; |
|
|
|
|
7
|
|
|
|
8
|
|
|
function littleStarPath($context) |
9
|
|
|
{ |
10
|
|
|
$context->moveTo(10, 0); |
11
|
|
|
$context->relLineTo(6, 20); |
12
|
|
|
$context->relLineTo(-16, -12); |
13
|
|
|
$context->relLineTo(20, 0); |
14
|
|
|
$context->relLineTo(-16, 12); |
15
|
|
|
} |
16
|
|
|
|
17
|
|
|
function bigStarPath($context) |
18
|
|
|
{ |
19
|
|
|
$context->moveTo(40, 0); |
20
|
|
|
$context->relLineTo(25, 80); |
21
|
|
|
$context->relLineTo(-65, -50); |
22
|
|
|
$context->relLineTo(80, 0); |
23
|
|
|
$context->relLineTo(-65, 50); |
24
|
|
|
$context->closePath(); |
25
|
|
|
} |
26
|
|
|
|
27
|
|
|
$surface = new Image(ImageFormat::ARGB32, 163, 103); |
28
|
|
|
$context = new Context($surface); |
29
|
|
|
|
30
|
|
|
$context->setSourceRgb(1, 0, 0); |
31
|
|
|
$context->translate(1, 1); |
32
|
|
|
littleStarPath($context); |
33
|
|
|
$context->setFillRule(FillRule::WINDING); |
34
|
|
|
$context->fill(); |
35
|
|
|
$context->translate(21, 0); |
36
|
|
|
littleStarPath($context); |
37
|
|
|
$context->setFillRule(FillRule::EVEN_ODD); |
38
|
|
|
$context->fill(); |
39
|
|
|
$context->translate(-21, 21); |
40
|
|
|
bigStarPath($context); |
41
|
|
|
$context->setFillRule(FillRule::WINDING); |
42
|
|
|
$context->fill(); |
43
|
|
|
$context->translate(81, 0); |
44
|
|
|
bigStarPath($context); |
45
|
|
|
$context->setFillRule(FillRule::EVEN_ODD); |
46
|
|
|
$context->fill(); |
47
|
|
|
|
48
|
|
|
$surface->writeToPng(dirname(__FILE__).'/fill-rule-php.png'); |
49
|
|
|
|
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths