pen.d.ts 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. declare interface Pen {
  2. id?: string;
  3. tags?: string[];
  4. parentId?: string;
  5. name?: string;
  6. lineName?: string;
  7. borderRadius?: number;
  8. visible?: boolean;
  9. close?: boolean;
  10. length?: number;
  11. title?: string;
  12. titleFnJs?: string;
  13. titleFn?: (pen: Pen) => string;
  14. lineWidth?: number;
  15. borderWidth?: number;
  16. borderColor?: string;
  17. globalAlpha?: number;
  18. lineDash?: number[];
  19. lineDashOffset?: number;
  20. color?: string;
  21. background?: string;
  22. anchorColor?: string;
  23. hoverAnchorColor?: string;
  24. hoverColor?: string;
  25. hoverBackground?: string;
  26. activeColor?: string;
  27. activeBackground?: string;
  28. mouseDownValid?: boolean;
  29. mouseDownColor?: string;
  30. mouseDownBackground?: string;
  31. /**
  32. * @deprecated 改用 gradientColors
  33. */
  34. gradientFromColor?: string;
  35. /**
  36. * @deprecated 改用 gradientColors
  37. */
  38. gradientToColor?: string;
  39. /**
  40. * @deprecated 改用 gradientColors
  41. */
  42. gradientAngle?: number;
  43. gradientRadius?: number;
  44. /**
  45. * @deprecated 改用 lineGradientColors
  46. */
  47. lineGradientFromColor?: string;
  48. /**
  49. * @deprecated 改用 lineGradientColors
  50. */
  51. lineGradientToColor?: string;
  52. /**
  53. * @deprecated 改用 lineGradientColors
  54. */
  55. lineGradientAngle?: number;
  56. gradientColors?: string;
  57. switch?: boolean;
  58. checked?: boolean;
  59. onBackground?: string;
  60. onGradientColors?: string;
  61. lineGradientColors?: string;
  62. shadowColor?: string;
  63. shadowBlur?: number;
  64. shadowOffsetX?: number;
  65. shadowOffsetY?: number;
  66. textHasShadow?: boolean;
  67. text?: string;
  68. textWidth?: number;
  69. textHeight?: number;
  70. textLeft?: number;
  71. textTop?: number;
  72. textColor?: string;
  73. hoverTextColor?: string;
  74. activeTextColor?: string;
  75. fontFamily?: string;
  76. fontSize?: number;
  77. lineHeight?: number;
  78. fontStyle?: string;
  79. fontWeight?: string;
  80. textBackground?: string;
  81. ellipsis?: boolean;
  82. image?: string;
  83. icon?: string;
  84. iconRotate?: number;
  85. iconWidth?: number;
  86. iconHeight?: number;
  87. iconTop?: number;
  88. iconLeft?: number;
  89. iconColor?: string;
  90. iconFamily?: string;
  91. iconWeight?: string;
  92. iconSize?: number;
  93. iconAlign?: 'top' | 'bottom' | 'left' | 'right' | 'left-top' | 'right-top' | 'left-bottom' | 'right-bottom' | 'center';
  94. imageRatio?: boolean;
  95. disableInput?: boolean;
  96. disableRotate?: boolean;
  97. disableSize?: boolean;
  98. disableAnchor?: boolean;
  99. paddingTop?: number;
  100. paddingBottom?: number;
  101. paddingLeft?: number;
  102. paddingRight?: number;
  103. backgroundImage?: string;
  104. strokeImage?: string;
  105. children?: string[];
  106. followers?: string[];
  107. anchorRadius?: number;
  108. anchorBackground?: string;
  109. pathId?: string;
  110. path?: string;
  111. fromArrow?: string;
  112. toArrow?: string;
  113. fromArrowSize?: number;
  114. toArrowSize?: number;
  115. fromArrowColor?: string;
  116. toArrowColor?: string;
  117. autoFrom?: boolean;
  118. autoTo?: boolean;
  119. animateCycle?: number;
  120. nextAnimate?: string;
  121. autoPlay?: boolean;
  122. playLoop?: boolean;
  123. duration?: number;
  124. linear?: boolean;
  125. scale?: number;
  126. animateSpan?: number;
  127. animateColor?: string;
  128. animateLineDash?: number[];
  129. animateReverse?: boolean;
  130. keepAnimateState?: boolean;
  131. animateName?: string;
  132. frames?: Pen[];
  133. animateList?: Pen[][];
  134. animateInterval?: number;
  135. animateShadow?: boolean;
  136. animateShadowColor?: string;
  137. animateShadowBlur?: number;
  138. input?: boolean;
  139. autofocus?: boolean;
  140. dropdownBackground?: string;
  141. dropdownColor?: string;
  142. dropdownHoverColor?: string;
  143. dropdownHoverBackground?: string;
  144. iframe?: string;
  145. video?: string;
  146. audio?: string;
  147. progress?: number;
  148. progressColor?: string;
  149. verticalProgress?: boolean;
  150. reverseProgress?: boolean;
  151. progressGradientColors?: string;
  152. externElement?: boolean;
  153. autoPolyline?: boolean;
  154. affectByTheme?: boolean;
  155. flipX?: boolean;
  156. flipY?: boolean;
  157. fillTexts?: string[];
  158. hiddenText?: boolean;
  159. keepDecimal?: number;
  160. showChild?: number;
  161. animateDotSize?: number;
  162. isRuleLine?: boolean;
  163. /**
  164. * @deprecated 改用 canvasLayer
  165. */
  166. isBottom?: boolean;
  167. ratio?: boolean;
  168. animateLineWidth?: number;
  169. lineSmooth?: number;
  170. gradientSmooth?: number;
  171. scrolling?: string;
  172. animations?: any[];
  173. currentAnimation?: number;
  174. crossOrigin?: string;
  175. imageRadius?: number;
  176. textFlip?: boolean;
  177. textRotate?: boolean;
  178. textAutoAdjust?: boolean;
  179. dbInput?: boolean;
  180. operationalRect?: Rect;
  181. blur?: number;
  182. blurBackground?: string;
  183. /**
  184. * @deprecated 改用 canvasLayer
  185. */
  186. template?: boolean;
  187. thumbImg?: string;
  188. apiUrl?: string;
  189. apiMethod?: string;
  190. apiHeaders?: any;
  191. apiBody?: any;
  192. apiEnable?: boolean;
  193. sql?: string;
  194. container?: boolean;
  195. disabled?: boolean;
  196. disabledColor?: string;
  197. disabledBackground?: string;
  198. disabledTextColor?: string;
  199. inputType?: string;
  200. productId?: string;
  201. deviceId?: string;
  202. noOnBinds?: boolean;
  203. interaction?: boolean;
  204. childHover?: boolean;
  205. childActive?: boolean;
  206. draw?: boolean;
  207. copyIndex?: number;
  208. formId?: string;
  209. formData?: any;
  210. formKey?: string;
  211. formValue?: string;
  212. formType?: string;
  213. className?: string;
  214. styles?: any;
  215. calculative?: {
  216. x?: number;
  217. y?: number;
  218. width?: number;
  219. height?: number;
  220. borderRadius?: number;
  221. progress?: number;
  222. progressColor?: string;
  223. progressGradientColors?: string;
  224. verticalProgress?: boolean;
  225. childrenVisible?: any;
  226. rotate?: number;
  227. lineWidth?: number;
  228. borderWidth?: number;
  229. borderColor?: string;
  230. globalAlpha?: number;
  231. lineDash?: number[];
  232. lineDashOffset?: number;
  233. color?: string;
  234. background?: string;
  235. bkType?: number;
  236. /**
  237. * @deprecated 改用 gradientColors
  238. */
  239. gradientFromColor?: string;
  240. /**
  241. * @deprecated 改用 gradientColors
  242. */
  243. gradientToColor?: string;
  244. /**
  245. * @deprecated 改用 gradientColors
  246. */
  247. gradientAngle?: number;
  248. gradientRadius?: number;
  249. /**
  250. * @deprecated 改用 lineGradientColors
  251. */
  252. lineGradientFromColor?: string;
  253. /**
  254. * @deprecated 改用 lineGradientColors
  255. */
  256. lineGradientToColor?: string;
  257. /**
  258. * @deprecated 改用 lineGradientColors
  259. */
  260. lineGradientAngle?: number;
  261. shadowColor?: string;
  262. shadowBlur?: number;
  263. shadowOffsetX?: number;
  264. shadowOffsetY?: number;
  265. textHasShadow?: boolean;
  266. tempText?: string;
  267. text?: string;
  268. textWidth?: number;
  269. textHeight?: number;
  270. textLeft?: number;
  271. textTop?: number;
  272. textColor?: string;
  273. textGradientColors?: string;
  274. fontFamily?: string;
  275. fontSize?: number;
  276. lineHeight?: number;
  277. fontStyle?: string;
  278. fontWeight?: string;
  279. textBackground?: string;
  280. iconSize?: number;
  281. icon?: string;
  282. iconRotate?: number;
  283. iconWidth?: number;
  284. iconHeight?: number;
  285. iconTop?: number;
  286. iconLeft?: number;
  287. iconColor?: string;
  288. iconFamily?: string;
  289. iconWeight?: string;
  290. paddingTop?: number;
  291. paddingBottom?: number;
  292. paddingLeft?: number;
  293. paddingRight?: number;
  294. textLines?: string[];
  295. textLineWidths?: number[];
  296. image?: string;
  297. imgNaturalWidth?: number;
  298. imgNaturalHeight?: number;
  299. backgroundImage?: string;
  300. strokeImage?: string;
  301. active?: boolean;
  302. focus?: boolean;
  303. hover?: boolean;
  304. mouseDown?: boolean;
  305. containerHover?: boolean;
  306. isDock?: boolean;
  307. pencil?: boolean;
  308. activeAnchor?: Point;
  309. patchFlags?: boolean;
  310. visible?: boolean;
  311. inView?: boolean;
  312. drawlineH?: boolean;
  313. hasImage?: boolean;
  314. imageDrawed?: boolean;
  315. /**
  316. * @deprecated 改用 canvasLayer
  317. */
  318. isBottom?: boolean;
  319. scale?: number;
  320. start?: number;
  321. duration?: number;
  322. end?: number;
  323. frameIndex?: number;
  324. frameStart?: number;
  325. frameEnd?: number;
  326. frameDuration?: number;
  327. animatePos?: number;
  328. cycleIndex?: number;
  329. pause?: number;
  330. layer?: number;
  331. iframe?: string;
  332. video?: string;
  333. audio?: string;
  334. flipX?: boolean;
  335. flipY?: boolean;
  336. h?: boolean;
  337. hiddenText?: boolean;
  338. keepDecimal?: number;
  339. showChild?: number;
  340. animateDotSize?: number;
  341. zIndex?: number;
  342. onended?: (pen: Pen) => void;
  343. singleton?: any;
  344. gradientColors?: string;
  345. onBackground?: string;
  346. onGradientColors?: string;
  347. checked?: boolean;
  348. lineGradientColors?: string;
  349. gradientTimer?: any;
  350. animateLineWidth?: number;
  351. lineSmooth?: number;
  352. gradientSmooth?: number;
  353. cssDisplay?: string;
  354. animations?: any[];
  355. imageRadius?: number;
  356. disabled?: boolean;
  357. disabledColor?: string;
  358. disabledBackground?: string;
  359. disabledTextColor?: string;
  360. };
  361. lastConnected?: any;
  362. textDecoration?: string;
  363. textDecorationDash?: number[];
  364. textDecorationColor?: string;
  365. textStrickoutColor?: string;
  366. textStrickoutDash?: number[];
  367. textStrickout?: boolean;
  368. prevFrame?: Pen;
  369. onAdd?: (pen: Pen) => void;
  370. onValue?: (pen: Pen) => void;
  371. }