Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 3122795

Browse files
committed
[[ SVG ]] Improve paint server support
This patch improves paint support in the drawing format and svg compiler. It adds the full range of named colors from SVG1.1 (now specified in the svg specification file). It adds support for percentage values in gradient coordinates and radii for both the object bbox case and the viewport case, where the current viewport is fixed size. Finally it adds support for conical gradients - i.e. radial gradients which have a focal point and optional focal radius.
1 parent c506467 commit 3122795

5 files changed

Lines changed: 471 additions & 83 deletions

File tree

extensions/script-libraries/drawing/drawing-svg-specification.txt

Lines changed: 157 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,10 @@ element linearGradient
200200
attribute id <identifier> nullable
201201
attribute xml:id <identifier> nullable
202202
attribute style <text> nullable
203-
attribute x1 <coordinate> nullable
204-
attribute y1 <coordinate> nullable
205-
attribute x2 <coordinate> nullable
206-
attribute y2 <coordinate> nullable
203+
attribute x1 <percent-coordinate> nullable
204+
attribute y1 <percent-coordinate> nullable
205+
attribute x2 <percent-coordinate> nullable
206+
attribute y2 <percent-coordinate> nullable
207207
attribute gradientTransform <transform> nullable
208208
attribute gradientUnits userSpaceOnUse|objectBoundingBox nullable
209209
attribute spreadMethod pad|reflect|repeat nullable
@@ -214,9 +214,12 @@ element radialGradient
214214
attribute id <identifier> nullable
215215
attribute xml:id <identifier> nullable
216216
attribute style <text> nullable
217-
attribute cx <coordinate> nullable
218-
attribute cy <coordinate> nullable
219-
attribute r <length> nullable
217+
attribute cx <percent-coordinate> nullable
218+
attribute cy <percent-coordinate> nullable
219+
attribute r <percent-length> nullable
220+
attribute fx <percent-coordinate> nullable
221+
attribute fy <percent-coordinate> nullable
222+
attribute fr <percent-length> nullable
220223
attribute gradientTransform <transform> nullable
221224
attribute gradientUnits userSpaceOnUse|objectBoundingBox nullable
222225
attribute spreadMethod pad|reflect|repeat nullable
@@ -231,4 +234,151 @@ element stop
231234
apply stop-color
232235
apply stop-opacity
233236

