1 | <?php |
||
13 | abstract class UniformGradient extends Gradient |
||
14 | { |
||
15 | |||
16 | /** |
||
17 | * @param ElementInterface $svg |
||
18 | * @param array $colors |
||
19 | * @param null $id |
||
20 | * @param string $gradientType |
||
21 | * |
||
22 | * @return UniformGradient |
||
23 | */ |
||
24 | 35 | public static function gradient(ElementInterface $svg, array $colors, $id = null, $gradientType = 'linear') |
|
47 | |||
48 | /** |
||
49 | * @param ContainerInterface $container |
||
50 | * @param array $colors |
||
51 | * @param null $id |
||
52 | * |
||
53 | * @return $this|ElementInterface |
||
54 | */ |
||
55 | 2 | public static function verticalFromTop(ContainerInterface $container, array $colors, $id = null) |
|
59 | |||
60 | /** |
||
61 | * @param ContainerInterface $container |
||
62 | * @param array $colors |
||
63 | * @param null $id |
||
64 | * |
||
65 | * @return $this|ElementInterface |
||
66 | */ |
||
67 | 2 | public static function verticalFromBottom(ContainerInterface $container, array $colors, $id = null) |
|
71 | |||
72 | /** |
||
73 | * @param ContainerInterface $container |
||
74 | * @param array $colors |
||
75 | * @param null $id |
||
76 | * |
||
77 | * @return $this|ElementInterface |
||
78 | */ |
||
79 | 2 | public static function diagonalFromTopLeft(ContainerInterface $container, array $colors, $id = null) |
|
83 | |||
84 | /** |
||
85 | * @param ContainerInterface $container |
||
86 | * @param array $colors |
||
87 | * @param null $id |
||
88 | * |
||
89 | * @return $this|ElementInterface |
||
90 | */ |
||
91 | 2 | public static function diagonalFromBottomRight(ContainerInterface $container, array $colors, $id = null) |
|
95 | |||
96 | /** |
||
97 | * @param ContainerInterface $container |
||
98 | * @param array $colors |
||
99 | * @param null $id |
||
100 | * |
||
101 | * @return $this|ElementInterface |
||
102 | */ |
||
103 | 2 | public static function diagonalFromBottomLeft(ContainerInterface $container, array $colors, $id = null) |
|
107 | |||
108 | /** |
||
109 | * @param ContainerInterface $container |
||
110 | * @param array $colors |
||
111 | * @param null $id |
||
112 | * |
||
113 | * @return $this|ElementInterface |
||
114 | */ |
||
115 | 2 | public static function diagonalFromTopRight(ContainerInterface $container, array $colors, $id = null) |
|
119 | |||
120 | /** |
||
121 | * @param ContainerInterface $container |
||
122 | * @param array $colors |
||
123 | * @param null $id |
||
124 | * |
||
125 | * @return $this|ElementInterface |
||
126 | */ |
||
127 | 2 | public static function horizontalFromLeft(ContainerInterface $container, array $colors, $id = null) |
|
131 | |||
132 | /** |
||
133 | * @param ContainerInterface $container |
||
134 | * @param array $colors |
||
135 | * @param null $id |
||
136 | * |
||
137 | * @return $this|ElementInterface |
||
138 | */ |
||
139 | 2 | public static function horizontalFromRight(ContainerInterface $container, array $colors, $id = null) |
|
143 | |||
144 | /** |
||
145 | * @param ContainerInterface $container |
||
146 | * @param array $colors |
||
147 | * @param null $id |
||
148 | * |
||
149 | * @return $this|ElementInterface |
||
150 | */ |
||
151 | 2 | public static function radialTopLeft(ContainerInterface $container, array $colors, $id = null) |
|
155 | |||
156 | |||
157 | /** |
||
158 | * @param ContainerInterface $container |
||
159 | * @param array $colors |
||
160 | * @param null $id |
||
161 | * |
||
162 | * @return $this|ElementInterface |
||
163 | */ |
||
164 | 2 | public static function radialTopRight(ContainerInterface $container, array $colors, $id = null) |
|
168 | |||
169 | /** |
||
170 | * @param ContainerInterface $container |
||
171 | * @param array $colors |
||
172 | * @param null $id |
||
173 | * |
||
174 | * @return $this|ElementInterface |
||
175 | */ |
||
176 | 2 | public static function radialBottomLeft(ContainerInterface $container, array $colors, $id = null) |
|
180 | |||
181 | /** |
||
182 | * @param ContainerInterface $container |
||
183 | * @param array $colors |
||
184 | * @param null $id |
||
185 | * |
||
186 | * @return $this|ElementInterface |
||
187 | */ |
||
188 | 2 | public static function radialBottomRight(ContainerInterface $container, array $colors, $id = null) |
|
192 | |||
193 | /** |
||
194 | * @param ContainerInterface $container |
||
195 | * @param array $colors |
||
196 | * @param null $id |
||
197 | * |
||
198 | * @return $this|ElementInterface |
||
199 | */ |
||
200 | 2 | public static function radialTopCenter(ContainerInterface $container, array $colors, $id = null) |
|
204 | |||
205 | /** |
||
206 | * @param ContainerInterface $container |
||
207 | * @param array $colors |
||
208 | * @param null $id |
||
209 | * |
||
210 | * @return $this|ElementInterface |
||
211 | */ |
||
212 | 2 | public static function radialLeftCenter(ContainerInterface $container, array $colors, $id = null) |
|
216 | |||
217 | /** |
||
218 | * @param ContainerInterface $container |
||
219 | * @param array $colors |
||
220 | * @param null $id |
||
221 | * |
||
222 | * @return $this|ElementInterface |
||
223 | */ |
||
224 | 2 | public static function radialBottomCenter(ContainerInterface $container, array $colors, $id = null) |
|
228 | |||
229 | /** |
||
230 | * @param ContainerInterface $container |
||
231 | * @param array $colors |
||
232 | * @param null $id |
||
233 | * |
||
234 | * @return $this|ElementInterface |
||
235 | */ |
||
236 | 2 | public static function radialRightCenter(ContainerInterface $container, array $colors, $id = null) |
|
240 | |||
241 | /** |
||
242 | * @param ElementInterface $svg |
||
243 | * @param $id |
||
244 | * @param $gradientType |
||
245 | * |
||
246 | * @return Gradient |
||
247 | */ |
||
248 | 35 | private static function getGradient(ElementInterface $svg, $id, $gradientType) |
|
252 | } |