@dcloudio/uni-app-x 0.7.14 → 0.7.16

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 (175) hide show
  1. package/options.d.ts +1 -1
  2. package/package.json +1 -1
  3. package/types/native/CSSStyleDeclaration.d.ts +0 -72
  4. package/types/native/CanvasRenderingContext2D.d.ts +1943 -0
  5. package/types/native/DOMRect.d.ts +0 -180
  6. package/types/native/DrawableContext.d.ts +161 -628
  7. package/types/native/IUniElement.d.ts +513 -1868
  8. package/types/native/IUniObjectElement.d.ts +124 -0
  9. package/types/native/Path2D.d.ts +241 -0
  10. package/types/native/SnapshotOptions.d.ts +1 -0
  11. package/types/native/UniApp.d.ts +110 -0
  12. package/types/native/UniCanvasElement.d.ts +9 -0
  13. package/types/native/UniNativePage.d.ts +48 -1
  14. package/types/native/UniPageManager.d.ts +4 -1
  15. package/types/native/UniProvider.d.ts +1 -0
  16. package/types/native/UniResizeObserver.d.ts +9 -99
  17. package/types/native/UniScrollEvent.d.ts +1 -1
  18. package/types/native/UniSwiperAnimationFinishEvent.d.ts +1 -1
  19. package/types/native/UniSwiperChangeEvent.d.ts +1 -1
  20. package/types/native/UniVideoElement.d.ts +5 -0
  21. package/types/native/global.d.ts +73 -15
  22. package/types/native/index.d.ts +4 -0
  23. package/types/shim-uts-basic.d.ts +4495 -0
  24. package/types/uni/env/index.d.ts +39 -0
  25. package/types/uni/uts-plugin-api/global.d.ts +20 -1
  26. package/types/uni/uts-plugin-api/index.d.ts +20 -1
  27. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/global.d.ts +26 -0
  28. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/index.d.ts +12 -0
  29. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/interface.d.ts +231 -0
  30. package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/global.d.ts +10 -0
  31. package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/index.d.ts +4 -0
  32. package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/interface.d.ts +77 -0
  33. package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/global.d.ts +10 -0
  34. package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/index.d.ts +4 -0
  35. package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/interface.d.ts +77 -0
  36. package/types/uni/uts-plugin-api/lib/uni-cancelAnimationFrame/utssdk/global.d.ts +10 -0
  37. package/types/uni/uts-plugin-api/lib/uni-cancelAnimationFrame/utssdk/index.d.ts +4 -0
  38. package/types/uni/uts-plugin-api/lib/uni-cancelAnimationFrame/utssdk/interface.d.ts +24 -0
  39. package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/global.d.ts +20 -0
  40. package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/index.d.ts +9 -0
  41. package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/interface.d.ts +268 -0
  42. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/global.d.ts +40 -0
  43. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/index.d.ts +19 -0
  44. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/interface.d.ts +203 -0
  45. package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/global.d.ts +20 -0
  46. package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/index.d.ts +9 -0
  47. package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/interface.d.ts +152 -0
  48. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/interface.d.ts +20 -3
  49. package/types/uni/uts-plugin-api/lib/uni-createSelectorQuery/utssdk/interface.d.ts +24 -9
  50. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +13 -6
  51. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/global.d.ts +28 -0
  52. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/index.d.ts +13 -0
  53. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/interface.d.ts +1335 -0
  54. package/types/uni/uts-plugin-api/lib/uni-event/utssdk/interface.d.ts +28 -0
  55. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/interface.d.ts +6 -1
  56. package/types/uni/uts-plugin-api/lib/uni-file/utssdk/global.d.ts +80 -0
  57. package/types/uni/uts-plugin-api/lib/uni-file/utssdk/index.d.ts +39 -0
  58. package/types/uni/uts-plugin-api/lib/uni-file/utssdk/interface.d.ts +174 -0
  59. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +8 -1
  60. package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/interface.d.ts +20 -17
  61. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +28 -20
  62. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +201 -64
  63. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/interface.d.ts +180 -59
  64. package/types/uni/uts-plugin-api/lib/uni-getElementById/utssdk/interface.d.ts +10 -2
  65. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/global.d.ts +12 -0
  66. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/index.d.ts +5 -0
  67. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/interface.d.ts +47 -0
  68. package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/interface.d.ts +10 -1
  69. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/global.d.ts +24 -0
  70. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/index.d.ts +11 -0
  71. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/interface.d.ts +564 -0
  72. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/global.d.ts +2 -14
  73. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/index.d.ts +1 -6
  74. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/interface.d.ts +1 -151
  75. package/types/uni/uts-plugin-api/lib/uni-getLocation-tencent/utssdk/global.d.ts +8 -0
  76. package/types/uni/uts-plugin-api/lib/uni-getLocation-tencent/utssdk/index.d.ts +4 -0
  77. package/types/uni/uts-plugin-api/lib/uni-getLocation-tencent/utssdk/interface.d.ts +1 -0
  78. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/global.d.ts +8 -0
  79. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/index.d.ts +4 -0
  80. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/interface.d.ts +114 -34
  81. package/types/uni/uts-plugin-api/lib/uni-getPerformance/utssdk/interface.d.ts +7 -1
  82. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/global.d.ts +8 -0
  83. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/index.d.ts +4 -0
  84. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/interface.d.ts +304 -27
  85. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +500 -149
  86. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/interface.d.ts +123 -112
  87. package/types/uni/uts-plugin-api/lib/uni-installApk/utssdk/interface.d.ts +9 -6
  88. package/types/uni/uts-plugin-api/lib/uni-interceptor/utssdk/interface.d.ts +18 -2
  89. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/global.d.ts +22 -0
  90. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/index.d.ts +10 -0
  91. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/interface.d.ts +60 -0
  92. package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/interface.d.ts +8 -1
  93. package/types/uni/{uts-plugin-extend → uts-plugin-api}/lib/uni-makePhoneCall/utssdk/global.d.ts +9 -6
  94. package/types/uni/{uts-plugin-extend → uts-plugin-api}/lib/uni-makePhoneCall/utssdk/index.d.ts +4 -2
  95. package/types/uni/{uts-plugin-extend → uts-plugin-api}/lib/uni-makePhoneCall/utssdk/interface.d.ts +40 -61
  96. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/global.d.ts +2 -0
  97. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/index.d.ts +1 -0
  98. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +327 -58
  99. package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/global.d.ts +24 -0
  100. package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/index.d.ts +12 -0
  101. package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/interface.d.ts +213 -5
  102. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +280 -92
  103. package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/interface.d.ts +20 -15
  104. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/global.d.ts +24 -0
  105. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/index.d.ts +11 -0
  106. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/interface.d.ts +70 -0
  107. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/global.d.ts +2 -0
  108. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/index.d.ts +1 -0
  109. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/interface.d.ts +16 -6
  110. package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/interface.d.ts +161 -11
  111. package/types/uni/uts-plugin-api/lib/uni-payment-alipay/utssdk/global.d.ts +8 -0
  112. package/types/uni/uts-plugin-api/lib/uni-payment-alipay/utssdk/index.d.ts +4 -0
  113. package/types/uni/uts-plugin-api/lib/uni-payment-alipay/utssdk/interface.d.ts +1 -0
  114. package/types/uni/uts-plugin-api/lib/uni-payment-wxpay/utssdk/global.d.ts +8 -0
  115. package/types/uni/uts-plugin-api/lib/uni-payment-wxpay/utssdk/index.d.ts +4 -0
  116. package/types/uni/uts-plugin-api/lib/uni-payment-wxpay/utssdk/interface.d.ts +3 -0
  117. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/interface.d.ts +120 -42
  118. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/global.d.ts +2 -0
  119. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/index.d.ts +1 -0
  120. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/interface.d.ts +16 -1
  121. package/types/uni/uts-plugin-api/lib/uni-requestAnimationFrame/utssdk/global.d.ts +12 -0
  122. package/types/uni/uts-plugin-api/lib/uni-requestAnimationFrame/utssdk/index.d.ts +5 -0
  123. package/types/uni/uts-plugin-api/lib/uni-requestAnimationFrame/utssdk/interface.d.ts +28 -0
  124. package/types/uni/uts-plugin-api/lib/uni-route/utssdk/interface.d.ts +177 -32
  125. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/interface.d.ts +7 -2
  126. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/global.d.ts +24 -0
  127. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/index.d.ts +11 -0
  128. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/interface.d.ts +73 -0
  129. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/interface.d.ts +112 -43
  130. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/global.d.ts +16 -0
  131. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/index.d.ts +8 -0
  132. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/interface.d.ts +78 -1
  133. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/interface.d.ts +199 -149
  134. package/types/uni/uts-plugin-api/lib/uni-virtualPayment/utssdk/global.d.ts +112 -0
  135. package/types/uni/uts-plugin-api/lib/uni-virtualPayment/utssdk/index.d.ts +55 -0
  136. package/types/uni/uts-plugin-api/lib/uni-virtualPayment/utssdk/interface.d.ts +1068 -0
  137. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/interface.d.ts +170 -83
  138. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/interface.d.ts +11 -7
  139. package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/interface.d.ts +33 -15
  140. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/global.d.ts +4 -0
  141. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/index.d.ts +2 -0
  142. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/interface.d.ts +777 -568
  143. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/interface.d.ts +10 -6
  144. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +132 -15
  145. package/types/uni/uts-plugin-extend/global.d.ts +1 -1
  146. package/types/uni/uts-plugin-extend/index.d.ts +1 -3
  147. package/types/uni/uts-plugin-extend/lib/uni-canvas/utssdk/interface.d.ts +4 -4
  148. package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/interface.d.ts +1 -0
  149. package/types/uni/uts-plugin-extend/lib/uni-createMediaQueryObserver/utssdk/global.d.ts +13 -0
  150. package/types/uni/uts-plugin-extend/lib/uni-createMediaQueryObserver/utssdk/index.d.ts +5 -0
  151. package/types/uni/uts-plugin-extend/lib/uni-createMediaQueryObserver/utssdk/interface.d.ts +126 -0
  152. package/types/uni/uts-plugin-extend/lib/uni-locale/utssdk/interface.d.ts +3 -3
  153. package/types/uni-cloud/interface.d.ts +57 -3
  154. package/types/uni-cloud/unicloud-db/index.ts +3 -3
  155. package/types/vue/CheckboxGroupChangeEvent.d.ts +9 -1
  156. package/types/vue/PickerViewChangeEvent.d.ts +8 -0
  157. package/types/vue/ProgressActiveendEvent.d.ts +4 -0
  158. package/types/vue/RadioGroupChangeEvent.d.ts +9 -1
  159. package/types/vue/SliderChangeEvent.d.ts +4 -0
  160. package/types/vue/SwitchChangeEvent.d.ts +5 -1
  161. package/types/vue/UniCanvasElement.d.ts +6 -1
  162. package/types/vue/UniCloudDBElement.d.ts +5 -0
  163. package/types/vue/UniFormElement.d.ts +6 -1
  164. package/types/vue/UniNavigatorElement.d.ts +5 -0
  165. package/types/vue/global.d.ts +10 -9
  166. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/global.d.ts +0 -78
  167. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/index.d.ts +0 -38
  168. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/interface.d.ts +0 -642
  169. package/types/uni/uts-plugin-extend/lib/uni-getClipboardData/utssdk/global.d.ts +0 -21
  170. package/types/uni/uts-plugin-extend/lib/uni-getClipboardData/utssdk/index.d.ts +0 -9
  171. package/types/uni/uts-plugin-extend/lib/uni-getClipboardData/utssdk/interface.d.ts +0 -119
  172. package/types/uni/uts-plugin-extend/lib/uni-setClipboardData/utssdk/global.d.ts +0 -21
  173. package/types/uni/uts-plugin-extend/lib/uni-setClipboardData/utssdk/index.d.ts +0 -9
  174. package/types/uni/uts-plugin-extend/lib/uni-setClipboardData/utssdk/interface.d.ts +0 -122
  175. package/types/uni-cloud/unicloud-db/index.d.ts +0 -81