237+
color aliceblue 240 248 255
238+
color antiquewhite 250 235 215
239+
color aqua 0 255 255
240+
color aquamarine 127 255 212
241+
color azure 240 255 255
242+
color beige 245 245 220
243+
color bisque 255 228 196
244+
color black 0 0 0
245+
color blanchedalmond 255 235 205
246+
color blue 0 0 255
247+
color blueviolet 138 43 226
248+
color brown 165 42 42
249+
color burlywood 222 184 135
250+
color cadetblue 95 158 160
251+
color chartreuse 127 255 0
252+
color chocolate 210 105 30
253+
color coral 255 127 80
254+
color cornflowerblue 100 149 237
255+
color cornsilk 255 248 220
256+
color crimson 220 20 60
257+
color cyan 0 255 255
258+
color darkblue 0 0 139
259+
color darkcyan 0 139 139
260+
color darkgoldenrod 184 134 11
261+
color darkgray 169 169 169
262+
color darkgreen 0 100 0
263+
color darkgrey 169 169 169
264+
color darkkhaki 189 183 107
265+
color darkmagenta 139 0 139
266+
color darkolivegreen 85 107 47
267+
color darkorange 255 140 0
268+
color darkorchid 153 50 204
269+
color darkred 139 0 0
270+
color darksalmon 233 150 122
271+
color darkseagreen 143 188 143
272+
color darkslateblue 72 61 139
273+
color darkslategray 47 79 79
274+
color darkslategrey 47 79 79
275+
color darkturquoise 0 206 209
276+
color darkviolet 148 0 211
277+
color deeppink 255 20 147
278+
color deepskyblue 0 191 255
279+
color dimgray 105 105 105
280+
color dimgrey 105 105 105
281+
color dodgerblue 30 144 255
282+
color firebrick 178 34 34
283+
color floralwhite 255 250 240
284+
color forestgreen 34 139 34
285+
color fuchsia 255 0 255
286+
color gainsboro 220 220 220
287+
color ghostwhite 248 248 255
288+
color gold 255 215 0
289+
color goldenrod 218 165 32
290+
color gray 128 128 128
291+
color grey 128 128 128
292+
color green 0 128 0
293+
color greenyellow 173 255 47
294+
color honeydew 240 255 240
295+
color hotpink 255 105 180
296+
color indianred 205 92 92
297+
color indigo 75 0 130
298+
color ivory 255 255 240
299+
color khaki 240 230 140
300+
color lavender 230 230 250
301+
color lavenderblush 255 240 245
302+
color lawngreen 124 252 0
303+
color lemonchiffon 255 250 205
304+
color lightblue 173 216 230
305+
color lightcoral 240 128 128
306+
color lightcyan 224 255 255
307+
color lightgoldenrodyellow 250 250 210
308+
color lightgray 211 211 211
309+
color lightgreen 144 238 144
310+
color lightgrey 211 211 211
311+
color lightpink 255 182 193
312+
color lightsalmon 255 160 122
313+
color lightseagreen 32 178 170
314+
color lightskyblue 135 206 250
315+
color lightslategray 119 136 153
316+
color lightslategrey 119 136 153
317+
color lightsteelblue 176 196 222
318+
color lightyellow 255 255 224
319+
color lime 0 255 0
320+
color limegreen 50 205 50
321+
color linen 250 240 230
322+
color magenta 255 0 255
323+
color maroon 128 0 0
324+
color mediumaquamarine 102 205 170
325+
color mediumblue 0 0 205
326+
color mediumorchid 186 85 211
327+
color mediumpurple 147 112 219
328+
color mediumseagreen 60 179 113
329+
color mediumslateblue 123 104 238
330+
color mediumspringgreen 0 250 154
331+
color mediumturquoise 72 209 204
332+
color mediumvioletred 199 21 133
333+
color midnightblue 25 25 112
334+
color mintcream 245 255 250
335+
color mistyrose 255 228 225
336+
color moccasin 255 228 181
337+
color navajowhite 255 222 173
338+
color navy 0 0 128
339+
color oldlace 253 245 230
340+
color olive 128 128 0
341+
color olivedrab 107 142 35
342+
color orange 255 165 0
343+
color orangered 255 69 0
344+
color orchid 218 112 214
345+
color palegoldenrod 238 232 170
346+
color palegreen 152 251 152
347+
color paleturquoise 175 238 238
348+
color palevioletred 219 112 147
349+
color papayawhip 255 239 213
350+
color peachpuff 255 218 185
351+
color peru 205 133 63
352+
color pink 255 192 203
353+
color plum 221 160 221
354+
color powderblue 176 224 230
355+
color purple 128 0 128
356+
color red 255 0 0
357+
color rosybrown 188 143 143
358+
color royalblue 65 105 225
359+
color saddlebrown 139 69 19
360+
color salmon 250 128 114
361+
color sandybrown 244 164 96
362+
color seagreen 46 139 87
363+
color seashell 255 245 238
364+
color sienna 160 82 45
365+
color silver 192 192 192
366+
color skyblue 135 206 235
367+
color slateblue 106 90 205
368+
color slategray 112 128 144
369+
color slategrey 112 128 144
370+
color snow 255 250 250
371+
color springgreen 0 255 127
372+
color steelblue 70 130 180
373+
color tan 210 180 140
374+
color teal 0 128 128
375+
color thistle 216 191 216
376+
color tomato 255 99 71
377+
color turquoise 64 224 208
378+
color violet 238 130 238
379+
color wheat 245 222 179
380+
color white 255 255 255
381+
color whitesmoke 245 245 245
382+
color yellow 255 255 0
383+
color yellowgreen 154 205 50
234384

0 commit comments

Comments
 (0)