@digipair/skill-canvas 0.96.0 → 0.97.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +5 -5
- package/package.json +1 -1
- package/schema.fr.json +209 -21
- package/schema.json +209 -21
package/index.esm.js
CHANGED
@@ -23899,14 +23899,14 @@ function indent(str, spaces) {
|
|
23899
23899
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
23900
23900
|
// match is required
|
23901
23901
|
if (!match) {
|
23902
|
-
return
|
23902
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
|
23903
23903
|
v: nextMatch1
|
23904
23904
|
};
|
23905
23905
|
}
|
23906
23906
|
var token = match.token, offset = match.offset;
|
23907
23907
|
i1 += offset;
|
23908
23908
|
if (token === " ") {
|
23909
|
-
return
|
23909
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
23910
23910
|
}
|
23911
23911
|
tokens1 = _to_consumable_array$1(tokens1).concat([
|
23912
23912
|
token
|
@@ -23925,7 +23925,7 @@ function indent(str, spaces) {
|
|
23925
23925
|
if (contextKeys.some(function(el) {
|
23926
23926
|
return el.startsWith(name);
|
23927
23927
|
})) {
|
23928
|
-
return
|
23928
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
23929
23929
|
}
|
23930
23930
|
if (dateTimeIdentifiers.some(function(el) {
|
23931
23931
|
return el === name;
|
@@ -23944,9 +23944,9 @@ function indent(str, spaces) {
|
|
23944
23944
|
if (dateTimeIdentifiers.some(function(el) {
|
23945
23945
|
return el.startsWith(name);
|
23946
23946
|
})) {
|
23947
|
-
return
|
23947
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
23948
23948
|
}
|
23949
|
-
return
|
23949
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
|
23950
23950
|
v: nextMatch1
|
23951
23951
|
};
|
23952
23952
|
};
|
package/package.json
CHANGED
package/schema.fr.json
CHANGED
@@ -10,7 +10,9 @@
|
|
10
10
|
"paths": {
|
11
11
|
"/canvas": {
|
12
12
|
"post": {
|
13
|
-
"tags": [
|
13
|
+
"tags": [
|
14
|
+
"service"
|
15
|
+
],
|
14
16
|
"summary": "Créer un canvas",
|
15
17
|
"description": "Crée un canvas avec des dimensions spécifiées et exécute des actions de dessin.",
|
16
18
|
"parameters": [
|
@@ -45,12 +47,28 @@
|
|
45
47
|
}
|
46
48
|
}
|
47
49
|
],
|
48
|
-
"x-events": []
|
50
|
+
"x-events": [],
|
51
|
+
"responses": {
|
52
|
+
"200": {
|
53
|
+
"description": "Canvas créé avec les actions de dessin exécutées",
|
54
|
+
"content": {
|
55
|
+
"application/json": {
|
56
|
+
"schema": {
|
57
|
+
"type": "string",
|
58
|
+
"description": "URL de données du canvas sous forme d'image encodée en base64",
|
59
|
+
"example": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
49
65
|
}
|
50
66
|
},
|
51
67
|
"/loadImage": {
|
52
68
|
"post": {
|
53
|
-
"tags": [
|
69
|
+
"tags": [
|
70
|
+
"service"
|
71
|
+
],
|
54
72
|
"summary": "Charger une image",
|
55
73
|
"description": "Charge une image à partir d'une chaîne base64 et retourne l'image chargée.",
|
56
74
|
"parameters": [
|
@@ -64,12 +82,42 @@
|
|
64
82
|
}
|
65
83
|
}
|
66
84
|
],
|
67
|
-
"x-events": []
|
85
|
+
"x-events": [],
|
86
|
+
"responses": {
|
87
|
+
"200": {
|
88
|
+
"description": "Image chargée avec succès",
|
89
|
+
"content": {
|
90
|
+
"application/json": {
|
91
|
+
"schema": {
|
92
|
+
"type": "object",
|
93
|
+
"description": "Objet image chargé pouvant être utilisé avec drawImage",
|
94
|
+
"properties": {
|
95
|
+
"width": {
|
96
|
+
"type": "number",
|
97
|
+
"description": "Largeur de l'image"
|
98
|
+
},
|
99
|
+
"height": {
|
100
|
+
"type": "number",
|
101
|
+
"description": "Hauteur de l'image"
|
102
|
+
},
|
103
|
+
"src": {
|
104
|
+
"type": "string",
|
105
|
+
"description": "Source de l'image",
|
106
|
+
"example": "data:image/png;base64,..."
|
107
|
+
}
|
108
|
+
}
|
109
|
+
}
|
110
|
+
}
|
111
|
+
}
|
112
|
+
}
|
113
|
+
}
|
68
114
|
}
|
69
115
|
},
|
70
116
|
"/drawImage": {
|
71
117
|
"post": {
|
72
|
-
"tags": [
|
118
|
+
"tags": [
|
119
|
+
"service"
|
120
|
+
],
|
73
121
|
"summary": "Dessiner une image",
|
74
122
|
"description": "Dessine une image sur le canvas aux coordonnées spécifiées.",
|
75
123
|
"parameters": [
|
@@ -119,12 +167,27 @@
|
|
119
167
|
}
|
120
168
|
}
|
121
169
|
],
|
122
|
-
"x-events": []
|
170
|
+
"x-events": [],
|
171
|
+
"responses": {
|
172
|
+
"200": {
|
173
|
+
"description": "Image dessinée sur le canvas",
|
174
|
+
"content": {
|
175
|
+
"application/json": {
|
176
|
+
"schema": {
|
177
|
+
"type": "null",
|
178
|
+
"description": "Aucune valeur de retour - modifie le contexte du canvas"
|
179
|
+
}
|
180
|
+
}
|
181
|
+
}
|
182
|
+
}
|
183
|
+
}
|
123
184
|
}
|
124
185
|
},
|
125
186
|
"/strokeRect": {
|
126
187
|
"post": {
|
127
|
-
"tags": [
|
188
|
+
"tags": [
|
189
|
+
"service"
|
190
|
+
],
|
128
191
|
"summary": "Dessiner un rectangle vide",
|
129
192
|
"description": "Dessine le contour d'un rectangle aux coordonnées spécifiées.",
|
130
193
|
"parameters": [
|
@@ -165,12 +228,27 @@
|
|
165
228
|
}
|
166
229
|
}
|
167
230
|
],
|
168
|
-
"x-events": []
|
231
|
+
"x-events": [],
|
232
|
+
"responses": {
|
233
|
+
"200": {
|
234
|
+
"description": "Contour du rectangle dessiné sur le canvas",
|
235
|
+
"content": {
|
236
|
+
"application/json": {
|
237
|
+
"schema": {
|
238
|
+
"type": "null",
|
239
|
+
"description": "Aucune valeur de retour - modifie le contexte du canvas"
|
240
|
+
}
|
241
|
+
}
|
242
|
+
}
|
243
|
+
}
|
244
|
+
}
|
169
245
|
}
|
170
246
|
},
|
171
247
|
"/fillRect": {
|
172
248
|
"post": {
|
173
|
-
"tags": [
|
249
|
+
"tags": [
|
250
|
+
"service"
|
251
|
+
],
|
174
252
|
"summary": "Déssine un rectangle plein",
|
175
253
|
"description": "Déssine un rectangle plein aux coordonnées spécifiées.",
|
176
254
|
"parameters": [
|
@@ -211,12 +289,27 @@
|
|
211
289
|
}
|
212
290
|
}
|
213
291
|
],
|
214
|
-
"x-events": []
|
292
|
+
"x-events": [],
|
293
|
+
"responses": {
|
294
|
+
"200": {
|
295
|
+
"description": "Rectangle plein dessiné sur le canvas",
|
296
|
+
"content": {
|
297
|
+
"application/json": {
|
298
|
+
"schema": {
|
299
|
+
"type": "null",
|
300
|
+
"description": "Aucune valeur de retour - modifie le contexte du canvas"
|
301
|
+
}
|
302
|
+
}
|
303
|
+
}
|
304
|
+
}
|
305
|
+
}
|
215
306
|
}
|
216
307
|
},
|
217
308
|
"/fillText": {
|
218
309
|
"post": {
|
219
|
-
"tags": [
|
310
|
+
"tags": [
|
311
|
+
"service"
|
312
|
+
],
|
220
313
|
"summary": "Ecrire un texte",
|
221
314
|
"description": "Ecrit du texte aux coordonnées spécifiées.",
|
222
315
|
"parameters": [
|
@@ -248,12 +341,27 @@
|
|
248
341
|
}
|
249
342
|
}
|
250
343
|
],
|
251
|
-
"x-events": []
|
344
|
+
"x-events": [],
|
345
|
+
"responses": {
|
346
|
+
"200": {
|
347
|
+
"description": "Texte dessiné sur le canvas",
|
348
|
+
"content": {
|
349
|
+
"application/json": {
|
350
|
+
"schema": {
|
351
|
+
"type": "null",
|
352
|
+
"description": "Aucune valeur de retour - modifie le contexte du canvas"
|
353
|
+
}
|
354
|
+
}
|
355
|
+
}
|
356
|
+
}
|
357
|
+
}
|
252
358
|
}
|
253
359
|
},
|
254
360
|
"/strokeStyle": {
|
255
361
|
"post": {
|
256
|
-
"tags": [
|
362
|
+
"tags": [
|
363
|
+
"service"
|
364
|
+
],
|
257
365
|
"summary": "Définir le style du contour",
|
258
366
|
"description": "Définit le style de contour utilisé pour les dessins.",
|
259
367
|
"parameters": [
|
@@ -267,12 +375,27 @@
|
|
267
375
|
}
|
268
376
|
}
|
269
377
|
],
|
270
|
-
"x-events": []
|
378
|
+
"x-events": [],
|
379
|
+
"responses": {
|
380
|
+
"200": {
|
381
|
+
"description": "Style de contour défini",
|
382
|
+
"content": {
|
383
|
+
"application/json": {
|
384
|
+
"schema": {
|
385
|
+
"type": "null",
|
386
|
+
"description": "Aucune valeur de retour - modifie le contexte du canvas"
|
387
|
+
}
|
388
|
+
}
|
389
|
+
}
|
390
|
+
}
|
391
|
+
}
|
271
392
|
}
|
272
393
|
},
|
273
394
|
"/fillStyle": {
|
274
395
|
"post": {
|
275
|
-
"tags": [
|
396
|
+
"tags": [
|
397
|
+
"service"
|
398
|
+
],
|
276
399
|
"summary": "Définir le style de remplissage",
|
277
400
|
"description": "Définit le style de remplissage utilisé pour les dessins.",
|
278
401
|
"parameters": [
|
@@ -286,12 +409,27 @@
|
|
286
409
|
}
|
287
410
|
}
|
288
411
|
],
|
289
|
-
"x-events": []
|
412
|
+
"x-events": [],
|
413
|
+
"responses": {
|
414
|
+
"200": {
|
415
|
+
"description": "Style de remplissage défini",
|
416
|
+
"content": {
|
417
|
+
"application/json": {
|
418
|
+
"schema": {
|
419
|
+
"type": "null",
|
420
|
+
"description": "Aucune valeur de retour - modifie le contexte du canvas"
|
421
|
+
}
|
422
|
+
}
|
423
|
+
}
|
424
|
+
}
|
425
|
+
}
|
290
426
|
}
|
291
427
|
},
|
292
428
|
"/lineWidth": {
|
293
429
|
"post": {
|
294
|
-
"tags": [
|
430
|
+
"tags": [
|
431
|
+
"service"
|
432
|
+
],
|
295
433
|
"summary": "Définir la largeur du trait",
|
296
434
|
"description": "Définit la largeur du trait utilisé pour les dessins.",
|
297
435
|
"parameters": [
|
@@ -305,12 +443,27 @@
|
|
305
443
|
}
|
306
444
|
}
|
307
445
|
],
|
308
|
-
"x-events": []
|
446
|
+
"x-events": [],
|
447
|
+
"responses": {
|
448
|
+
"200": {
|
449
|
+
"description": "Largeur du trait définie",
|
450
|
+
"content": {
|
451
|
+
"application/json": {
|
452
|
+
"schema": {
|
453
|
+
"type": "null",
|
454
|
+
"description": "Aucune valeur de retour - modifie le contexte du canvas"
|
455
|
+
}
|
456
|
+
}
|
457
|
+
}
|
458
|
+
}
|
459
|
+
}
|
309
460
|
}
|
310
461
|
},
|
311
462
|
"/measureText": {
|
312
463
|
"post": {
|
313
|
-
"tags": [
|
464
|
+
"tags": [
|
465
|
+
"service"
|
466
|
+
],
|
314
467
|
"summary": "Mesurer le texte",
|
315
468
|
"description": "Mesure le texte spécifié et retourne les métriques.",
|
316
469
|
"parameters": [
|
@@ -324,11 +477,46 @@
|
|
324
477
|
}
|
325
478
|
}
|
326
479
|
],
|
327
|
-
"x-events": []
|
480
|
+
"x-events": [],
|
481
|
+
"responses": {
|
482
|
+
"200": {
|
483
|
+
"description": "Mesures du texte",
|
484
|
+
"content": {
|
485
|
+
"application/json": {
|
486
|
+
"schema": {
|
487
|
+
"type": "object",
|
488
|
+
"description": "Objet de métriques du texte",
|
489
|
+
"properties": {
|
490
|
+
"width": {
|
491
|
+
"type": "number",
|
492
|
+
"description": "Largeur du texte"
|
493
|
+
},
|
494
|
+
"actualBoundingBoxLeft": {
|
495
|
+
"type": "number",
|
496
|
+
"description": "Distance du point d'alignement du texte au côté gauche de la boîte englobante"
|
497
|
+
},
|
498
|
+
"actualBoundingBoxRight": {
|
499
|
+
"type": "number",
|
500
|
+
"description": "Distance du point d'alignement du texte au côté droit de la boîte englobante"
|
501
|
+
},
|
502
|
+
"fontBoundingBoxAscent": {
|
503
|
+
"type": "number",
|
504
|
+
"description": "Distance de la ligne de base horizontale au haut de la boîte englobante de la police"
|
505
|
+
},
|
506
|
+
"fontBoundingBoxDescent": {
|
507
|
+
"type": "number",
|
508
|
+
"description": "Distance de la ligne de base horizontale au bas de la boîte englobante de la police"
|
509
|
+
}
|
510
|
+
}
|
511
|
+
}
|
512
|
+
}
|
513
|
+
}
|
514
|
+
}
|
515
|
+
}
|
328
516
|
}
|
329
517
|
}
|
330
518
|
},
|
331
519
|
"components": {
|
332
520
|
"schemas": {}
|
333
521
|
}
|
334
|
-
}
|
522
|
+
}
|
package/schema.json
CHANGED
@@ -10,7 +10,9 @@
|
|
10
10
|
"paths": {
|
11
11
|
"/canvas": {
|
12
12
|
"post": {
|
13
|
-
"tags": [
|
13
|
+
"tags": [
|
14
|
+
"service"
|
15
|
+
],
|
14
16
|
"summary": "Create a canvas",
|
15
17
|
"description": "Creates a canvas with specified dimensions and executes drawing actions.",
|
16
18
|
"parameters": [
|
@@ -45,12 +47,28 @@
|
|
45
47
|
}
|
46
48
|
}
|
47
49
|
],
|
48
|
-
"x-events": []
|
50
|
+
"x-events": [],
|
51
|
+
"responses": {
|
52
|
+
"200": {
|
53
|
+
"description": "Canvas created with drawing actions executed",
|
54
|
+
"content": {
|
55
|
+
"application/json": {
|
56
|
+
"schema": {
|
57
|
+
"type": "string",
|
58
|
+
"description": "Data URL of the canvas as base64 encoded image",
|
59
|
+
"example": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
49
65
|
}
|
50
66
|
},
|
51
67
|
"/loadImage": {
|
52
68
|
"post": {
|
53
|
-
"tags": [
|
69
|
+
"tags": [
|
70
|
+
"service"
|
71
|
+
],
|
54
72
|
"summary": "Load an image",
|
55
73
|
"description": "Loads an image from a base64 string and returns the loaded image.",
|
56
74
|
"parameters": [
|
@@ -64,12 +82,42 @@
|
|
64
82
|
}
|
65
83
|
}
|
66
84
|
],
|
67
|
-
"x-events": []
|
85
|
+
"x-events": [],
|
86
|
+
"responses": {
|
87
|
+
"200": {
|
88
|
+
"description": "Image loaded successfully",
|
89
|
+
"content": {
|
90
|
+
"application/json": {
|
91
|
+
"schema": {
|
92
|
+
"type": "object",
|
93
|
+
"description": "Loaded image object that can be used with drawImage",
|
94
|
+
"properties": {
|
95
|
+
"width": {
|
96
|
+
"type": "number",
|
97
|
+
"description": "Image width"
|
98
|
+
},
|
99
|
+
"height": {
|
100
|
+
"type": "number",
|
101
|
+
"description": "Image height"
|
102
|
+
},
|
103
|
+
"src": {
|
104
|
+
"type": "string",
|
105
|
+
"description": "Image source",
|
106
|
+
"example": "data:image/png;base64,..."
|
107
|
+
}
|
108
|
+
}
|
109
|
+
}
|
110
|
+
}
|
111
|
+
}
|
112
|
+
}
|
113
|
+
}
|
68
114
|
}
|
69
115
|
},
|
70
116
|
"/drawImage": {
|
71
117
|
"post": {
|
72
|
-
"tags": [
|
118
|
+
"tags": [
|
119
|
+
"service"
|
120
|
+
],
|
73
121
|
"summary": "Draw an image",
|
74
122
|
"description": "Draws an image on the canvas at the specified coordinates.",
|
75
123
|
"parameters": [
|
@@ -119,12 +167,27 @@
|
|
119
167
|
}
|
120
168
|
}
|
121
169
|
],
|
122
|
-
"x-events": []
|
170
|
+
"x-events": [],
|
171
|
+
"responses": {
|
172
|
+
"200": {
|
173
|
+
"description": "Image drawn on canvas",
|
174
|
+
"content": {
|
175
|
+
"application/json": {
|
176
|
+
"schema": {
|
177
|
+
"type": "null",
|
178
|
+
"description": "No return value - modifies the canvas context"
|
179
|
+
}
|
180
|
+
}
|
181
|
+
}
|
182
|
+
}
|
183
|
+
}
|
123
184
|
}
|
124
185
|
},
|
125
186
|
"/strokeRect": {
|
126
187
|
"post": {
|
127
|
-
"tags": [
|
188
|
+
"tags": [
|
189
|
+
"service"
|
190
|
+
],
|
128
191
|
"summary": "Draw an empty rectangle",
|
129
192
|
"description": "Draws the outline of a rectangle at the specified coordinates.",
|
130
193
|
"parameters": [
|
@@ -165,12 +228,27 @@
|
|
165
228
|
}
|
166
229
|
}
|
167
230
|
],
|
168
|
-
"x-events": []
|
231
|
+
"x-events": [],
|
232
|
+
"responses": {
|
233
|
+
"200": {
|
234
|
+
"description": "Rectangle outline drawn on canvas",
|
235
|
+
"content": {
|
236
|
+
"application/json": {
|
237
|
+
"schema": {
|
238
|
+
"type": "null",
|
239
|
+
"description": "No return value - modifies the canvas context"
|
240
|
+
}
|
241
|
+
}
|
242
|
+
}
|
243
|
+
}
|
244
|
+
}
|
169
245
|
}
|
170
246
|
},
|
171
247
|
"/fillRect": {
|
172
248
|
"post": {
|
173
|
-
"tags": [
|
249
|
+
"tags": [
|
250
|
+
"service"
|
251
|
+
],
|
174
252
|
"summary": "Draw a filled rectangle",
|
175
253
|
"description": "Draws a filled rectangle at the specified coordinates.",
|
176
254
|
"parameters": [
|
@@ -211,12 +289,27 @@
|
|
211
289
|
}
|
212
290
|
}
|
213
291
|
],
|
214
|
-
"x-events": []
|
292
|
+
"x-events": [],
|
293
|
+
"responses": {
|
294
|
+
"200": {
|
295
|
+
"description": "Filled rectangle drawn on canvas",
|
296
|
+
"content": {
|
297
|
+
"application/json": {
|
298
|
+
"schema": {
|
299
|
+
"type": "null",
|
300
|
+
"description": "No return value - modifies the canvas context"
|
301
|
+
}
|
302
|
+
}
|
303
|
+
}
|
304
|
+
}
|
305
|
+
}
|
215
306
|
}
|
216
307
|
},
|
217
308
|
"/fillText": {
|
218
309
|
"post": {
|
219
|
-
"tags": [
|
310
|
+
"tags": [
|
311
|
+
"service"
|
312
|
+
],
|
220
313
|
"summary": "Write text",
|
221
314
|
"description": "Writes text at the specified coordinates.",
|
222
315
|
"parameters": [
|
@@ -248,12 +341,27 @@
|
|
248
341
|
}
|
249
342
|
}
|
250
343
|
],
|
251
|
-
"x-events": []
|
344
|
+
"x-events": [],
|
345
|
+
"responses": {
|
346
|
+
"200": {
|
347
|
+
"description": "Text drawn on canvas",
|
348
|
+
"content": {
|
349
|
+
"application/json": {
|
350
|
+
"schema": {
|
351
|
+
"type": "null",
|
352
|
+
"description": "No return value - modifies the canvas context"
|
353
|
+
}
|
354
|
+
}
|
355
|
+
}
|
356
|
+
}
|
357
|
+
}
|
252
358
|
}
|
253
359
|
},
|
254
360
|
"/strokeStyle": {
|
255
361
|
"post": {
|
256
|
-
"tags": [
|
362
|
+
"tags": [
|
363
|
+
"service"
|
364
|
+
],
|
257
365
|
"summary": "Set stroke style",
|
258
366
|
"description": "Sets the stroke style used for drawings.",
|
259
367
|
"parameters": [
|
@@ -267,12 +375,27 @@
|
|
267
375
|
}
|
268
376
|
}
|
269
377
|
],
|
270
|
-
"x-events": []
|
378
|
+
"x-events": [],
|
379
|
+
"responses": {
|
380
|
+
"200": {
|
381
|
+
"description": "Stroke style set",
|
382
|
+
"content": {
|
383
|
+
"application/json": {
|
384
|
+
"schema": {
|
385
|
+
"type": "null",
|
386
|
+
"description": "No return value - modifies the canvas context"
|
387
|
+
}
|
388
|
+
}
|
389
|
+
}
|
390
|
+
}
|
391
|
+
}
|
271
392
|
}
|
272
393
|
},
|
273
394
|
"/fillStyle": {
|
274
395
|
"post": {
|
275
|
-
"tags": [
|
396
|
+
"tags": [
|
397
|
+
"service"
|
398
|
+
],
|
276
399
|
"summary": "Set fill style",
|
277
400
|
"description": "Sets the fill style used for drawings.",
|
278
401
|
"parameters": [
|
@@ -286,12 +409,27 @@
|
|
286
409
|
}
|
287
410
|
}
|
288
411
|
],
|
289
|
-
"x-events": []
|
412
|
+
"x-events": [],
|
413
|
+
"responses": {
|
414
|
+
"200": {
|
415
|
+
"description": "Fill style set",
|
416
|
+
"content": {
|
417
|
+
"application/json": {
|
418
|
+
"schema": {
|
419
|
+
"type": "null",
|
420
|
+
"description": "No return value - modifies the canvas context"
|
421
|
+
}
|
422
|
+
}
|
423
|
+
}
|
424
|
+
}
|
425
|
+
}
|
290
426
|
}
|
291
427
|
},
|
292
428
|
"/lineWidth": {
|
293
429
|
"post": {
|
294
|
-
"tags": [
|
430
|
+
"tags": [
|
431
|
+
"service"
|
432
|
+
],
|
295
433
|
"summary": "Set line width",
|
296
434
|
"description": "Sets the line width used for drawings.",
|
297
435
|
"parameters": [
|
@@ -305,12 +443,27 @@
|
|
305
443
|
}
|
306
444
|
}
|
307
445
|
],
|
308
|
-
"x-events": []
|
446
|
+
"x-events": [],
|
447
|
+
"responses": {
|
448
|
+
"200": {
|
449
|
+
"description": "Line width set",
|
450
|
+
"content": {
|
451
|
+
"application/json": {
|
452
|
+
"schema": {
|
453
|
+
"type": "null",
|
454
|
+
"description": "No return value - modifies the canvas context"
|
455
|
+
}
|
456
|
+
}
|
457
|
+
}
|
458
|
+
}
|
459
|
+
}
|
309
460
|
}
|
310
461
|
},
|
311
462
|
"/measureText": {
|
312
463
|
"post": {
|
313
|
-
"tags": [
|
464
|
+
"tags": [
|
465
|
+
"service"
|
466
|
+
],
|
314
467
|
"summary": "Measure text",
|
315
468
|
"description": "Measures the specified text and returns the metrics.",
|
316
469
|
"parameters": [
|
@@ -324,11 +477,46 @@
|
|
324
477
|
}
|
325
478
|
}
|
326
479
|
],
|
327
|
-
"x-events": []
|
480
|
+
"x-events": [],
|
481
|
+
"responses": {
|
482
|
+
"200": {
|
483
|
+
"description": "Text measurements",
|
484
|
+
"content": {
|
485
|
+
"application/json": {
|
486
|
+
"schema": {
|
487
|
+
"type": "object",
|
488
|
+
"description": "Text metrics object",
|
489
|
+
"properties": {
|
490
|
+
"width": {
|
491
|
+
"type": "number",
|
492
|
+
"description": "Width of the text"
|
493
|
+
},
|
494
|
+
"actualBoundingBoxLeft": {
|
495
|
+
"type": "number",
|
496
|
+
"description": "Distance from text align point to left side of bounding box"
|
497
|
+
},
|
498
|
+
"actualBoundingBoxRight": {
|
499
|
+
"type": "number",
|
500
|
+
"description": "Distance from text align point to right side of bounding box"
|
501
|
+
},
|
502
|
+
"fontBoundingBoxAscent": {
|
503
|
+
"type": "number",
|
504
|
+
"description": "Distance from horizontal baseline to top of font bounding box"
|
505
|
+
},
|
506
|
+
"fontBoundingBoxDescent": {
|
507
|
+
"type": "number",
|
508
|
+
"description": "Distance from horizontal baseline to bottom of font bounding box"
|
509
|
+
}
|
510
|
+
}
|
511
|
+
}
|
512
|
+
}
|
513
|
+
}
|
514
|
+
}
|
515
|
+
}
|
328
516
|
}
|
329
517
|
}
|
330
518
|
},
|
331
519
|
"components": {
|
332
520
|
"schemas": {}
|
333
521
|
}
|
334
|
-
}
|
522
|
+
}
|