1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
use Cairo\Context; |
|
|
|
|
4
|
|
|
use Cairo\Surface\Image; |
|
|
|
|
5
|
|
|
use Cairo\Surface\ImageFormat; |
|
|
|
|
6
|
|
|
|
7
|
|
|
function drawSymbol($context) |
8
|
|
|
{ |
9
|
|
|
$dash = [6.0, 3.0]; |
10
|
|
|
|
11
|
|
|
$context->rectangle(-25, -25, 50, 50); |
12
|
|
|
$context->stroke(); |
13
|
|
|
|
14
|
|
|
$context->moveTo(0, -25); |
15
|
|
|
$context->curveTo(12.5, -12.5, 12.5, -12.5, 0, 0); |
16
|
|
|
$context->curveTo(-12.5, 12.5, -12.5, 12.5, 0, 25); |
17
|
|
|
$context->curveTo(12.5, 12.5, 12.5, 12.5, 0, 0); |
18
|
|
|
$context->stroke(); |
19
|
|
|
|
20
|
|
|
$context->save(); |
21
|
|
|
|
22
|
|
|
$context->setDash($dash, 0.); |
23
|
|
|
$context->moveTo(0, 0); |
24
|
|
|
$context->arc(0, 0, 12.5, 0, 3 * M_PI / 2); |
25
|
|
|
$context->closePath(); |
26
|
|
|
$context->stroke(); |
27
|
|
|
$context->restore(); |
28
|
|
|
} |
29
|
|
|
|
30
|
|
|
$surface = new Image(ImageFormat::ARGB32, 200, 200); |
31
|
|
|
$context = new Context($surface); |
32
|
|
|
|
33
|
|
|
$context->setSourceRgb(1, 1, 1); |
34
|
|
|
$context->paint(); |
35
|
|
|
$context->setSourceRgb(0, 0, 0); |
36
|
|
|
$context->save(); |
37
|
|
|
$context->translate(50, 50); |
38
|
|
|
$context->scale(1, 1); |
39
|
|
|
|
40
|
|
|
drawSymbol($context); |
41
|
|
|
$context->restore(); |
42
|
|
|
|
43
|
|
|
$context->save(); |
44
|
|
|
$context->translate(150, 50); |
45
|
|
|
$context->scale(-1, 1); |
46
|
|
|
|
47
|
|
|
drawSymbol($context); |
48
|
|
|
$context->restore(); |
49
|
|
|
|
50
|
|
|
$context->save(); |
51
|
|
|
$context->translate(150, 150); |
52
|
|
|
$context->scale(-1, -1); |
53
|
|
|
|
54
|
|
|
drawSymbol($context); |
55
|
|
|
$context->restore(); |
56
|
|
|
|
57
|
|
|
$context->save(); |
58
|
|
|
$context->translate(50, 150); |
59
|
|
|
$context->scale(1, -1); |
60
|
|
|
|
61
|
|
|
drawSymbol($context); |
62
|
|
|
$context->restore(); |
63
|
|
|
|
64
|
|
|
$surface->writeToPng(dirname(__FILE__).'/reflected-stroke-php.png'); |
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