@@ -0,0 +1,1943 @@
1
+ /**
2
+ * @package io.dcloud.uniapp.runtime
3
+ */
4
+
5
+ import { Image } from "./IUniElement"
6
+ import { Path2D } from "./Path2D"
7
+
8
+ export interface TextMetrics {
9
+ readonly width: number
10
+ }
11
+
12
+ /**
13
+ * 描述 <canvas> 元素的一个隐含像素数据的区域
14
+ * @uniPlatform {
15
+ * "app": {
16
+ * "android": {
17
+ * "osVer": "5.0",
18
+ * "uniVer": "√",
19
+ * "unixVer": "x"
20
+ * },
21
+ * "ios": {
22
+ * "osVer": "12.0",
23
+ * "uniVer": "√",
24
+ * "unixVer": "x"
25
+ * }
26
+ * }
27
+ * "web": {
28
+ * "uniVer": "√",
29
+ * "unixVer": "4.21"
30
+ * }
31
+ * }
32
+ */
33
+ export interface ImageData {
34
+ readonly width: number
35
+ readonly height: number
36
+ }
37
+
38
+ export interface CanvasPattern {
39
+
40
+ }
41
+
42
+ export interface CanvasGradient {
43
+ /**
44
+ * 添加颜色的渐变点。小于最小 stop 的部分会按最小 stop 的 color 来渲染,大于最大 stop 的部分会按最大 stop 的 color 来渲染
45
+ * @param {number} stop 表示渐变中开始与结束之间的位置,范围 0-1
46
+ * @param {string} color 渐变点的颜色
47
+ * @uniPlatform {
48
+ * "app": {
49
+ * "android": {
50
+ * "osVer": "5.0",
51
+ * "uniVer": "√",
52
+ * "unixVer": "4.25"
53
+ * },
54
+ * "ios": {
55
+ * "osVer": "12.0",
56
+ * "uniVer": "√",
57
+ * "unixVer": "4.25"
58
+ * }
59
+ * }
60
+ * "web": {
61
+ * "uniVer": "√",
62
+ * "unixVer": "4.21"
63
+ * }
64
+ * }
65
+ */
66
+ addColorStop(stop: number, color: string): void
67
+ }
68
+
69
+ export interface CanvasRenderingContext2D {
70
+
71
+ /**
72
+ * 是对与给定上下文关联的HTMLCanvasElement对象的只读引用
73
+ */
74
+ readonly canvas: UniCanvasElement
75
+
76
+ /**
77
+ * 描述当前文本方向
78
+ * @uniPlatform {
79
+ * "app": {
80
+ * "android": {
81
+ * "osVer": "5.0",
82
+ * "uniVer": "√",
83
+ * "unixVer": "x"
84
+ * },
85
+ * "ios": {
86
+ * "osVer": "12.0",
87
+ * "uniVer": "√",
88
+ * "unixVer": "x"
89
+ * }
90
+ * }
91
+ * "web": {
92
+ * "uniVer": "√",
93
+ * "unixVer": "4.21"
94
+ * }
95
+ * }
96
+ */
97
+ direction: string
98
+
99
+ /**
100
+ * 设置填充颜色
101
+ * @defaultValue #000 (黑色)
102
+ * @uniPlatform {
103
+ * "app": {
104
+ * "android": {
105
+ * "osVer": "5.0",
106
+ * "uniVer": "√",
107
+ * "unixVer": "4.25"
108
+ * },
109
+ * "ios": {
110
+ * "osVer": "12.0",
111
+ * "uniVer": "√",
112
+ * "unixVer": "4.25"
113
+ * }
114
+ * }
115
+ * "web": {
116
+ * "uniVer": "√",
117
+ * "unixVer": "4.21"
118
+ * }
119
+ * }
120
+ */
121
+ fillStyle: CanvasGradient | string
122
+
123
+ /**
124
+ * 提供模糊、灰度等过滤效果的属性。它类似于 CSS filter 属性,并且接受相同的函数
125
+ * @uniPlatform {
126
+ * "app": {
127
+ * "android": {
128
+ * "osVer": "5.0",
129
+ * "uniVer": "√",
130
+ * "unixVer": "x"
131
+ * },
132
+ * "ios": {
133
+ * "osVer": "12.0",
134
+ * "uniVer": "√",
135
+ * "unixVer": "x"
136
+ * }
137
+ * }
138
+ * "web": {
139
+ * "uniVer": "√",
140
+ * "unixVer": "4.21"
141
+ * }
142
+ * }
143
+ */
144
+ filter: string
145
+
146
+ /**
147
+ * 设置字体大小
148
+ * @defaultValue 10px
149
+ * @uniPlatform {
150
+ * "app": {
151
+ * "android": {
152
+ * "osVer": "5.0",
153
+ * "uniVer": "√",
154
+ * "unixVer": "4.25"
155
+ * },
156
+ * "ios": {
157
+ * "osVer": "12.0",
158
+ * "uniVer": "√",
159
+ * "unixVer": "4.25"
160
+ * }
161
+ * }
162
+ * "web": {
163
+ * "uniVer": "√",
164
+ * "unixVer": "4.21"
165
+ * }
166
+ * }
167
+ */
168
+ font: string
169
+
170
+ /**
171
+ * 指定绘制文本时字体如何被扩展或压缩。该属性对应于 CSS 中的 font-stretch 属性,当使用关键字时(百分比值不支持)
172
+ * @uniPlatform {
173
+ * "app": {
174
+ * "android": {
175
+ * "osVer": "5.0",
176
+ * "uniVer": "√",
177
+ * "unixVer": "x"
178
+ * },
179
+ * "ios": {
180
+ * "osVer": "12.0",
181
+ * "uniVer": "√",
182
+ * "unixVer": "x"
183
+ * }
184
+ * }
185
+ * "web": {
186
+ * "uniVer": "√",
187
+ * "unixVer": "4.21"
188
+ * }
189
+ * }
190
+ */
191
+ fontStretch: string
192
+
193
+ /**
194
+ * 用来描述在 canvas 上绘图之前,设置图形和图片透明度的属性。数值的范围从 0.0(完全透明)到 1.0(完全不透明)
195
+ * @defaultValue 1.0
196
+ * @uniPlatform {
197
+ * "app": {
198
+ * "android": {
199
+ * "osVer": "5.0",
200
+ * "uniVer": "√",
201
+ * "unixVer": "4.25"
202
+ * },
203
+ * "ios": {
204
+ * "osVer": "12.0",
205
+ * "uniVer": "√",
206
+ * "unixVer": "4.25"
207
+ * }
208
+ * }
209
+ * "web": {
210
+ * "uniVer": "√",
211
+ * "unixVer": "4.21"
212
+ * }
213
+ * }
214
+ */
215
+ globalAlpha: number
216
+
217
+ /**
218
+ * 在绘制新形状时应用的合成操作的类型,其中 type 是用于标识要使用的合成或混合模式操作的字符串
219
+ * @uniPlatform {
220
+ * "app": {
221
+ * "android": {
222
+ * "osVer": "5.0",
223
+ * "uniVer": "√",
224
+ * "unixVer": "4.25"
225
+ * },
226
+ * "ios": {
227
+ * "osVer": "12.0",
228
+ * "uniVer": "√",
229
+ * "unixVer": "4.25"
230
+ * }
231
+ * }
232
+ * "web": {
233
+ * "uniVer": "√",
234
+ * "unixVer": "4.21"
235
+ * }
236
+ * }
237
+ */
238
+ globalCompositeOperation: "" | "source-over" | "source-atop" | "source-in" | "source-out" | "destination-over" | "destination-atop" | "destination-in" | "destination-out" | "lighter" | "copy" | "xor"
239
+
240
+ /**
241
+ * 属性用于设置是否对缩放后的图片进行平滑处理,true 表示进行平滑处理(默认值),false 表示不进行
242
+ * @uniPlatform {
243
+ * "app": {
244
+ * "android": {
245
+ * "osVer": "5.0",
246
+ * "uniVer": "√",
247
+ * "unixVer": "x"
248
+ * },
249
+ * "ios": {
250
+ * "osVer": "12.0",
251
+ * "uniVer": "√",
252
+ * "unixVer": "x"
253
+ * }
254
+ * }
255
+ * "web": {
256
+ * "uniVer": "√",
257
+ * "unixVer": "4.21"
258
+ * }
259
+ * }
260
+ */
261
+ imageSmoothingEnabled: boolean
262
+
263
+ /**
264
+ * 用于设置图像平滑度,要使此属性生效,imageSmoothingEnabled 属性必须为 true
265
+ * @uniPlatform {
266
+ * "app": {
267
+ * "android": {
268
+ * "osVer": "5.0",
269
+ * "uniVer": "√",
270
+ * "unixVer": "x"
271
+ * },
272
+ * "ios": {
273
+ * "osVer": "12.0",
274
+ * "uniVer": "√",
275
+ * "unixVer": "x"
276
+ * }
277
+ * }
278
+ * "web": {
279
+ * "uniVer": "√",
280
+ * "unixVer": "4.21"
281
+ * }
282
+ * }
283
+ */
284
+ imageSmoothingQuality: string
285
+
286
+ /**
287
+ * 用于指定绘制文本时字母之间的间距。这对应于 CSS 中的 letter-spacing 属性
288
+ * @uniPlatform {
289
+ * "app": {
290
+ * "android": {
291
+ * "osVer": "5.0",
292
+ * "uniVer": "√",
293
+ * "unixVer": "x"
294
+ * },
295
+ * "ios": {
296
+ * "osVer": "12.0",
297
+ * "uniVer": "√",
298
+ * "unixVer": "x"
299
+ * }
300
+ * }
301
+ * "web": {
302
+ * "uniVer": "√",
303
+ * "unixVer": "4.21"
304
+ * }
305
+ * }
306
+ */
307
+ letterSpacing: string | number
308
+
309
+ /**
310
+ * 指定如何绘制每一条线条末端的属性,可选值:`butt`线段末端以方形结束;`round`线段末端以圆形结束;`square`线段末端以方形结束,但是会增加一个一半宽度的矩形区域。
311
+ * @defaultValue butt
312
+ * @uniPlatform {
313
+ * "app": {
314
+ * "android": {
315
+ * "osVer": "5.0",
316
+ * "uniVer": "√",
317
+ * "unixVer": "4.25"
318
+ * },
319
+ * "ios": {
320
+ * "osVer": "12.0",
321
+ * "uniVer": "√",
322
+ * "unixVer": "4.25"
323
+ * }
324
+ * }
325
+ * "web": {
326
+ * "uniVer": "√",
327
+ * "unixVer": "4.21"
328
+ * }
329
+ * }
330
+ */
331
+ lineCap: "" | "butt" | "round" | "square"
332
+
333
+ /**
334
+ * 设置虚线偏移量
335
+ * @uniPlatform {
336
+ * "app": {
337
+ * "android": {
338
+ * "osVer": "5.0",
339
+ * "uniVer": "√",
340
+ * "unixVer": "4.25"
341
+ * },
342
+ * "ios": {
343
+ * "osVer": "12.0",
344
+ * "uniVer": "√",
345
+ * "unixVer": "4.25"
346
+ * }
347
+ * }
348
+ * "web": {
349
+ * "uniVer": "√",
350
+ * "unixVer": "4.21"
351
+ * }
352
+ * }
353
+ */
354
+ lineDashOffset: number
355
+
356
+ /**
357
+ * 设置 2 个长度不为 0 的线条相连部分如何连接在一起的属性,可选值:`bevel`斜角;`round`圆角;`miter`尖角。
358
+ * @defaultValue miter
359
+ * @uniPlatform {
360
+ * "app": {
361
+ * "android": {
362
+ * "osVer": "5.0",
363
+ * "uniVer": "√",
364
+ * "unixVer": "4.25"
365
+ * },
366
+ * "ios": {
367
+ * "osVer": "12.0",
368
+ * "uniVer": "√",
369
+ * "unixVer": "4.25"
370
+ * }
371
+ * }
372
+ * "web": {
373
+ * "uniVer": "√",
374
+ * "unixVer": "4.21"
375
+ * }
376
+ * }
377
+ */
378
+ lineJoin: "" | "round" | "bevel" | "miter"
379
+
380
+ /**
381
+ * 设置线条的宽度
382
+ * @defaultValue 1px
383
+ * @uniPlatform {
384
+ * "app": {
385
+ * "android": {
386
+ * "osVer": "5.0",
387
+ * "uniVer": "√",
388
+ * "unixVer": "4.25"
389
+ * },
390
+ * "ios": {
391
+ * "osVer": "12.0",
392
+ * "uniVer": "√",
393
+ * "unixVer": "4.25"
394
+ * }
395
+ * }
396
+ * "web": {
397
+ * "uniVer": "√",
398
+ * "unixVer": "4.21"
399
+ * }
400
+ * }
401
+ */
402
+ lineWidth: number
403
+
404
+ /**
405
+ * 设置斜接面限制比例的属性。当获取属性值时,会返回当前的值(默认值是10.0 )。当给属性赋值时,0、负数、 Infinity 和 NaN 都会被忽略;除此之外都会被赋予一个新值。
406
+ * @uniPlatform {
407
+ * "app": {
408
+ * "android": {
409
+ * "osVer": "5.0",
410
+ * "uniVer": "√",
411
+ * "unixVer": "4.25"
412
+ * },
413
+ * "ios": {
414
+ * "osVer": "12.0",
415
+ * "uniVer": "√",
416
+ * "unixVer": "4.25"
417
+ * }
418
+ * }
419
+ * "web": {
420
+ * "uniVer": "√",
421
+ * "unixVer": "4.21"
422
+ * }
423
+ * }
424
+ */
425
+ miterLimit: number
426
+
427
+ /**
428
+ * 用于描述模糊效果程度,其中 0 表示没有模糊,数字越大表示模糊程度越高。这个值不对应于像素数量,并且不受当前变换矩阵的影响。默认值为 0。负数、Infinity 和 NaN 将被忽略
429
+ * @uniPlatform {
430
+ * "app": {
431
+ * "android": {
432
+ * "osVer": "5.0",
433
+ * "uniVer": "√",
434
+ * "unixVer": "x"
435
+ * },
436
+ * "ios": {
437
+ * "osVer": "12.0",
438
+ * "uniVer": "√",
439
+ * "unixVer": "x"
440
+ * }
441
+ * }
442
+ * "web": {
443
+ * "uniVer": "√",
444
+ * "unixVer": "4.21"
445
+ * }
446
+ * }
447
+ */
448
+ shadowBlur: number
449
+
450
+ /**
451
+ * 描述阴影颜色,可以转换成 CSS <color> 值的DOMString 字符串。默认值是 fully-transparent black
452
+ * @uniPlatform {
453
+ * "app": {
454
+ * "android": {
455
+ * "osVer": "5.0",
456
+ * "uniVer": "√",
457
+ * "unixVer": "x"
458
+ * },
459
+ * "ios": {
460
+ * "osVer": "12.0",
461
+ * "uniVer": "√",
462
+ * "unixVer": "x"
463
+ * }
464
+ * }
465
+ * "web": {
466
+ * "uniVer": "√",
467
+ * "unixVer": "4.21"
468
+ * }
469
+ * }
470
+ */
471
+ shadowColor: string
472
+
473
+ /**
474
+ * 指定阴影在水平方向上的偏移距离。正值向右偏移,负值向左偏移。默认值为 0(无水平偏移)。Infinity 和 NaN 值将被忽略
475
+ * @uniPlatform {
476
+ * "app": {
477
+ * "android": {
478
+ * "osVer": "5.0",
479
+ * "uniVer": "√",
480
+ * "unixVer": "x"
481
+ * },
482
+ * "ios": {
483
+ * "osVer": "12.0",
484
+ * "uniVer": "√",
485
+ * "unixVer": "x"
486
+ * }
487
+ * }
488
+ * "web": {
489
+ * "uniVer": "√",
490
+ * "unixVer": "4.21"
491
+ * }
492
+ * }
493
+ */
494
+ shadowOffsetX: number
495
+
496
+ /**
497
+ * 指定阴影在垂直方向上的偏移距离。正值向右偏移,负值向左偏移。默认值为 0(无水平偏移)。Infinity 和 NaN 值将被忽略
498
+ * @uniPlatform {
499
+ * "app": {
500
+ * "android": {
501
+ * "osVer": "5.0",
502
+ * "uniVer": "√",
503
+ * "unixVer": "x"
504
+ * },
505
+ * "ios": {
506
+ * "osVer": "12.0",
507
+ * "uniVer": "√",
508
+ * "unixVer": "x"
509
+ * }
510
+ * }
511
+ * "web": {
512
+ * "uniVer": "√",
513
+ * "unixVer": "4.21"
514
+ * }
515
+ * }
516
+ */
517
+ shadowOffsetY: number
518
+
519
+ /**
520
+ * 设置边框的颜色
521
+ * @defaultValue #000 (黑色)
522
+ * @uniPlatform {
523
+ * "app": {
524
+ * "android": {
525
+ * "osVer": "5.0",
526
+ * "uniVer": "√",
527
+ * "unixVer": "4.25"
528
+ * },
529
+ * "ios": {
530
+ * "osVer": "12.0",
531
+ * "uniVer": "√",
532
+ * "unixVer": "4.25"
533
+ * }
534
+ * }
535
+ * "web": {
536
+ * "uniVer": "√",
537
+ * "unixVer": "4.21"
538
+ * }
539
+ * }
540
+ */
541
+ strokeStyle: CanvasGradient | string
542
+
543
+ /**
544
+ * 设置文本的对齐方式,可取值:`left`左对齐;`center`居中对齐;`right`右对齐。
545
+ * @defaultValue left
546
+ * @uniPlatform {
547
+ * "app": {
548
+ * "android": {
549
+ * "osVer": "5.0",
550
+ * "uniVer": "√",
551
+ * "unixVer": "4.25"
552
+ * },
553
+ * "ios": {
554
+ * "osVer": "12.0",
555
+ * "uniVer": "√",
556
+ * "unixVer": "4.25"
557
+ * }
558
+ * }
559
+ * "web": {
560
+ * "uniVer": "√",
561
+ * "unixVer": "4.21"
562
+ * }
563
+ * }
564
+ */
565
+ textAlign: "" | "left" | "right" | "center" | "start" | "end"
566
+
567
+
568
+ /**
569
+ * 描述绘制文本时,当前文本基线的属性
570
+ * @uniPlatform {
571
+ * "app": {
572
+ * "android": {
573
+ * "osVer": "5.0",
574
+ * "uniVer": "√",
575
+ * "unixVer": "4.25"
576
+ * },
577
+ * "ios": {
578
+ * "osVer": "12.0",
579
+ * "uniVer": "√",
580
+ * "unixVer": "4.25"
581
+ * }
582
+ * }
583
+ * "web": {
584
+ * "uniVer": "√",
585
+ * "unixVer": "4.21"
586
+ * }
587
+ * }
588
+ */
589
+ textBaseline: "" | "top" | "hanging" | "middle" | "alphabetic" | "ideographic" | "bottom"
590
+
591
+ /**
592
+ * 用于在渲染文本时向渲染引擎提供应该如何优化的相关信息
593
+ * @uniPlatform {
594
+ * "app": {
595
+ * "android": {
596
+ * "osVer": "5.0",
597
+ * "uniVer": "x",
598
+ * "unixVer": "x"
599
+ * },
600
+ * "ios": {
601
+ * "osVer": "12.0",
602
+ * "uniVer": "x",
603
+ * "unixVer": "x"
604
+ * }
605
+ * }
606
+ * "web": {
607
+ * "uniVer": "√",
608
+ * "unixVer": "4.21"
609
+ * }
610
+ * }
611
+ */
612
+ textRendering: number
613
+
614
+ /**
615
+ * 绘制一段弧线
616
+ * @param {number} x 圆弧中心(圆心)的 x 轴坐标
617
+ * @param {number} y 圆弧中心(圆心)的 y 轴坐标
618
+ * @param {number} radius 圆弧的半径
619
+ * @param {number} startAngle 圆弧的起始点,x 轴方向开始计算,单位为弧度
620
+ * @param {number} endAngle 圆弧的终点,单位为弧度
621
+ * @param {number} [anticlockwise=true] 圆弧绘制方向,true:逆时针绘制,false:顺时针绘制。
622
+ * @uniPlatform {
623
+ * "app": {
624
+ * "android": {
625
+ * "osVer": "5.0",
626
+ * "uniVer": "√",
627
+ * "unixVer": "4.25"
628
+ * },
629
+ * "ios": {
630
+ * "osVer": "12.0",
631
+ * "uniVer": "√",
632
+ * "unixVer": "4.25"
633
+ * }
634
+ * }
635
+ * "web": {
636
+ * "uniVer": "√",
637
+ * "unixVer": "4.21"
638
+ * }
639
+ * }
640
+ */
641
+ arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise: boolean): void
642
+
643
+ /**
644
+ * 根据控制点和半径绘制圆弧路径,使用当前的描点 (前一个 moveTo 或 lineTo 等函数的止点)。根据当前描点与给定的控制点 1 连接的直线,和控制点 1 与控制点 2 连接的直线,作为使用指定半径的圆的切线,画出两条切线之间的弧线路径
645
+ * @param {number} x1 第一个控制点的 x 轴坐标
646
+ * @param {number} y1 第一个控制点的 y 轴坐标
647
+ * @param {number} x2 第二个控制点的 x 轴坐标
648
+ * @param {number} y2 第二个控制点的 y 轴坐标
649
+ * @param {number} radius 圆弧的半径
650
+ * @uniPlatform {
651
+ * "app": {
652
+ * "android": {
653
+ * "osVer": "5.0",
654
+ * "uniVer": "√",
655
+ * "unixVer": "4.25"
656
+ * },
657
+ * "ios": {
658
+ * "osVer": "12.0",
659
+ * "uniVer": "√",
660
+ * "unixVer": "4.25"
661
+ * }
662
+ * }
663
+ * "web": {
664
+ * "uniVer": "√",
665
+ * "unixVer": "4.21"
666
+ * }
667
+ * }
668
+ */
669
+ arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void
670
+
671
+ /**
672
+ * 开始创建一个路径。需要调用 fill 或者 stroke 才会使用路径进行填充或描边
673
+ * @uniPlatform {
674
+ * "app": {
675
+ * "android": {
676
+ * "osVer": "5.0",
677
+ * "uniVer": "√",
678
+ * "unixVer": "4.25"
679
+ * },
680
+ * "ios": {
681
+ * "osVer": "12.0",
682
+ * "uniVer": "√",
683
+ * "unixVer": "4.25"
684
+ * }
685
+ * }
686
+ * "web": {
687
+ * "uniVer": "√",
688
+ * "unixVer": "4.21"
689
+ * }
690
+ * }
691
+ */
692
+ beginPath(): void
693
+
694
+ /**
695
+ * 绘制三次贝赛尔曲线路径
696
+ * @param {number} cp1x 第一个控制点的 x 轴坐标
697
+ * @param {number} cp1y 第一个控制点的 y 轴坐标
698
+ * @param {number} cp2x 第二个控制点的 x 轴坐标
699
+ * @param {number} cp2y 第二个控制点的 y 轴坐标
700
+ * @param {number} x 结束点的 x 轴坐标
701
+ * @param {number} y 结束点的 y 轴坐标
702
+ * @uniPlatform {
703
+ * "app": {
704
+ * "android": {
705
+ * "osVer": "5.0",
706
+ * "uniVer": "√",
707
+ * "unixVer": "4.25"
708
+ * },
709
+ * "ios": {
710
+ * "osVer": "12.0",
711
+ * "uniVer": "√",
712
+ * "unixVer": "4.25"
713
+ * }
714
+ * }
715
+ * "web": {
716
+ * "uniVer": "√",
717
+ * "unixVer": "4.21"
718
+ * }
719
+ * }
720
+ */
721
+ bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void
722
+
723
+ /**
724
+ * 清除画布上在该矩形区域内的内容
725
+ * @param {number} x 矩形起点的 x 轴坐标
726
+ * @param {number} y 矩形起点的 y 轴坐标
727
+ * @param {number} width 矩形的宽度
728
+ * @param {number} height 矩形的高度
729
+ * @uniPlatform {
730
+ * "app": {
731
+ * "android": {
732
+ * "osVer": "5.0",
733
+ * "uniVer": "√",
734
+ * "unixVer": "4.25"
735
+ * },
736
+ * "ios": {
737
+ * "osVer": "12.0",
738
+ * "uniVer": "√",
739
+ * "unixVer": "4.25"
740
+ * }
741
+ * }
742
+ * "web": {
743
+ * "uniVer": "√",
744
+ * "unixVer": "4.21"
745
+ * }
746
+ * }
747
+ */
748
+ clearRect(x: number, y: number, width: number, height: number): void
749
+
750
+ /**
751
+ * 将当前创建的路径设置为当前剪切路径
752
+ * @uniPlatform {
753
+ * "app": {
754
+ * "android": {
755
+ * "osVer": "5.0",
756
+ * "uniVer": "√",
757
+ * "unixVer": "4.25"
758
+ * },
759
+ * "ios": {
760
+ * "osVer": "12.0",
761
+ * "uniVer": "√",
762
+ * "unixVer": "4.25"
763
+ * }
764
+ * }
765
+ * "web": {
766
+ * "uniVer": "√",
767
+ * "unixVer": "4.21"
768
+ * }
769
+ * }
770
+ */
771
+ clip(): void
772
+
773
+ /**
774
+ * 将当前创建的路径设置为当前剪切路径
775
+ * @uniPlatform {
776
+ * "app": {
777
+ * "android": {
778
+ * "osVer": "5.0",
779
+ * "uniVer": "√",
780
+ * "unixVer": "x"
781
+ * },
782
+ * "ios": {
783
+ * "osVer": "12.0",
784
+ * "uniVer": "√",
785
+ * "unixVer": "x"
786
+ * }
787
+ * }
788
+ * "web": {
789
+ * "uniVer": "√",
790
+ * "unixVer": "4.21"
791
+ * }
792
+ * }
793
+ */
794
+ clip(path: Path2D): void
795
+
796
+ /**
797
+ * 将当前创建的路径设置为当前剪切路径
798
+ * @uniPlatform {
799
+ * "app": {
800
+ * "android": {
801
+ * "osVer": "5.0",
802
+ * "uniVer": "√",
803
+ * "unixVer": "x"
804
+ * },
805
+ * "ios": {
806
+ * "osVer": "12.0",
807
+ * "uniVer": "√",
808
+ * "unixVer": "x"
809
+ * }
810
+ * }
811
+ * "web": {
812
+ * "uniVer": "√",
813
+ * "unixVer": "4.21"
814
+ * }
815
+ * }
816
+ */
817
+ clip(fillRule: String): void
818
+
819
+ /**
820
+ * 将当前创建的路径设置为当前剪切路径
821
+ * @uniPlatform {
822
+ * "app": {
823
+ * "android": {
824
+ * "osVer": "5.0",
825
+ * "uniVer": "√",
826
+ * "unixVer": "x"
827
+ * },
828
+ * "ios": {
829
+ * "osVer": "12.0",
830
+ * "uniVer": "√",
831
+ * "unixVer": "x"
832
+ * }
833
+ * }
834
+ * "web": {
835
+ * "uniVer": "√",
836
+ * "unixVer": "4.21"
837
+ * }
838
+ * }
839
+ */
840
+ clip(path: Path2D, fillRule: String): void
841
+
842
+ /**
843
+ * 关闭一个路径
844
+ * @uniPlatform {
845
+ * "app": {
846
+ * "android": {
847
+ * "osVer": "5.0",
848
+ * "uniVer": "√",
849
+ * "unixVer": "4.25"
850
+ * },
851
+ * "ios": {
852
+ * "osVer": "12.0",
853
+ * "uniVer": "√",
854
+ * "unixVer": "4.25"
855
+ * }
856
+ * }
857
+ * "web": {
858
+ * "uniVer": "√",
859
+ * "unixVer": "4.21"
860
+ * }
861
+ * }
862
+ */
863
+ closePath(): void
864
+
865
+ /**
866
+ * 创建一个新的、空白的、指定大小的 ImageData 对象。所有的像素在新对象中都是透明的黑色
867
+ * @uniPlatform {
868
+ * "app": {
869
+ * "android": {
870
+ * "osVer": "5.0",
871
+ * "uniVer": "√",
872
+ * "unixVer": "x"
873
+ * },
874
+ * "ios": {
875
+ * "osVer": "12.0",
876
+ * "uniVer": "√",
877
+ * "unixVer": "x"
878
+ * }
879
+ * }
880
+ * "web": {
881
+ * "uniVer": "√",
882
+ * "unixVer": "4.21"
883
+ * }
884
+ * }
885
+ */
886
+ createImageData(width: number, height: number): void
887
+
888
+ /**
889
+ * 对指定的图像创建模式的方法,可在指定的方向上重复元图像
890
+ * @param {string} image 重复的图像源,支持代码包路径和本地临时路径 (本地路径)
891
+ * @param {string} repetition 如何重复图像
892
+ * @uniPlatform {
893
+ * "app": {
894
+ * "android": {
895
+ * "osVer": "5.0",
896
+ * "uniVer": "√",
897
+ * "unixVer": "4.25"
898
+ * },
899
+ * "ios": {
900
+ * "osVer": "12.0",
901
+ * "uniVer": "√",
902
+ * "unixVer": "4.25"
903
+ * }
904
+ * }
905
+ * "web": {
906
+ * "uniVer": "√",
907
+ * "unixVer": "4.21"
908
+ * }
909
+ * }
910
+ */
911
+ createPattern(image: Image, repetition: string): CanvasPattern
912
+
913
+ /**
914
+ * 创建一个线性的渐变颜色。返回的CanvasGradient对象需要使用 CanvasGradient.addColorStop() 来指定渐变点,至少要两个
915
+ * @param {number} x0 起点的 x 坐标
916
+ * @param {number} y0 起点的 y 坐标
917
+ * @param {number} x1 终点的 x 坐标
918
+ * @param {number} y1 终点的 y 坐标
919
+ * @uniPlatform {
920
+ * "app": {
921
+ * "android": {
922
+ * "osVer": "5.0",
923
+ * "uniVer": "√",
924
+ * "unixVer": "4.25"
925
+ * },
926
+ * "ios": {
927
+ * "osVer": "12.0",
928
+ * "uniVer": "√",
929
+ * "unixVer": "4.25"
930
+ * }
931
+ * }
932
+ * "web": {
933
+ * "uniVer": "√",
934
+ * "unixVer": "4.21"
935
+ * }
936
+ * }
937
+ */
938
+ createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient
939
+
940
+ /**
941
+ * 根据参数确定两个圆的坐标,绘制放射性渐变
942
+ * @param {number} x0 开始圆形的 x 轴坐标
943
+ * @param {number} y0 开始圆形的 y 轴坐标
944
+ * @param {number} r0 开始圆形的半径
945
+ * @param {number} x1 结束圆形的 x 轴坐标
946
+ * @param {number} y1 结束圆形的 y 轴坐标
947
+ * @param {number} r1 结束圆形的半径
948
+ * @uniPlatform {
949
+ * "app": {
950
+ * "android": {
951
+ * "osVer": "5.0",
952
+ * "uniVer": "x",
953
+ * "unixVer": "4.25"
954
+ * },
955
+ * "ios": {
956
+ * "osVer": "12.0",
957
+ * "uniVer": "x",
958
+ * "unixVer": "4.25"
959
+ * }
960
+ * }
961
+ * "web": {
962
+ * "uniVer": "√",
963
+ * "unixVer": "4.21"
964
+ * }
965
+ * }
966
+ */
967
+ createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r01: number): CanvasGradient
968
+
969
+ /**
970
+ * 将之前在绘图上下文中的描述(路径、变形、样式)画到 canvas 中
971
+ * @uniPlatform {
972
+ * "app": {
973
+ * "android": {
974
+ * "osVer": "5.0",
975
+ * "uniVer": "√",
976
+ * "unixVer": "4.25"
977
+ * },
978
+ * "ios": {
979
+ * "osVer": "12.0",
980
+ * "uniVer": "√",
981
+ * "unixVer": "4.25"
982
+ * }
983
+ * }
984
+ * "web": {
985
+ * "uniVer": "√",
986
+ * "unixVer": "4.21"
987
+ * }
988
+ * }
989
+ */
990
+ draw(): void
991
+
992
+ /**
993
+ * 绘制图像到画布
994
+ * @param {string} imageResource 所要绘制的图片资源
995
+ * @param {number} sx 需要绘制到画布中的,imageResource的矩形(裁剪)选择框的左上角 x 坐标
996
+ * @param {number} sy 需要绘制到画布中的,imageResource的矩形(裁剪)选择框的左上角 y 坐标
997
+ * @param {number} sWidth 需要绘制到画布中的,imageResource的矩形(裁剪)选择框的宽度
998
+ * @param {number} sHeight 需要绘制到画布中的,imageResource的矩形(裁剪)选择框的高度
999
+ * @param {number} dx imageResource的左上角在目标 canvas 上 x 轴的位置
1000
+ * @param {number} dy imageResource的左上角在目标 canvas 上 y 轴的位置
1001
+ * @param {number} dWidth 在目标画布上绘制imageResource的宽度,允许对绘制的imageResource进行缩放
1002
+ * @param {number} dHeight 在目标画布上绘制imageResource的高度,允许对绘制的imageResource进行缩放
1003
+ * @uniPlatform {
1004
+ * "app": {
1005
+ * "android": {
1006
+ * "osVer": "5.0",
1007
+ * "uniVer": "√",
1008
+ * "unixVer": "4.25"
1009
+ * },
1010
+ * "ios": {
1011
+ * "osVer": "12.0",
1012
+ * "uniVer": "√",
1013
+ * "unixVer": "4.25"
1014
+ * }
1015
+ * }
1016
+ * "web": {
1017
+ * "uniVer": "√",
1018
+ * "unixVer": "4.21"
1019
+ * }
1020
+ * }
1021
+ */
1022
+ drawImage(imageResource: Image, sx: number, sy: number, sWidth: number, sHeight: number, dx: number, dy: number, dWidth: number, dHeight: number): void
1023
+
1024
+
1025
+ /**
1026
+ * 添加椭圆路径。椭圆的圆心在(x,y)位置,半径分别是radiusX 和 radiusY,按照anticlockwise(默认顺时针)指定的方向,从 startAngle 开始绘制,到 endAngle 结束
1027
+ * @uniPlatform {
1028
+ * "app": {
1029
+ * "android": {
1030
+ * "osVer": "5.0",
1031
+ * "uniVer": "√",
1032
+ * "unixVer": "x"
1033
+ * },
1034
+ * "ios": {
1035
+ * "osVer": "12.0",
1036
+ * "uniVer": "√",
1037
+ * "unixVer": "x"
1038
+ * }
1039
+ * }
1040
+ * "web": {
1041
+ * "uniVer": "√",
1042
+ * "unixVer": "4.21"
1043
+ * }
1044
+ * }
1045
+ */
1046
+ ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise: boolean): void
1047
+
1048
+
1049
+ /**
1050
+ * 对当前路径中的内容进行填充
1051
+ * @uniPlatform {
1052
+ * "app": {
1053
+ * "android": {
1054
+ * "osVer": "5.0",
1055
+ * "uniVer": "√",
1056
+ * "unixVer": "4.25"
1057
+ * },
1058
+ * "ios": {
1059
+ * "osVer": "12.0",
1060
+ * "uniVer": "√",
1061
+ * "unixVer": "4.25"
1062
+ * }
1063
+ * }
1064
+ * "web": {
1065
+ * "uniVer": "√",
1066
+ * "unixVer": "4.21"
1067
+ * }
1068
+ * }
1069
+ */
1070
+ fill(): void
1071
+
1072
+ /**
1073
+ * 对当前路径中的内容进行填充
1074
+ * @param {string} fillRule 填充当前或已存在的路径的方法。采取非零环绕(nonzero)或者奇偶环绕(evenodd)规则
1075
+ * @uniPlatform {
1076
+ * "app": {
1077
+ * "android": {
1078
+ * "osVer": "5.0",
1079
+ * "uniVer": "√",
1080
+ * "unixVer": "4.25"
1081
+ * },
1082
+ * "ios": {
1083
+ * "osVer": "12.0",
1084
+ * "uniVer": "√",
1085
+ * "unixVer": "4.25"
1086
+ * }
1087
+ * }
1088
+ * "web": {
1089
+ * "uniVer": "√",
1090
+ * "unixVer": "4.21"
1091
+ * }
1092
+ * }
1093
+ */
1094
+ fill(fillRule: "nonzero" | "evenodd"): void
1095
+
1096
+ /**
1097
+ * 对指定路径中的内容进行填充
1098
+ * @param {string} path 填充路径
1099
+ * @param {string} fillRule 填充当前或已存在的路径的方法。采取非零环绕(nonzero)或者奇偶环绕(evenodd)规则
1100
+ * @uniPlatform {
1101
+ * "app": {
1102
+ * "android": {
1103
+ * "osVer": "5.0",
1104
+ * "uniVer": "√",
1105
+ * "unixVer": "4.25"
1106
+ * },
1107
+ * "ios": {
1108
+ * "osVer": "12.0",
1109
+ * "uniVer": "√",
1110
+ * "unixVer": "4.25"
1111
+ * }
1112
+ * }
1113
+ * "web": {
1114
+ * "uniVer": "√",
1115
+ * "unixVer": "4.21"
1116
+ * }
1117
+ * }
1118
+ */
1119
+ fill(path: Path2D, fillRule: "nonzero" | "evenodd"): void
1120
+
1121
+ /**
1122
+ *填充一个矩形。用 setFillStyle 设置矩形的填充色,如果没设置默认是黑色
1123
+ * @param {number} x 矩形起点的 x 轴坐标
1124
+ * @param {number} y 矩形起点的 y 轴坐标
1125
+ * @param {number} width 矩形的宽度
1126
+ * @param {number} height 矩形的高度
1127
+ * @uniPlatform {
1128
+ * "app": {
1129
+ * "android": {
1130
+ * "osVer": "5.0",
1131
+ * "uniVer": "√",
1132
+ * "unixVer": "4.25"
1133
+ * },
1134
+ * "ios": {
1135
+ * "osVer": "12.0",
1136
+ * "uniVer": "√",
1137
+ * "unixVer": "4.25"
1138
+ * }
1139
+ * }
1140
+ * "web": {
1141
+ * "uniVer": "√",
1142
+ * "unixVer": "4.21"
1143
+ * }
1144
+ * }
1145
+ */
1146
+ fillRect(x: number, y: number, width: number, height: number): void
1147
+
1148
+
1149
+ /**
1150
+ * 在画布上绘制文本
1151
+ * @param {string} text 要渲染的文本字符串
1152
+ * @param {number} x 开始绘制文本的点的 X 轴坐标
1153
+ * @param {number} y 开始绘制文本的点的 X 轴坐标
1154
+ * @param {number} maxWidth 需要绘制的最大宽度
1155
+ * @uniPlatform {
1156
+ * "app": {
1157
+ * "android": {
1158
+ * "osVer": "5.0",
1159
+ * "uniVer": "√",
1160
+ * "unixVer": "4.25"
1161
+ * },
1162
+ * "ios": {
1163
+ * "osVer": "12.0",
1164
+ * "uniVer": "√",
1165
+ * "unixVer": "4.25"
1166
+ * }
1167
+ * }
1168
+ * "web": {
1169
+ * "uniVer": "√",
1170
+ * "unixVer": "4.21"
1171
+ * }
1172
+ * }
1173
+ */
1174
+ fillText(text: string, x: number, y: number, maxWidth: number): void
1175
+
1176
+ /**
1177
+ * 返回一个ImageData对象,用来描述 canvas 区域隐含的像素数据,这个区域通过矩形表示,起始点为*(sx, sy)、宽为sw、高为sh。
1178
+ * @param {number} sx 将要被提取的图像数据矩形区域的左上角 x 坐标
1179
+ * @param {number} sy 将要被提取的图像数据矩形区域的左上角 y 坐标
1180
+ * @param {number} sw 将要被提取的图像数据矩形区域的宽度
1181
+ * @param {number} sh 将要被提取的图像数据矩形区域的高度
1182
+ * @uniPlatform {
1183
+ * "app": {
1184
+ * "android": {
1185
+ * "osVer": "5.0",
1186
+ * "uniVer": "√",
1187
+ * "unixVer": "x"
1188
+ * },
1189
+ * "ios": {
1190
+ * "osVer": "12.0",
1191
+ * "uniVer": "√",
1192
+ * "unixVer": "x"
1193
+ * }
1194
+ * }
1195
+ * "web": {
1196
+ * "uniVer": "√",
1197
+ * "unixVer": "4.21"
1198
+ * }
1199
+ * }
1200
+ */
1201
+ getImageData(sx: number, sy: number, sw: number, sh: number): ImageData
1202
+
1203
+ /**
1204
+ * 返回一个Boolean 标记上下文是否已经丢失
1205
+ * @uniPlatform {
1206
+ * "app": {
1207
+ * "android": {
1208
+ * "osVer": "5.0",
1209
+ * "uniVer": "√",
1210
+ * "unixVer": "4.25"
1211
+ * },
1212
+ * "ios": {
1213
+ * "osVer": "12.0",
1214
+ * "uniVer": "√",
1215
+ * "unixVer": "4.25"
1216
+ * }
1217
+ * }
1218
+ * "web": {
1219
+ * "uniVer": "√",
1220
+ * "unixVer": "4.21"
1221
+ * }
1222
+ * }
1223
+ */
1224
+ isContextLost(): Boolean
1225
+
1226
+ /**
1227
+ * 判断在当前路径中是否包含检测点
1228
+ * @param {number} x 检测点的 X 坐标
1229
+ * @param {number} y 检测点的 Y 坐标
1230
+ * @uniPlatform {
1231
+ * "app": {
1232
+ * "android": {
1233
+ * "osVer": "5.0",
1234
+ * "uniVer": "√",
1235
+ * "unixVer": "x"
1236
+ * },
1237
+ * "ios": {
1238
+ * "osVer": "12.0",
1239
+ * "uniVer": "√",
1240
+ * "unixVer": "x"
1241
+ * }
1242
+ * }
1243
+ * "web": {
1244
+ * "uniVer": "√",
1245
+ * "unixVer": "4.21"
1246
+ * }
1247
+ * }
1248
+ */
1249
+ isPointInPath(x: number, y: number): boolean
1250
+
1251
+ /**
1252
+ * 判断在当前路径中是否包含检测点
1253
+ * @param {number} x 检测点的 X 坐标
1254
+ * @param {number} y 检测点的 Y 坐标
1255
+ * @param {number} fillRule 用来决定点在路径内还是在路径外的算法
1256
+ * @uniPlatform {
1257
+ * "app": {
1258
+ * "android": {
1259
+ * "osVer": "5.0",
1260
+ * "uniVer": "√",
1261
+ * "unixVer": "x"
1262
+ * },
1263
+ * "ios": {
1264
+ * "osVer": "12.0",
1265
+ * "uniVer": "√",
1266
+ * "unixVer": "x"
1267
+ * }
1268
+ * }
1269
+ * "web": {
1270
+ * "uniVer": "√",
1271
+ * "unixVer": "4.21"
1272
+ * }
1273
+ * }
1274
+ */
1275
+ isPointInPath(x: number, y: number, fillRule: String): boolean
1276
+
1277
+ /**
1278
+ * 判断在当前路径中是否包含检测点
1279
+ * @param {number} path Path2D应用的路径
1280
+ * @param {number} x 检测点的 X 坐标
1281
+ * @param {number} y 检测点的 Y 坐标
1282
+ * @uniPlatform {
1283
+ * "app": {
1284
+ * "android": {
1285
+ * "osVer": "5.0",
1286
+ * "uniVer": "√",
1287
+ * "unixVer": "x"
1288
+ * },
1289
+ * "ios": {
1290
+ * "osVer": "12.0",
1291
+ * "uniVer": "√",
1292
+ * "unixVer": "x"
1293
+ * }
1294
+ * }
1295
+ * "web": {
1296
+ * "uniVer": "√",
1297
+ * "unixVer": "4.21"
1298
+ * }
1299
+ * }
1300
+ */
1301
+ isPointInPath(path: Path2D, x: number, y: number): boolean
1302
+
1303
+ /**
1304
+ * 判断在当前路径中是否包含检测点
1305
+ * @param {number} path Path2D应用的路径
1306
+ * @param {number} x 检测点的 X 坐标
1307
+ * @param {number} y 检测点的 Y 坐标
1308
+ * @param {number} fillRule 用来决定点在路径内还是在路径外的算法
1309
+ * @uniPlatform {
1310
+ * "app": {
1311
+ * "android": {
1312
+ * "osVer": "5.0",
1313
+ * "uniVer": "√",
1314
+ * "unixVer": "x"
1315
+ * },
1316
+ * "ios": {
1317
+ * "osVer": "12.0",
1318
+ * "uniVer": "√",
1319
+ * "unixVer": "x"
1320
+ * }
1321
+ * }
1322
+ * "web": {
1323
+ * "uniVer": "√",
1324
+ * "unixVer": "4.21"
1325
+ * }
1326
+ * }
1327
+ */
1328
+ isPointInPath(path: Path2D, x: number, y: number, fillRule: String): boolean
1329
+
1330
+ /**
1331
+ * 检测某点是否在路径的描边线
1332
+ * @param {number} x 检测点的 X 坐标
1333
+ * @param {number} y 检测点的 Y 坐标
1334
+ * @uniPlatform {
1335
+ * "app": {
1336
+ * "android": {
1337
+ * "osVer": "5.0",
1338
+ * "uniVer": "√",
1339
+ * "unixVer": "x"
1340
+ * },
1341
+ * "ios": {
1342
+ * "osVer": "12.0",
1343
+ * "uniVer": "√",
1344
+ * "unixVer": "x"
1345
+ * }
1346
+ * }
1347
+ * "web": {
1348
+ * "uniVer": "√",
1349
+ * "unixVer": "4.21"
1350
+ * }
1351
+ * }
1352
+ */
1353
+ isPointInStroke(x: number, y: number): boolean
1354
+
1355
+ /**
1356
+ * 检测某点是否在路径的描边线
1357
+ * @param {number} path Path2D应用的路径
1358
+ * @param {number} x 检测点的 X 坐标
1359
+ * @param {number} y 检测点的 Y 坐标
1360
+ * @uniPlatform {
1361
+ * "app": {
1362
+ * "android": {
1363
+ * "osVer": "5.0",
1364
+ * "uniVer": "√",
1365
+ * "unixVer": "x"
1366
+ * },
1367
+ * "ios": {
1368
+ * "osVer": "12.0",
1369
+ * "uniVer": "√",
1370
+ * "unixVer": "x"
1371
+ * }
1372
+ * }
1373
+ * "web": {
1374
+ * "uniVer": "√",
1375
+ * "unixVer": "4.21"
1376
+ * }
1377
+ * }
1378
+ */
1379
+ isPointInStroke(path: Path2D, x: number, y: number): boolean
1380
+
1381
+ /**
1382
+ * 在填充线时使用虚线模式, 它使用一组值来指定描述模式的线和间隙的交替长度。
1383
+ * @ret {segments} Array<number>一组描述交替绘制线段和间距(坐标空间单位)长度的数字
1384
+ * @uniPlatform {
1385
+ * "app": {
1386
+ * "android": {
1387
+ * "osVer": "5.0",
1388
+ * "uniVer": "√",
1389
+ * "unixVer": "4.25"
1390
+ * },
1391
+ * "ios": {
1392
+ * "osVer": "12.0",
1393
+ * "uniVer": "√",
1394
+ * "unixVer": "4.25"
1395
+ * }
1396
+ * }
1397
+ * "web": {
1398
+ * "uniVer": "√",
1399
+ * "unixVer": "4.21"
1400
+ * }
1401
+ * }
1402
+ */
1403
+ getLineDash(): Array<number>
1404
+
1405
+ /**
1406
+ * 增加一个新点,然后创建一条从上次指定点到目标点的线。用 stroke 方法来画线条
1407
+ * @param {number} x 目标位置的 x 坐标
1408
+ * @param {number} y 目标位置的 y 坐标
1409
+ * @uniPlatform {
1410
+ * "app": {
1411
+ * "android": {
1412
+ * "osVer": "5.0",
1413
+ * "uniVer": "√",
1414
+ * "unixVer": "4.25"
1415
+ * },
1416
+ * "ios": {
1417
+ * "osVer": "12.0",
1418
+ * "uniVer": "√",
1419
+ * "unixVer": "4.25"
1420
+ * }
1421
+ * }
1422
+ * "web": {
1423
+ * "uniVer": "√",
1424
+ * "unixVer": "4.21"
1425
+ * }
1426
+ * }
1427
+ */
1428
+ lineTo(x: number, y: number): void
1429
+
1430
+ /**
1431
+ * 测量文本尺寸信息。目前仅返回文本宽度
1432
+ * @param {number} text 要渲测量的文本字符串
1433
+ * @uniPlatform {
1434
+ * "app": {
1435
+ * "android": {
1436
+ * "osVer": "5.0",
1437
+ * "uniVer": "√",
1438
+ * "unixVer": "4.25"
1439
+ * },
1440
+ * "ios": {
1441
+ * "osVer": "12.0",
1442
+ * "uniVer": "√",
1443
+ * "unixVer": "4.25"
1444
+ * }
1445
+ * }
1446
+ * "web": {
1447
+ * "uniVer": "√",
1448
+ * "unixVer": "4.21"
1449
+ * }
1450
+ * }
1451
+ */
1452
+ measureText(text: string): TextMetrics
1453
+
1454
+ /**
1455
+ * 把路径移动到画布中的指定点
1456
+ * @param {number} x 目标位置的 x 坐标
1457
+ * @param {number} y 目标位置的 y 坐标
1458
+ * @uniPlatform {
1459
+ * "app": {
1460
+ * "android": {
1461
+ * "osVer": "5.0",
1462
+ * "uniVer": "√",
1463
+ * "unixVer": "4.25"
1464
+ * },
1465
+ * "ios": {
1466
+ * "osVer": "12.0",
1467
+ * "uniVer": "√",
1468
+ * "unixVer": "4.25"
1469
+ * }
1470
+ * }
1471
+ * "web": {
1472
+ * "uniVer": "√",
1473
+ * "unixVer": "4.21"
1474
+ * }
1475
+ * }
1476
+ */
1477
+ moveTo(x: number, y: number): void
1478
+
1479
+ /**
1480
+ * 将数据从已有的 ImageData 对象绘制到位图的方法。如果提供了一个绘制过的矩形,则只绘制该矩形的像素。此方法不受画布转换矩阵的影响
1481
+ * @param {number} imagedata 包含像素值的数组对象
1482
+ * @param {number} x 源图像数据在目标画布中的位置偏移量(x 轴方向的偏移量)
1483
+ * @param {number} y 源图像数据在目标画布中的位置偏移量(y 轴方向的偏移量)
1484
+ * @uniPlatform {
1485
+ * "app": {
1486
+ * "android": {
1487
+ * "osVer": "5.0",
1488
+ * "uniVer": "√",
1489
+ * "unixVer": "x"
1490
+ * },
1491
+ * "ios": {
1492
+ * "osVer": "12.0",
1493
+ * "uniVer": "√",
1494
+ * "unixVer": "x"
1495
+ * }
1496
+ * }
1497
+ * "web": {
1498
+ * "uniVer": "√",
1499
+ * "unixVer": "4.21"
1500
+ * }
1501
+ * }
1502
+ */
1503
+ putImageData(imageData: ImageData, x: number, y: number): boolean
1504
+
1505
+ /**
1506
+ * 将数据从已有的 ImageData 对象绘制到位图的方法。如果提供了一个绘制过的矩形,则只绘制该矩形的像素。此方法不受画布转换矩阵的影响
1507
+ * @param {number} imagedata 包含像素值的数组对象
1508
+ * @param {number} x 源图像数据在目标画布中的位置偏移量(x 轴方向的偏移量)
1509
+ * @param {number} y 源图像数据在目标画布中的位置偏移量(y 轴方向的偏移量)
1510
+ * @param {number} dirtyX 在源图像数据中,矩形区域左上角的位置。默认是整个图像数据的左上角(x 坐标)
1511
+ * @param {number} dirtyY 在源图像数据中,矩形区域左上角的位置。默认是整个图像数据的左上角(y 坐标)
1512
+ * @param {number} dirtyWidth 在源图像数据中,矩形区域的宽度。默认是图像数据的宽度)
1513
+ * @param {number} dirtyHeight 在源图像数据中,矩形区域的高度。默认是图像数据的高度
1514
+ * @uniPlatform {
1515
+ * "app": {
1516
+ * "android": {
1517
+ * "osVer": "5.0",
1518
+ * "uniVer": "√",
1519
+ * "unixVer": "x"
1520
+ * },
1521
+ * "ios": {
1522
+ * "osVer": "12.0",
1523
+ * "uniVer": "√",
1524
+ * "unixVer": "x"
1525
+ * }
1526
+ * }
1527
+ * "web": {
1528
+ * "uniVer": "√",
1529
+ * "unixVer": "4.21"
1530
+ * }
1531
+ * }
1532
+ */
1533
+ putImageData(imageData: ImageData, x: number, y: number, dirtyX: number, dirtyY: number, dirtyWidth: number, dirtyHeight: number): boolean
1534
+
1535
+ /**
1536
+ * 创建二次贝塞尔曲线路径
1537
+ * @param {number} cpx 贝塞尔控制点的 x 坐标
1538
+ * @param {number} cpy 贝塞尔控制点的 y 坐标
1539
+ * @param {number} x 结束点的 x 坐标
1540
+ * @param {number} y 结束点的 y 坐标
1541
+ * @uniPlatform {
1542
+ * "app": {
1543
+ * "android": {
1544
+ * "osVer": "5.0",
1545
+ * "uniVer": "√",
1546
+ * "unixVer": "4.25"
1547
+ * },
1548
+ * "ios": {
1549
+ * "osVer": "12.0",
1550
+ * "uniVer": "√",
1551
+ * "unixVer": "4.25"
1552
+ * }
1553
+ * }
1554
+ * "web": {
1555
+ * "uniVer": "√",
1556
+ * "unixVer": "4.21"
1557
+ * }
1558
+ * }
1559
+ */
1560
+ quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void
1561
+
1562
+ /**
1563
+ * 创建一个矩形路径
1564
+ * @param {number} x 矩形路径起点的 x 轴坐标
1565
+ * @param {number} y 矩形路径起点的 y 轴坐标
1566
+ * @param {number} width 矩形路径的宽度
1567
+ * @param {number} height 矩形路径的高度
1568
+ * @uniPlatform {
1569
+ * "app": {
1570
+ * "android": {
1571
+ * "osVer": "5.0",
1572
+ * "uniVer": "√",
1573
+ * "unixVer": "4.25"
1574
+ * },
1575
+ * "ios": {
1576
+ * "osVer": "12.0",
1577
+ * "uniVer": "√",
1578
+ * "unixVer": "4.25"
1579
+ * }
1580
+ * }
1581
+ * "web": {
1582
+ * "uniVer": "√",
1583
+ * "unixVer": "4.21"
1584
+ * }
1585
+ * }
1586
+ */
1587
+ rect(x: number, y: number, width: number, height: number): void
1588
+
1589
+ /**
1590
+ * 使用单位矩阵重新设置当前变换
1591
+ * @uniPlatform {
1592
+ * "app": {
1593
+ * "android": {
1594
+ * "osVer": "5.0",
1595
+ * "uniVer": "√",
1596
+ * "unixVer": "4.25"
1597
+ * },
1598
+ * "ios": {
1599
+ * "osVer": "12.0",
1600
+ * "uniVer": "√",
1601
+ * "unixVer": "4.25"
1602
+ * }
1603
+ * }
1604
+ * "web": {
1605
+ * "uniVer": "√",
1606
+ * "unixVer": "4.21"
1607
+ * }
1608
+ * }
1609
+ */
1610
+ resetTransform(): void
1611
+
1612
+ /**
1613
+ * 恢复之前保存的绘图上下文
1614
+ * @uniPlatform {
1615
+ * "app": {
1616
+ * "android": {
1617
+ * "osVer": "5.0",
1618
+ * "uniVer": "√",
1619
+ * "unixVer": "4.25"
1620
+ * },
1621
+ * "ios": {
1622
+ * "osVer": "12.0",
1623
+ * "uniVer": "√",
1624
+ * "unixVer": "4.25"
1625
+ * }
1626
+ * }
1627
+ * "web": {
1628
+ * "uniVer": "√",
1629
+ * "unixVer": "4.21"
1630
+ * }
1631
+ * }
1632
+ */
1633
+ restore(): void
1634
+
1635
+ /**
1636
+ * 以原点为中心顺时针旋转当前坐标轴
1637
+ * @param {rotate} 旋转角度,以弧度计 degrees * Math.PI/180;degrees 范围为 0-360
1638
+ * @uniPlatform {
1639
+ * "app": {
1640
+ * "android": {
1641
+ * "osVer": "5.0",
1642
+ * "uniVer": "√",
1643
+ * "unixVer": "4.25"
1644
+ * },
1645
+ * "ios": {
1646
+ * "osVer": "12.0",
1647
+ * "uniVer": "√",
1648
+ * "unixVer": "4.25"
1649
+ * }
1650
+ * }
1651
+ * "web": {
1652
+ * "uniVer": "√",
1653
+ * "unixVer": "4.21"
1654
+ * }
1655
+ * }
1656
+ */
1657
+ rotate(rotate: number): void
1658
+
1659
+ /**
1660
+ * 在当前路径中添加一个圆角矩形
1661
+ * @param {number} imagedata 包含像素值的数组对象
1662
+ * @param {number} x 矩形起点的 x 轴坐标,以像素为单位
1663
+ * @param {number} y 矩形起点的 y 轴坐标,以像素为单位
1664
+ * @param {number} width 矩形的宽度。正值向右,负值向左
1665
+ * @param {number} height 矩形的高度。正值向下,负值向上
1666
+ * @param {number} radii 其数量和顺序与 width 和 height 为正值时的 border-radius CSS 属性相同
1667
+ * @uniPlatform {
1668
+ * "app": {
1669
+ * "android": {
1670
+ * "osVer": "5.0",
1671
+ * "uniVer": "√",
1672
+ * "unixVer": "x"
1673
+ * },
1674
+ * "ios": {
1675
+ * "osVer": "12.0",
1676
+ * "uniVer": "√",
1677
+ * "unixVer": "x"
1678
+ * }
1679
+ * }
1680
+ * "web": {
1681
+ * "uniVer": "√",
1682
+ * "unixVer": "4.21"
1683
+ * }
1684
+ * }
1685
+ */
1686
+ roundRect(x: number, y: number, width: number, height: number, radii: any): boolean
1687
+
1688
+ /**
1689
+ * 保存绘图上下文
1690
+ * @uniPlatform {
1691
+ * "app": {
1692
+ * "android": {
1693
+ * "osVer": "5.0",
1694
+ * "uniVer": "√",
1695
+ * "unixVer": "4.25"
1696
+ * },
1697
+ * "ios": {
1698
+ * "osVer": "12.0",
1699
+ * "uniVer": "√",
1700
+ * "unixVer": "4.25"
1701
+ * }
1702
+ * }
1703
+ * "web": {
1704
+ * "uniVer": "√",
1705
+ * "unixVer": "4.21"
1706
+ * }
1707
+ * }
1708
+ */
1709
+ save(): void
1710
+
1711
+ /**
1712
+ * 缩放变换
1713
+ * @param {x} 水平方向的缩放因子
1714
+ * @param {y} 垂直方向的缩放因子
1715
+ * @uniPlatform {
1716
+ * "app": {
1717
+ * "android": {
1718
+ * "osVer": "5.0",
1719
+ * "uniVer": "√",
1720
+ * "unixVer": "4.25"
1721
+ * },
1722
+ * "ios": {
1723
+ * "osVer": "12.0",
1724
+ * "uniVer": "√",
1725
+ * "unixVer": "4.25"
1726
+ * }
1727
+ * }
1728
+ * "web": {
1729
+ * "uniVer": "√",
1730
+ * "unixVer": "4.21"
1731
+ * }
1732
+ * }
1733
+ */
1734
+ scale(x: number, y: number): void
1735
+
1736
+ /**
1737
+ * 在填充线时使用虚线模式, 它使用一组值来指定描述模式的线和间隙的交替长度。
1738
+ * @param {segments} Array<number>一组描述交替绘制线段和间距(坐标空间单位)长度的数字
1739
+ * @uniPlatform {
1740
+ * "app": {
1741
+ * "android": {
1742
+ * "osVer": "5.0",
1743
+ * "uniVer": "√",
1744
+ * "unixVer": "4.25"
1745
+ * },
1746
+ * "ios": {
1747
+ * "osVer": "12.0",
1748
+ * "uniVer": "√",
1749
+ * "unixVer": "4.25"
1750
+ * }
1751
+ * }
1752
+ * "web": {
1753
+ * "uniVer": "√",
1754
+ * "unixVer": "4.21"
1755
+ * }
1756
+ * }
1757
+ */
1758
+ setLineDash(segments: Array<number>): void
1759
+
1760
+ /**
1761
+ * 使用单位矩阵重新设置(覆盖)当前的变换并调用变换
1762
+ * @param {number} scaleX 水平缩放
1763
+ * @param {number} skewY 垂直倾斜
1764
+ * @param {number} skewX 水平倾斜
1765
+ * @param {number} scaleY 垂直缩放
1766
+ * @param {number} translateX 水平移动
1767
+ * @param {number} translateY 垂直移动
1768
+ * @uniPlatform {
1769
+ * "app": {
1770
+ * "android": {
1771
+ * "osVer": "5.0",
1772
+ * "uniVer": "√",
1773
+ * "unixVer": "4.25"
1774
+ * },
1775
+ * "ios": {
1776
+ * "osVer": "12.0",
1777
+ * "uniVer": "√",
1778
+ * "unixVer": "4.25"
1779
+ * }
1780
+ * }
1781
+ * "web": {
1782
+ * "uniVer": "√",
1783
+ * "unixVer": "4.21"
1784
+ * }
1785
+ * }
1786
+ */
1787
+ setTransform(scaleX: Number, skewY: Number, skewX: Number, scaleY: Number, translateX: Number, translateY: Number): void
1788
+
1789
+ /**
1790
+ * 画出当前路径的边框。默认颜色色为黑色
1791
+ * @uniPlatform {
1792
+ * "app": {
1793
+ * "android": {
1794
+ * "osVer": "5.0",
1795
+ * "uniVer": "√",
1796
+ * "unixVer": "4.25"
1797
+ * },
1798
+ * "ios": {
1799
+ * "osVer": "12.0",
1800
+ * "uniVer": "√",
1801
+ * "unixVer": "4.25"
1802
+ * }
1803
+ * }
1804
+ * "web": {
1805
+ * "uniVer": "√",
1806
+ * "unixVer": "4.21"
1807
+ * }
1808
+ * }
1809
+ */
1810
+ stroke(): void
1811
+
1812
+ /**
1813
+ * 画出指定路径的边框。默认颜色色为黑色
1814
+ * @param {path} Path2D
1815
+ * @uniPlatform {
1816
+ * "app": {
1817
+ * "android": {
1818
+ * "osVer": "5.0",
1819
+ * "uniVer": "√",
1820
+ * "unixVer": "4.25"
1821
+ * },
1822
+ * "ios": {
1823
+ * "osVer": "12.0",
1824
+ * "uniVer": "√",
1825
+ * "unixVer": "4.25"
1826
+ * }
1827
+ * }
1828
+ * "web": {
1829
+ * "uniVer": "√",
1830
+ * "unixVer": "4.21"
1831
+ * }
1832
+ * }
1833
+ */
1834
+ stroke(path: Path2D): void
1835
+
1836
+ /**
1837
+ * 画一个矩形(非填充)
1838
+ * @param {number} x 矩形起点的 x 轴坐标
1839
+ * @param {number} y 矩形起点的 y 轴坐标
1840
+ * @param {number} width 矩形的宽度
1841
+ * @param {number} height 矩形的高度
1842
+ * @uniPlatform {
1843
+ * "app": {
1844
+ * "android": {
1845
+ * "osVer": "5.0",
1846
+ * "uniVer": "√",
1847
+ * "unixVer": "4.25"
1848
+ * },
1849
+ * "ios": {
1850
+ * "osVer": "12.0",
1851
+ * "uniVer": "√",
1852
+ * "unixVer": "4.25"
1853
+ * }
1854
+ * }
1855
+ * "web": {
1856
+ * "uniVer": "√",
1857
+ * "unixVer": "4.21"
1858
+ * }
1859
+ * }
1860
+ */
1861
+ strokeRect(x: number, y: number, width: number, height: number): void
1862
+
1863
+ /**
1864
+ * 文本描边
1865
+ * @param {string} text 要渲染的文本字符串
1866
+ * @param {number} x 开始绘制文本的点的 X 轴坐标
1867
+ * @param {number} y 开始绘制文本的点的 X 轴坐标
1868
+ * @param {number} maxWidth 需要绘制的最大宽度
1869
+ * @uniPlatform {
1870
+ * "app": {
1871
+ * "android": {
1872
+ * "osVer": "5.0",
1873
+ * "uniVer": "√",
1874
+ * "unixVer": "4.25"
1875
+ * },
1876
+ * "ios": {
1877
+ * "osVer": "12.0",
1878
+ * "uniVer": "√",
1879
+ * "unixVer": "4.25"
1880
+ * }
1881
+ * }
1882
+ * "web": {
1883
+ * "uniVer": "√",
1884
+ * "unixVer": "4.21"
1885
+ * }
1886
+ * }
1887
+ */
1888
+ strokeText(text: string, x: number, y: number, maxWidth: number): void
1889
+
1890
+ /**
1891
+ * 使用矩阵多次叠加当前变换,矩阵由方法的参数进行描述。可以缩放、旋转、移动和倾斜上下文
1892
+ * @param {number} scaleX 水平缩放
1893
+ * @param {number} skewY 垂直倾斜
1894
+ * @param {number} skewX 水平倾斜
1895
+ * @param {number} scaleY 垂直缩放
1896
+ * @param {number} translateX 水平移动
1897
+ * @param {number} translateY 垂直移动
1898
+ * @uniPlatform {
1899
+ * "app": {
1900
+ * "android": {
1901
+ * "osVer": "5.0",
1902
+ * "uniVer": "√",
1903
+ * "unixVer": "4.25"
1904
+ * },
1905
+ * "ios": {
1906
+ * "osVer": "12.0",
1907
+ * "uniVer": "√",
1908
+ * "unixVer": "4.25"
1909
+ * }
1910
+ * }
1911
+ * "web": {
1912
+ * "uniVer": "√",
1913
+ * "unixVer": "4.21"
1914
+ * }
1915
+ * }
1916
+ */
1917
+ transform(scaleX: Number, skewY: number, skewX: number, scaleY: number, translateX: number, translateY: number): void
1918
+
1919
+ /**
1920
+ * 当前网格添加平移变换
1921
+ * @param {number} translateX 水平方向的移动距离
1922
+ * @param {number} translateY 垂直方向的移动距离
1923
+ * @uniPlatform {
1924
+ * "app": {
1925
+ * "android": {
1926
+ * "osVer": "5.0",
1927
+ * "uniVer": "√",
1928
+ * "unixVer": "4.25"
1929
+ * },
1930
+ * "ios": {
1931
+ * "osVer": "12.0",
1932
+ * "uniVer": "√",
1933
+ * "unixVer": "4.25"
1934
+ * }
1935
+ * }
1936
+ * "web": {
1937
+ * "uniVer": "√",
1938
+ * "unixVer": "4.21"
1939
+ * }
1940
+ * }
1941
+ */
1942
+ translate(translateX: number, translateY: number): void
1943
+ }