ms-types 0.0.36 → 0.0.37

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/types/image.d.ts +27 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ms-types",
3
- "version": "0.0.36",
3
+ "version": "0.0.37",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
package/types/image.d.ts CHANGED
@@ -345,4 +345,31 @@ declare namespace image {
345
345
  * image.release(imageId)
346
346
  */
347
347
  function toBase64Format(imageId: string, format: string, q: number): string;
348
+
349
+ /**
350
+ * 绘制矩形
351
+ * @param imageId 图片id
352
+ * @param x 坐标x
353
+ * @param y 坐标y
354
+ * @param ex 坐标ex
355
+ * @param ey 坐标ey
356
+ * @param color 颜色
357
+ * @param thickness 线宽
358
+ * @returns 无
359
+ * @example
360
+ * const imageId = image.readImage("screen.png")
361
+ * if (imageId) {
362
+ * image.drawRect(imageId, 0, 0, 100, 100, "#ff0000", 1)
363
+ * }
364
+ * image.release(imageId)
365
+ */
366
+ function drawRect(
367
+ imageId: string,
368
+ x: number,
369
+ y: number,
370
+ ex: number,
371
+ ey: number,
372
+ color: string,
373
+ thickness: number
374
+ ): void;
348
375
  }