@dcloudio/uni-app-x 0.7.14 → 0.7.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/options.d.ts +1 -1
  2. package/package.json +1 -1
  3. package/types/native/CSSStyleDeclaration.d.ts +0 -72
  4. package/types/native/CanvasRenderingContext2D.d.ts +1943 -0
  5. package/types/native/DOMRect.d.ts +0 -180
  6. package/types/native/DrawableContext.d.ts +161 -628
  7. package/types/native/IUniElement.d.ts +513 -1868
  8. package/types/native/IUniObjectElement.d.ts +124 -0
  9. package/types/native/Path2D.d.ts +241 -0
  10. package/types/native/SnapshotOptions.d.ts +1 -0
  11. package/types/native/UniApp.d.ts +110 -0
  12. package/types/native/UniCanvasElement.d.ts +9 -0
  13. package/types/native/UniNativePage.d.ts +48 -1
  14. package/types/native/UniPageManager.d.ts +4 -1
  15. package/types/native/UniProvider.d.ts +1 -0
  16. package/types/native/UniResizeObserver.d.ts +9 -99
  17. package/types/native/UniScrollEvent.d.ts +1 -1
  18. package/types/native/UniSwiperAnimationFinishEvent.d.ts +1 -1
  19. package/types/native/UniSwiperChangeEvent.d.ts +1 -1
  20. package/types/native/UniVideoElement.d.ts +5 -0
  21. package/types/native/global.d.ts +73 -15
  22. package/types/native/index.d.ts +4 -0
  23. package/types/shim-uts-basic.d.ts +4495 -0
  24. package/types/uni/env/index.d.ts +39 -0
  25. package/types/uni/uts-plugin-api/global.d.ts +20 -1
  26. package/types/uni/uts-plugin-api/index.d.ts +20 -1
  27. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/global.d.ts +26 -0
  28. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/index.d.ts +12 -0
  29. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/interface.d.ts +231 -0
  30. package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/global.d.ts +10 -0
  31. package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/index.d.ts +4 -0
  32. package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/interface.d.ts +77 -0
  33. package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/global.d.ts +10 -0
  34. package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/index.d.ts +4 -0
  35. package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/interface.d.ts +77 -0
  36. package/types/uni/uts-plugin-api/lib/uni-cancelAnimationFrame/utssdk/global.d.ts +10 -0
  37. package/types/uni/uts-plugin-api/lib/uni-cancelAnimationFrame/utssdk/index.d.ts +4 -0
  38. package/types/uni/uts-plugin-api/lib/uni-cancelAnimationFrame/utssdk/interface.d.ts +24 -0
  39. package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/global.d.ts +20 -0
  40. package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/index.d.ts +9 -0
  41. package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/interface.d.ts +268 -0
  42. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/global.d.ts +40 -0
  43. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/index.d.ts +19 -0
  44. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/interface.d.ts +203 -0
  45. package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/global.d.ts +20 -0
  46. package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/index.d.ts +9 -0
  47. package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/interface.d.ts +152 -0
  48. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/interface.d.ts +20 -3
  49. package/types/uni/uts-plugin-api/lib/uni-createSelectorQuery/utssdk/interface.d.ts +24 -9
  50. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +13 -6
  51. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/global.d.ts +28 -0
  52. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/index.d.ts +13 -0
  53. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/interface.d.ts +1335 -0
  54. package/types/uni/uts-plugin-api/lib/uni-event/utssdk/interface.d.ts +28 -0
  55. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/interface.d.ts +6 -1
  56. package/types/uni/uts-plugin-api/lib/uni-file/utssdk/global.d.ts +80 -0
  57. package/types/uni/uts-plugin-api/lib/uni-file/utssdk/index.d.ts +39 -0
  58. package/types/uni/uts-plugin-api/lib/uni-file/utssdk/interface.d.ts +174 -0
  59. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +8 -1
  60. package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/interface.d.ts +20 -17
  61. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +28 -20
  62. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +201 -64
  63. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/interface.d.ts +180 -59
  64. package/types/uni/uts-plugin-api/lib/uni-getElementById/utssdk/interface.d.ts +10 -2
  65. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/global.d.ts +12 -0
  66. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/index.d.ts +5 -0
  67. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/interface.d.ts +47 -0
  68. package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/interface.d.ts +10 -1
  69. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/global.d.ts +24 -0
  70. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/index.d.ts +11 -0
  71. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/interface.d.ts +564 -0
  72. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/global.d.ts +2 -14
  73. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/index.d.ts +1 -6
  74. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/interface.d.ts +1 -151
  75. package/types/uni/uts-plugin-api/lib/uni-getLocation-tencent/utssdk/global.d.ts +8 -0
  76. package/types/uni/uts-plugin-api/lib/uni-getLocation-tencent/utssdk/index.d.ts +4 -0
  77. package/types/uni/uts-plugin-api/lib/uni-getLocation-tencent/utssdk/interface.d.ts +1 -0
  78. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/global.d.ts +8 -0
  79. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/index.d.ts +4 -0
  80. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/interface.d.ts +114 -34
  81. package/types/uni/uts-plugin-api/lib/uni-getPerformance/utssdk/interface.d.ts +7 -1
  82. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/global.d.ts +8 -0
  83. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/index.d.ts +4 -0
  84. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/interface.d.ts +304 -27
  85. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +500 -149
  86. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/interface.d.ts +123 -112
  87. package/types/uni/uts-plugin-api/lib/uni-installApk/utssdk/interface.d.ts +9 -6
  88. package/types/uni/uts-plugin-api/lib/uni-interceptor/utssdk/interface.d.ts +18 -2
  89. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/global.d.ts +22 -0
  90. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/index.d.ts +10 -0
  91. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/interface.d.ts +60 -0
  92. package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/interface.d.ts +8 -1
  93. package/types/uni/{uts-plugin-extend → uts-plugin-api}/lib/uni-makePhoneCall/utssdk/global.d.ts +9 -6
  94. package/types/uni/{uts-plugin-extend → uts-plugin-api}/lib/uni-makePhoneCall/utssdk/index.d.ts +4 -2
  95. package/types/uni/{uts-plugin-extend → uts-plugin-api}/lib/uni-makePhoneCall/utssdk/interface.d.ts +40 -61
  96. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/global.d.ts +2 -0
  97. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/index.d.ts +1 -0
  98. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +327 -58
  99. package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/global.d.ts +24 -0
  100. package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/index.d.ts +12 -0
  101. package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/interface.d.ts +213 -5
  102. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +280 -92
  103. package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/interface.d.ts +20 -15
  104. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/global.d.ts +24 -0
  105. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/index.d.ts +11 -0
  106. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/interface.d.ts +70 -0
  107. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/global.d.ts +2 -0
  108. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/index.d.ts +1 -0
  109. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/interface.d.ts +16 -6
  110. package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/interface.d.ts +161 -11
  111. package/types/uni/uts-plugin-api/lib/uni-payment-alipay/utssdk/global.d.ts +8 -0
  112. package/types/uni/uts-plugin-api/lib/uni-payment-alipay/utssdk/index.d.ts +4 -0
  113. package/types/uni/uts-plugin-api/lib/uni-payment-alipay/utssdk/interface.d.ts +1 -0
  114. package/types/uni/uts-plugin-api/lib/uni-payment-wxpay/utssdk/global.d.ts +8 -0
  115. package/types/uni/uts-plugin-api/lib/uni-payment-wxpay/utssdk/index.d.ts +4 -0
  116. package/types/uni/uts-plugin-api/lib/uni-payment-wxpay/utssdk/interface.d.ts +3 -0
  117. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/interface.d.ts +120 -42
  118. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/global.d.ts +2 -0
  119. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/index.d.ts +1 -0
  120. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/interface.d.ts +16 -1
  121. package/types/uni/uts-plugin-api/lib/uni-requestAnimationFrame/utssdk/global.d.ts +12 -0
  122. package/types/uni/uts-plugin-api/lib/uni-requestAnimationFrame/utssdk/index.d.ts +5 -0
  123. package/types/uni/uts-plugin-api/lib/uni-requestAnimationFrame/utssdk/interface.d.ts +28 -0
  124. package/types/uni/uts-plugin-api/lib/uni-route/utssdk/interface.d.ts +177 -32
  125. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/interface.d.ts +7 -2
  126. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/global.d.ts +24 -0
  127. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/index.d.ts +11 -0
  128. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/interface.d.ts +73 -0
  129. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/interface.d.ts +112 -43
  130. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/global.d.ts +16 -0
  131. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/index.d.ts +8 -0
  132. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/interface.d.ts +78 -1
  133. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/interface.d.ts +199 -149
  134. package/types/uni/uts-plugin-api/lib/uni-virtualPayment/utssdk/global.d.ts +112 -0
  135. package/types/uni/uts-plugin-api/lib/uni-virtualPayment/utssdk/index.d.ts +55 -0
  136. package/types/uni/uts-plugin-api/lib/uni-virtualPayment/utssdk/interface.d.ts +1068 -0
  137. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/interface.d.ts +170 -83
  138. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/interface.d.ts +11 -7
  139. package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/interface.d.ts +33 -15
  140. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/global.d.ts +4 -0
  141. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/index.d.ts +2 -0
  142. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/interface.d.ts +777 -568
  143. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/interface.d.ts +10 -6
  144. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +132 -15
  145. package/types/uni/uts-plugin-extend/global.d.ts +1 -1
  146. package/types/uni/uts-plugin-extend/index.d.ts +1 -3
  147. package/types/uni/uts-plugin-extend/lib/uni-canvas/utssdk/interface.d.ts +4 -4
  148. package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/interface.d.ts +1 -0
  149. package/types/uni/uts-plugin-extend/lib/uni-createMediaQueryObserver/utssdk/global.d.ts +13 -0
  150. package/types/uni/uts-plugin-extend/lib/uni-createMediaQueryObserver/utssdk/index.d.ts +5 -0
  151. package/types/uni/uts-plugin-extend/lib/uni-createMediaQueryObserver/utssdk/interface.d.ts +126 -0
  152. package/types/uni/uts-plugin-extend/lib/uni-locale/utssdk/interface.d.ts +3 -3
  153. package/types/uni-cloud/interface.d.ts +57 -3
  154. package/types/uni-cloud/unicloud-db/index.ts +3 -3
  155. package/types/vue/CheckboxGroupChangeEvent.d.ts +9 -1
  156. package/types/vue/PickerViewChangeEvent.d.ts +8 -0
  157. package/types/vue/ProgressActiveendEvent.d.ts +4 -0
  158. package/types/vue/RadioGroupChangeEvent.d.ts +9 -1
  159. package/types/vue/SliderChangeEvent.d.ts +4 -0
  160. package/types/vue/SwitchChangeEvent.d.ts +5 -1
  161. package/types/vue/UniCanvasElement.d.ts +6 -1
  162. package/types/vue/UniCloudDBElement.d.ts +5 -0
  163. package/types/vue/UniFormElement.d.ts +6 -1
  164. package/types/vue/UniNavigatorElement.d.ts +5 -0
  165. package/types/vue/global.d.ts +10 -9
  166. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/global.d.ts +0 -78
  167. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/index.d.ts +0 -38
  168. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/interface.d.ts +0 -642
  169. package/types/uni/uts-plugin-extend/lib/uni-getClipboardData/utssdk/global.d.ts +0 -21
  170. package/types/uni/uts-plugin-extend/lib/uni-getClipboardData/utssdk/index.d.ts +0 -9
  171. package/types/uni/uts-plugin-extend/lib/uni-getClipboardData/utssdk/interface.d.ts +0 -119
  172. package/types/uni/uts-plugin-extend/lib/uni-setClipboardData/utssdk/global.d.ts +0 -21
  173. package/types/uni/uts-plugin-extend/lib/uni-setClipboardData/utssdk/index.d.ts +0 -9
  174. package/types/uni/uts-plugin-extend/lib/uni-setClipboardData/utssdk/interface.d.ts +0 -122
  175. package/types/uni-cloud/unicloud-db/index.d.ts +0 -81
