@dcloudio/uni-app-x 0.7.19 → 0.7.21

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