1 | <?php |
||
2 | |||
3 | use Cairo\Context; |
||
0 ignored issues
–
show
|
|||
4 | use Cairo\LineCap; |
||
0 ignored issues
–
show
The type
Cairo\LineCap 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
5 | use Cairo\LineJoin; |
||
0 ignored issues
–
show
The type
Cairo\LineJoin 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
8 | |||
9 | $linewidth = 8.0; |
||
10 | $size = 5 * $linewidth; |
||
11 | $pad = 2 * $linewidth; |
||
12 | $dash = [1.5 * $linewidth]; |
||
13 | |||
14 | $imwidth = 3 * ($pad + $size) + $pad; |
||
15 | $imheight = ($size * 5) + (6 * $pad); |
||
16 | |||
17 | $surface = new Image(ImageFormat::ARGB32, $imwidth, $imheight); |
||
18 | $context = new Context($surface); |
||
19 | |||
20 | |||
21 | $context->save(); |
||
22 | $context->setSourceRgb(1, 1, 1); |
||
23 | $context->paint(); |
||
24 | $context->restore(); |
||
25 | |||
26 | $context->translate($pad, $pad); |
||
27 | |||
28 | $context->setDash($dash, -2 * $linewidth); |
||
29 | $context->setLineWidth($linewidth); |
||
30 | |||
31 | $context->save(); |
||
32 | |||
33 | $context->moveTo(0, 0); |
||
34 | $context->relLineTo(0, $size); |
||
35 | $context->relLineTo($size, 0); |
||
36 | $context->closePath(); |
||
37 | $context->moveTo(2 * $linewidth, 0); |
||
38 | $context->relLineTo(3 * $linewidth, 0); |
||
39 | $context->relLineTo(0, 3 * $linewidth); |
||
40 | |||
41 | $context->setLineCap(LineCap::BUTT); |
||
42 | $context->setLineJoin(LineJoin::BEVEL); |
||
43 | $context->stroke(); |
||
44 | $context->translate($size + $pad, 0); |
||
45 | |||
46 | $context->moveTo(0, 0); |
||
47 | $context->relLineTo(0, $size); |
||
48 | $context->relLineTo($size, 0); |
||
49 | $context->closePath(); |
||
50 | $context->moveTo(2 * $linewidth, 0); |
||
51 | $context->relLineTo(3 * $linewidth, 0); |
||
52 | $context->relLineTo(0, 3 * $linewidth); |
||
53 | |||
54 | $context->setLineCap(LineCap::ROUND); |
||
55 | $context->setLineJoin(LineJoin::ROUND); |
||
56 | $context->stroke(); |
||
57 | $context->translate($size + $pad, 0); |
||
58 | |||
59 | $context->moveTo(0, 0); |
||
60 | $context->relLineTo(0, $size); |
||
61 | $context->relLineTo($size, 0); |
||
62 | $context->closePath(); |
||
63 | $context->moveTo(2 * $linewidth, 0); |
||
64 | $context->relLineTo(3 * $linewidth, 0); |
||
65 | $context->relLineTo(0, 3 * $linewidth); |
||
66 | |||
67 | $context->setLineCap(LineCap::SQUARE); |
||
68 | $context->setLineJoin(LineJoin::MITER); |
||
69 | $context->stroke(); |
||
70 | $context->restore(); |
||
71 | |||
72 | $context->translate(0, $size + 2 * $pad); |
||
73 | |||
74 | $context->save(); |
||
75 | $context->scale(1, 2); |
||
76 | $context->moveTo(0, 0); |
||
77 | $context->relLineTo(0, $size); |
||
78 | $context->relLineTo($size, 0); |
||
79 | $context->closePath(); |
||
80 | $context->moveTo(2 * $linewidth, 0); |
||
81 | $context->relLineTo(3 * $linewidth, 0); |
||
82 | $context->relLineTo(0, 3 * $linewidth); |
||
83 | |||
84 | $context->setLineCap(LineCap::BUTT); |
||
85 | $context->setLineJoin(LineJoin::BEVEL); |
||
86 | $context->stroke(); |
||
87 | $context->translate($size + $pad, 0); |
||
88 | |||
89 | $context->moveTo(0, 0); |
||
90 | $context->relLineTo(0, $size); |
||
91 | $context->relLineTo($size, 0); |
||
92 | $context->closePath(); |
||
93 | $context->moveTo(2 * $linewidth, 0); |
||
94 | $context->relLineTo(3 * $linewidth, 0); |
||
95 | $context->relLineTo(0, 3 * $linewidth); |
||
96 | |||
97 | $context->setLineCap(LineCap::ROUND); |
||
98 | $context->setLineJoin(LineJoin::ROUND); |
||
99 | $context->stroke(); |
||
100 | $context->translate($size + $pad, 0); |
||
101 | |||
102 | $context->moveTo(0, 0); |
||
103 | $context->relLineTo(0, $size); |
||
104 | $context->relLineTo($size, 0); |
||
105 | $context->closePath(); |
||
106 | $context->moveTo(2 * $linewidth, 0); |
||
107 | $context->relLineTo(3 * $linewidth, 0); |
||
108 | $context->relLineTo(0, 3 * $linewidth); |
||
109 | |||
110 | $context->setLineCap(LineCap::SQUARE); |
||
111 | $context->setLineJoin(LineJoin::MITER); |
||
112 | $context->stroke(); |
||
113 | $context->restore(); |
||
114 | |||
115 | $context->translate(0, 2 * $size + 2 * $pad); |
||
116 | $context->save(); |
||
117 | $context->scale(1, 2); |
||
118 | $context->moveTo(0, 0); |
||
119 | $context->relLineTo(0, $size); |
||
120 | $context->relLineTo($size, 0); |
||
121 | $context->closePath(); |
||
122 | $context->moveTo(2 * $linewidth, 0); |
||
123 | $context->relLineTo(3 * $linewidth, 0); |
||
124 | $context->relLineTo(0, 3 * $linewidth); |
||
125 | |||
126 | $context->setLineCap(LineCap::BUTT); |
||
127 | $context->setLineJoin(LineJoin::BEVEL); |
||
128 | $context->stroke(); |
||
129 | $context->translate($size + $pad, 0); |
||
130 | |||
131 | $context->moveTo(0, 0); |
||
132 | $context->relLineTo(0, $size); |
||
133 | $context->relLineTo($size, 0); |
||
134 | $context->closePath(); |
||
135 | $context->moveTo(2 * $linewidth, 0); |
||
136 | $context->relLineTo(3 * $linewidth, 0); |
||
137 | $context->relLineTo(0, 3 * $linewidth); |
||
138 | |||
139 | $context->setLineCap(LineCap::ROUND); |
||
140 | $context->setLineJoin(LineJoin::ROUND); |
||
141 | $context->stroke(); |
||
142 | $context->translate($size + $pad, 0); |
||
143 | |||
144 | $context->moveTo(0, 0); |
||
145 | $context->relLineTo(0, $size); |
||
146 | $context->relLineTo($size, 0); |
||
147 | $context->closePath(); |
||
148 | $context->moveTo(2 * $linewidth, 0); |
||
149 | $context->relLineTo(3 * $linewidth, 0); |
||
150 | $context->relLineTo(0, 3 * $linewidth); |
||
151 | $context->setLineCap(LineCap::SQUARE); |
||
152 | $context->setLineJoin(LineJoin::MITER); |
||
153 | $context->stroke(); |
||
154 | $context->restore(); |
||
155 | |||
156 | $surface->writeToPng(dirname(__FILE__).'/dash-scale-php.png'); |
||
157 | |||
158 |
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