@@ -1,630 +1,163 @@
1
1
  /**
2
2
  * @package io.dcloud.uniapp.runtime
3
- * @uniPlatform {
4
- * "app": {
5
- * "android": {
6
- * "osVer": "5.0",
7
- * "uniVer": "x",
8
- * "unixVer": "3.9"
9
- * },
10
- * "ios": {
11
- * "osVer": "12.0",
12
- * "uniVer": "x",
13
- * "unixVer": "4.11"
14
- * }
15
- * }
16
- * "web": {
17
- * "uniVer": "x",
18
- * "unixVer": "x"
19
- * }
20
- * }
21
- */
22
- export class DrawableContext {
23
- /**
24
- * 设置字体大小
25
- * @defaultValue 10px
26
- * @uniPlatform {
27
- * "app": {
28
- * "android": {
29
- * "osVer": "5.0",
30
- * "uniVer": "x",
31
- * "unixVer": "3.9"
32
- * },
33
- * "ios": {
34
- * "osVer": "12.0",
35
- * "uniVer": "x",
36
- * "unixVer": "4.11"
37
- * }
38
- * }
39
- * "web": {
40
- * "uniVer": "x",
41
- * "unixVer": "x"
42
- * }
43
- * }
44
- */
45
- font: string
46
- /**
47
- * 设置填充颜色
48
- * @defaultValue #000 (黑色)
49
- * @uniPlatform {
50
- * "app": {
51
- * "android": {
52
- * "osVer": "5.0",
53
- * "uniVer": "x",
54
- * "unixVer": "3.9"
55
- * },
56
- * "ios": {
57
- * "osVer": "12.0",
58
- * "uniVer": "x",
59
- * "unixVer": "4.11"
60
- * }
61
- * }
62
- * "web": {
63
- * "uniVer": "x",
64
- * "unixVer": "x"
65
- * }
66
- * }
67
- */
68
- fillStyle: string.ColorString
69
- /**
70
- * 指定如何绘制每一条线条末端的属性,可选值:`butt`线段末端以方形结束;`round`线段末端以圆形结束;`square`线段末端以方形结束,但是会增加一个一半宽度的矩形区域。
71
- * @defaultValue butt
72
- * @uniPlatform {
73
- * "app": {
74
- * "android": {
75
- * "osVer": "5.0",
76
- * "uniVer": "x",
77
- * "unixVer": "3.9"
78
- * },
79
- * "ios": {
80
- * "osVer": "12.0",
81
- * "uniVer": "x",
82
- * "unixVer": "4.11"
83
- * }
84
- * }
85
- * "web": {
86
- * "uniVer": "x",
87
- * "unixVer": "x"
88
- * }
89
- * }
90
- */
91
- lineCap: string
92
- /**
93
- * 设置虚线偏移量
94
- * @uniPlatform {
95
- * "app": {
96
- * "android": {
97
- * "osVer": "5.0",
98
- * "uniVer": "x",
99
- * "unixVer": "3.9"
100
- * },
101
- * "ios": {
102
- * "osVer": "12.0",
103
- * "uniVer": "x",
104
- * "unixVer": "4.11"
105
- * }
106
- * }
107
- * "web": {
108
- * "uniVer": "x",
109
- * "unixVer": "x"
110
- * }
111
- * }
112
- */
113
- lineDashOffset: number
114
- /**
115
- * 设置 2 个长度不为 0 的线条相连部分如何连接在一起的属性,可选值:`bevel`斜角;`round`圆角;`miter`尖角。
116
- * @defaultValue miter
117
- * @uniPlatform {
118
- * "app": {
119
- * "android": {
120
- * "osVer": "5.0",
121
- * "uniVer": "x",
122
- * "unixVer": "3.9"
123
- * },
124
- * "ios": {
125
- * "osVer": "12.0",
126
- * "uniVer": "x",
127
- * "unixVer": "4.11"
128
- * }
129
- * }
130
- * "web": {
131
- * "uniVer": "x",
132
- * "unixVer": "x"
133
- * }
134
- * }
135
- */
136
- lineJoin: string
137
- /**
138
- * 设置线条的宽度
139
- * @defaultValue 1px
140
- * @uniPlatform {
141
- * "app": {
142
- * "android": {
143
- * "osVer": "5.0",
144
- * "uniVer": "x",
145
- * "unixVer": "3.9"
146
- * },
147
- * "ios": {
148
- * "osVer": "12.0",
149
- * "uniVer": "x",
150
- * "unixVer": "4.11"
151
- * }
152
- * }
153
- * "web": {
154
- * "uniVer": "x",
155
- * "unixVer": "x"
156
- * }
157
- * }
158
- */
159
- lineWidth: number
160
- /**
161
- * 设置边框的颜色
162
- * @defaultValue #000 (黑色)
163
- * @uniPlatform {
164
- * "app": {
165
- * "android": {
166
- * "osVer": "5.0",
167
- * "uniVer": "x",
168
- * "unixVer": "3.9"
169
- * },
170
- * "ios": {
171
- * "osVer": "12.0",
172
- * "uniVer": "x",
173
- * "unixVer": "4.11"
174
- * }
175
- * }
176
- * "web": {
177
- * "uniVer": "x",
178
- * "unixVer": "x"
179
- * }
180
- * }
181
- */
182
- strokeStyle: string.ColorString
183
- /**
184
- * 设置文本的对齐方式,可取值:`left`左对齐;`center`居中对齐;`right`右对齐。
185
- * @defaultValue left
186
- * @uniPlatform {
187
- * "app": {
188
- * "android": {
189
- * "osVer": "5.0",
190
- * "uniVer": "x",
191
- * "unixVer": "3.9"
192
- * },
193
- * "ios": {
194
- * "osVer": "12.0",
195
- * "uniVer": "x",
196
- * "unixVer": "4.11"
197
- * }
198
- * }
199
- * "web": {
200
- * "uniVer": "x",
201
- * "unixVer": "x"
202
- * }
203
- * }
204
- */
205
- textAlign: string
206
- /**
207
- * 创建一个新的空路径
208
- * @uniPlatform {
209
- * "app": {
210
- * "android": {
211
- * "osVer": "5.0",
212
- * "uniVer": "x",
213
- * "unixVer": "3.9"
214
- * },
215
- * "ios": {
216
- * "osVer": "12.0",
217
- * "uniVer": "x",
218
- * "unixVer": "4.11"
219
- * }
220
- * }
221
- * "web": {
222
- * "uniVer": "x",
223
- * "unixVer": "x"
224
- * }
225
- * }
226
- */
227
- beginPath(): void
228
-
229
- /**
230
- * 绘制一段弧线
231
- * @param {number} x 圆心的X轴坐标
232
- * @param {number} y 圆心的Y轴坐标
233
- * @param {number} radius 圆弧的半径
234
- * @param {number} startAngle 圆弧的起始点,x 轴方向开始计算,单位为弧度
235
- * @param {number} endAngle 圆弧的终点,单位为弧度
236
- * @param {number} [anticlockwise=true] 圆弧绘制方向,true:逆时针绘制,false:顺时针绘制。
237
- * @uniPlatform {
238
- * "app": {
239
- * "android": {
240
- * "osVer": "5.0",
241
- * "uniVer": "x",
242
- * "unixVer": "3.9"
243
- * },
244
- * "ios": {
245
- * "osVer": "12.0",
246
- * "uniVer": "x",
247
- * "unixVer": "4.11"
248
- * }
249
- * }
250
- * "web": {
251
- * "uniVer": "x",
252
- * "unixVer": "x"
253
- * }
254
- * }
255
- */
256
- arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean | null): void
257
-
258
- /**
259
- * 将一个新的路径的起始点移动到 (x,y) 坐标
260
- * @param {number} x 点的X轴坐标
261
- * @param {number} y 点的Y轴坐标
262
- * @uniPlatform {
263
- * "app": {
264
- * "android": {
265
- * "osVer": "5.0",
266
- * "uniVer": "x",
267
- * "unixVer": "3.9"
268
- * },
269
- * "ios": {
270
- * "osVer": "12.0",
271
- * "uniVer": "x",
272
- * "unixVer": "4.11"
273
- * }
274
- * }
275
- * "web": {
276
- * "uniVer": "x",
277
- * "unixVer": "x"
278
- * }
279
- * }
280
- */
281
- moveTo(x: number, y: number): void
282
-
283
- /**
284
- * 创建一个矩形路径
285
- * @param {number} x 矩形起点的X轴坐标
286
- * @param {number} y 矩形起点的Y轴坐标
287
- * @param {number} width 矩形宽度
288
- * @param {number} height 矩形高度
289
- * @uniPlatform {
290
- * "app": {
291
- * "android": {
292
- * "osVer": "5.0",
293
- * "uniVer": "x",
294
- * "unixVer": "3.9"
295
- * },
296
- * "ios": {
297
- * "osVer": "12.0",
298
- * "uniVer": "x",
299
- * "unixVer": "4.11"
300
- * }
301
- * }
302
- * "web": {
303
- * "uniVer": "x",
304
- * "unixVer": "x"
305
- * }
306
- * }
307
- */
308
- rect(x: number, y: number, width: number, height: number): void
309
-
310
- /**
311
- * 将路径的最后一个点连接到 (x,y) 坐标
312
- * @param {number} x 线终点的X轴坐标
313
- * @param {number} y 线终点的Y轴坐标
314
- * @uniPlatform {
315
- * "app": {
316
- * "android": {
317
- * "osVer": "5.0",
318
- * "uniVer": "x",
319
- * "unixVer": "3.9"
320
- * },
321
- * "ios": {
322
- * "osVer": "12.0",
323
- * "uniVer": "x",
324
- * "unixVer": "4.11"
325
- * }
326
- * }
327
- * "web": {
328
- * "uniVer": "x",
329
- * "unixVer": "x"
330
- * }
331
- * }
332
- */
333
- lineTo(x: number, y: number): void
334
- /**
335
- * 闭合路径,将最后一个点与起点连接起来。如果图形已经封闭,或者只有一个点,那么此方法不会产生任何效果。
336
- * @uniPlatform {
337
- * "app": {
338
- * "android": {
339
- * "osVer": "5.0",
340
- * "uniVer": "x",
341
- * "unixVer": "3.9"
342
- * },
343
- * "ios": {
344
- * "osVer": "12.0",
345
- * "uniVer": "x",
346
- * "unixVer": "4.11"
347
- * }
348
- * }
349
- * "web": {
350
- * "uniVer": "x",
351
- * "unixVer": "x"
352
- * }
353
- * }
354
- */
355
- closePath(): void
356
- /**
357
- * 绘制当前或已经存在的路径的边框。
358
- * @uniPlatform {
359
- * "app": {
360
- * "android": {
361
- * "osVer": "5.0",
362
- * "uniVer": "x",
363
- * "unixVer": "3.9"
364
- * },
365
- * "ios": {
366
- * "osVer": "12.0",
367
- * "uniVer": "x",
368
- * "unixVer": "4.11"
369
- * }
370
- * }
371
- * "web": {
372
- * "uniVer": "x",
373
- * "unixVer": "x"
374
- * }
375
- * }
376
- */
377
- stroke(): void
378
- /**
379
- * 绘制一个矩形框
380
- * @param {number} x 矩形起点的X轴坐标
381
- * @param {number} y 矩形起点的Y轴坐标
382
- * @param {number} width 矩形宽度
383
- * @param {number} height 矩形高度
384
- * @uniPlatform {
385
- * "app": {
386
- * "android": {
387
- * "osVer": "5.0",
388
- * "uniVer": "x",
389
- * "unixVer": "3.9"
390
- * },
391
- * "ios": {
392
- * "osVer": "12.0",
393
- * "uniVer": "x",
394
- * "unixVer": "4.11"
395
- * }
396
- * }
397
- * "web": {
398
- * "uniVer": "x",
399
- * "unixVer": "x"
400
- * }
401
- * }
402
- */
403
- strokeRect(x: number, y: number, width: number, height: number): void
404
- /**
405
- * 绘制空心字符
406
- * @param {string} text 要绘制的字符
407
- * @param {number} x 字符开始绘制的X轴坐标
408
- * @param {number} y 字符开始绘制的Y轴坐标
409
- * @uniPlatform {
410
- * "app": {
411
- * "android": {
412
- * "osVer": "5.0",
413
- * "uniVer": "x",
414
- * "unixVer": "3.9"
415
- * },
416
- * "ios": {
417
- * "osVer": "12.0",
418
- * "uniVer": "x",
419
- * "unixVer": "4.11"
420
- * }
421
- * }
422
- * "web": {
423
- * "uniVer": "x",
424
- * "unixVer": "x"
425
- * }
426
- * }
427
- */
428
- strokeText(text: string, x: number, y: number): void
429
-
430
- /**
431
- * 填充当前或已存在的路径
432
- * @param {string} [fillRule=nonzero] 填充规则。可取值:`nonzero`非零环绕规则;`evenodd`奇偶环绕规则。
433
- * @uniPlatform {
434
- * "app": {
435
- * "android": {
436
- * "osVer": "5.0",
437
- * "uniVer": "x",
438
- * "unixVer": "3.9"
439
- * },
440
- * "ios": {
441
- * "osVer": "12.0",
442
- * "uniVer": "x",
443
- * "unixVer": "4.11"
444
- * }
445
- * }
446
- * "web": {
447
- * "uniVer": "x",
448
- * "unixVer": "x"
449
- * }
450
- * }
451
- */
452
- fill(fillRule?: string | null): void
453
-
454
- /**
455
- * 绘制一个实心矩形
456
- * @param {number} x 矩形起点的X轴坐标
457
- * @param {number} y 矩形起点的Y轴坐标
458
- * @param {number} width 矩形宽度
459
- * @param {number} height 矩形高度
460
- * @uniPlatform {
461
- * "app": {
462
- * "android": {
463
- * "osVer": "5.0",
464
- * "uniVer": "x",
465
- * "unixVer": "3.9"
466
- * },
467
- * "ios": {
468
- * "osVer": "12.0",
469
- * "uniVer": "x",
470
- * "unixVer": "4.11"
471
- * }
472
- * }
473
- * "web": {
474
- * "uniVer": "x",
475
- * "unixVer": "x"
476
- * }
477
- * }
478
- */
479
- fillRect(x: number, y: number, width: number, height: number): void
480
-
481
- /**
482
- * 绘制实心字符
483
- * @param {string} text 要绘制的字符
484
- * @param {number} x 字符开始绘制的X轴坐标
485
- * @param {number} y 字符开始绘制的Y轴坐标
486
- * @uniPlatform {
487
- * "app": {
488
- * "android": {
489
- * "osVer": "5.0",
490
- * "uniVer": "x",
491
- * "unixVer": "3.9"
492
- * },
493
- * "ios": {
494
- * "osVer": "12.0",
495
- * "uniVer": "x",
496
- * "unixVer": "4.11"
497
- * }
498
- * }
499
- * "web": {
500
- * "uniVer": "x",
501
- * "unixVer": "x"
502
- * }
503
- * }
504
- */
505
- fillText(text: string, x: number, y: number): void
506
- /**
507
- * 清空绘制数据
508
- * @uniPlatform {
509
- * "app": {
510
- * "android": {
511
- * "osVer": "5.0",
512
- * "uniVer": "x",
513
- * "unixVer": "3.9"
514
- * },
515
- * "ios": {
516
- * "osVer": "12.0",
517
- * "uniVer": "x",
518
- * "unixVer": "4.11"
519
- * }
520
- * }
521
- * "web": {
522
- * "uniVer": "x",
523
- * "unixVer": "x"
524
- * }
525
- * }
526
- */
527
- reset(): void
528
- /**
529
- * 将所有绘制内容更新到画布上
530
- * @uniPlatform {
531
- * "app": {
532
- * "android": {
533
- * "osVer": "5.0",
534
- * "uniVer": "x",
535
- * "unixVer": "3.9"
536
- * },
537
- * "ios": {
538
- * "osVer": "12.0",
539
- * "uniVer": "x",
540
- * "unixVer": "4.11"
541
- * }
542
- * }
543
- * "web": {
544
- * "uniVer": "x",
545
- * "unixVer": "x"
546
- * }
547
- * }
548
- */
549
- update(): void
550
- /**
551
- * 设置虚线样式
552
- * @param {Array<number>} segments 一组描述交替绘制线段和间距长度的数字。
553
- * @uniPlatform {
554
- * "app": {
555
- * "android": {
556
- * "osVer": "5.0",
557
- * "uniVer": "x",
558
- * "unixVer": "3.9"
559
- * },
560
- * "ios": {
561
- * "osVer": "12.0",
562
- * "uniVer": "x",
563
- * "unixVer": "4.11"
564
- * }
565
- * }
566
- * "web": {
567
- * "uniVer": "x",
568
- * "unixVer": "x"
569
- * }
570
- * }
571
- */
572
- setLineDash(segments: Array<number>): void
573
-
574
- /**
575
- * 根据控制点和半径绘制圆弧路径
576
- * @param {number} x1 第一个控制点的 x 轴坐标
577
- * @param {number} y1 第一个控制点的 y 轴坐标
578
- * @param {number} x2 第二个控制点的 x 轴坐标
579
- * @param {number} y2 第二个控制点的 y 轴坐标
580
- * @param {number} radius 圆弧的半径
581
- * @uniPlatform {
582
- * "app": {
583
- * "android": {
584
- * "osVer": "5.0",
585
- * "uniVer": "x",
586
- * "unixVer": "3.9"
587
- * },
588
- * "ios": {
589
- * "osVer": "12.0",
590
- * "uniVer": "x",
591
- * "unixVer": "4.11"
592
- * }
593
- * }
594
- * "web": {
595
- * "uniVer": "x",
596
- * "unixVer": "x"
597
- * }
598
- * }
599
- */
600
- // arcTo(x1 : number, y1 : number, x2 : number, y2 : number, radius : number) : void
601
-
602
- /**
603
- * 创建三次方贝塞尔曲线路径
604
- * @param {number} cp1x 第一个贝塞尔控制点的 x 坐标
605
- * @param {number} cp1y 第一个贝塞尔控制点的 y 坐标
606
- * @param {number} cp2x 第二个贝塞尔控制点的 x 坐标
607
- * @param {number} cp2y 第二个贝塞尔控制点的 y 坐标
608
- * @param {number} x 结束点的 x 坐标
609
- * @param {number} y 结束点的 y 坐标
610
- * @uniPlatform {
611
- * "app": {
612
- * "android": {
613
- * "osVer": "5.0",
614
- * "uniVer": "x",
615
- * "unixVer": "3.9"
616
- * },
617
- * "ios": {
618
- * "osVer": "12.0",
619
- * "uniVer": "x",
620
- * "unixVer": "4.11"
621
- * }
622
- * }
623
- * "web": {
624
- * "uniVer": "x",
625
- * "unixVer": "x"
626
- * }
627
- * }
628
- */
629
- bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void
630
- }
3
+ */
4
+
5
+ export class DrawableContext {
6
+ /**
7
+ * 设置字体大小
8
+ * @defaultValue 10px
9
+ */
10
+ font: string
11
+ /**
12
+ * 设置填充颜色
13
+ * @defaultValue #000 (黑色)
14
+ */
15
+ fillStyle: string.ColorString
16
+ /**
17
+ * 指定如何绘制每一条线条末端的属性,可选值:`butt`线段末端以方形结束;`round`线段末端以圆形结束;`square`线段末端以方形结束,但是会增加一个一半宽度的矩形区域。
18
+ * @defaultValue butt
19
+ */
20
+ lineCap: string
21
+ /**
22
+ * 设置虚线偏移量
23
+ */
24
+ lineDashOffset: number
25
+ /**
26
+ * 设置 2 个长度不为 0 的线条相连部分如何连接在一起的属性,可选值:`bevel`斜角;`round`圆角;`miter`尖角。
27
+ * @defaultValue miter
28
+ */
29
+ lineJoin: string
30
+ /**
31
+ * 设置线条的宽度
32
+ * @defaultValue 1px
33
+ */
34
+ lineWidth: number
35
+ /**
36
+ * 设置边框的颜色
37
+ * @defaultValue #000 (黑色)
38
+ */
39
+ strokeStyle: string.ColorString
40
+ /**
41
+ * 设置文本的对齐方式,可取值:`left`左对齐;`center`居中对齐;`right`右对齐。
42
+ * @defaultValue left
43
+ */
44
+ textAlign: string
45
+ /**
46
+ * 创建一个新的空路径
47
+ */
48
+ beginPath(): void
49
+
50
+ /**
51
+ * 绘制一段弧线
52
+ * @param {number} x 圆心的X轴坐标
53
+ * @param {number} y 圆心的Y轴坐标
54
+ * @param {number} radius 圆弧的半径
55
+ * @param {number} startAngle 圆弧的起始点,x 轴方向开始计算,单位为弧度
56
+ * @param {number} endAngle 圆弧的终点,单位为弧度
57
+ * @param {number} [anticlockwise=true] 圆弧绘制方向,true:逆时针绘制,false:顺时针绘制。
58
+ */
59
+ arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean | null): void
60
+
61
+ /**
62
+ * 将一个新的路径的起始点移动到 (x,y) 坐标
63
+ * @param {number} x 点的X轴坐标
64
+ * @param {number} y 点的Y轴坐标
65
+ */
66
+ moveTo(x: number, y: number): void
67
+
68
+ /**
69
+ * 创建一个矩形路径
70
+ * @param {number} x 矩形起点的X轴坐标
71
+ * @param {number} y 矩形起点的Y轴坐标
72
+ * @param {number} width 矩形宽度
73
+ * @param {number} height 矩形高度
74
+ */
75
+ rect(x: number, y: number, width: number, height: number): void
76
+
77
+ /**
78
+ * 将路径的最后一个点连接到 (x,y) 坐标
79
+ * @param {number} x 线终点的X轴坐标
80
+ * @param {number} y 线终点的Y轴坐标
81
+ */
82
+ lineTo(x: number, y: number): void
83
+ /**
84
+ * 闭合路径,将最后一个点与起点连接起来。如果图形已经封闭,或者只有一个点,那么此方法不会产生任何效果。
85
+ */
86
+ closePath(): void
87
+ /**
88
+ * 绘制当前或已经存在的路径的边框。
89
+ */
90
+ stroke(): void
91
+ /**
92
+ * 绘制一个矩形框
93
+ * @param {number} x 矩形起点的X轴坐标
94
+ * @param {number} y 矩形起点的Y轴坐标
95
+ * @param {number} width 矩形宽度
96
+ * @param {number} height 矩形高度
97
+ */
98
+ strokeRect(x: number, y: number, width: number, height: number): void
99
+ /**
100
+ * 绘制空心字符
101
+ * @param {string} text 要绘制的字符
102
+ * @param {number} x 字符开始绘制的X轴坐标
103
+ * @param {number} y 字符开始绘制的Y轴坐标
104
+ */
105
+ strokeText(text: string, x: number, y: number): void
106
+
107
+ /**
108
+ * 填充当前或已存在的路径
109
+ * @param {string} [fillRule=nonzero] 填充规则。可取值:`nonzero`非零环绕规则;`evenodd`奇偶环绕规则。
110
+ */
111
+ fill(fillRule?: string | null): void
112
+
113
+ /**
114
+ * 绘制一个实心矩形
115
+ * @param {number} x 矩形起点的X轴坐标
116
+ * @param {number} y 矩形起点的Y轴坐标
117
+ * @param {number} width 矩形宽度
118
+ * @param {number} height 矩形高度
119
+ */
120
+ fillRect(x: number, y: number, width: number, height: number): void
121
+
122
+ /**
123
+ * 绘制实心字符
124
+ * @param {string} text 要绘制的字符
125
+ * @param {number} x 字符开始绘制的X轴坐标
126
+ * @param {number} y 字符开始绘制的Y轴坐标
127
+ */
128
+ fillText(text: string, x: number, y: number): void
129
+ /**
130
+ * 清空绘制数据
131
+ */
132
+ reset(): void
133
+ /**
134
+ * 将所有绘制内容更新到画布上
135
+ */
136
+ update(): void
137
+ /**
138
+ * 设置虚线样式
139
+ * @param {Array<number>} segments 一组描述交替绘制线段和间距长度的数字。
140
+ */
141
+ setLineDash(segments: Array<number>): void
142
+
143
+ /**
144
+ * 根据控制点和半径绘制圆弧路径
145
+ * @param {number} x1 第一个控制点的 x 轴坐标
146
+ * @param {number} y1 第一个控制点的 y 轴坐标
147
+ * @param {number} x2 第二个控制点的 x 轴坐标
148
+ * @param {number} y2 第二个控制点的 y 轴坐标
149
+ * @param {number} radius 圆弧的半径
150
+ */
151
+ // arcTo(x1 : number, y1 : number, x2 : number, y2 : number, radius : number) : void
152
+
153
+ /**
154
+ * 创建三次方贝塞尔曲线路径
155
+ * @param {number} cp1x 第一个贝塞尔控制点的 x 坐标
156
+ * @param {number} cp1y 第一个贝塞尔控制点的 y 坐标
157
+ * @param {number} cp2x 第二个贝塞尔控制点的 x 坐标
158
+ * @param {number} cp2y 第二个贝塞尔控制点的 y 坐标
159
+ * @param {number} x 结束点的 x 坐标
160
+ * @param {number} y 结束点的 y 坐标
161
+ */
162
+ bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void
163
+ }