1/* 2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @file 18 * @kit ArkUI 19 */ 20 21/** 22 * Define options used to construct a path. 23 * 24 * @interface PathOptions 25 * @syscap SystemCapability.ArkUI.ArkUI.Full 26 * @crossplatform 27 * @form 28 * @atomicservice 29 * @since 18 30 */ 31declare interface PathOptions { 32 /** 33 * Width option. 34 * @type { ?(number | string) } 35 * @syscap SystemCapability.ArkUI.ArkUI.Full 36 * @since 7 37 */ 38 /** 39 * Width option. 40 * @type { ?(number | string) } 41 * @syscap SystemCapability.ArkUI.ArkUI.Full 42 * @form 43 * @since 9 44 */ 45 /** 46 * Width option. 47 * @type { ?(number | string) } 48 * @syscap SystemCapability.ArkUI.ArkUI.Full 49 * @crossplatform 50 * @form 51 * @since 10 52 */ 53 /** 54 * Width option. 55 * @type { ?(number | string) } 56 * @syscap SystemCapability.ArkUI.ArkUI.Full 57 * @crossplatform 58 * @form 59 * @atomicservice 60 * @since 11 61 */ 62 /** 63 * Width option. 64 * Anonymous Object Rectification. 65 * 66 * @type { ?(number | string) } 67 * @syscap SystemCapability.ArkUI.ArkUI.Full 68 * @crossplatform 69 * @form 70 * @atomicservice 71 * @since 18 72 */ 73 width?: number | string; 74 75 /** 76 * Height option. 77 * @type { ?(number | string) } 78 * @syscap SystemCapability.ArkUI.ArkUI.Full 79 * @since 7 80 */ 81 /** 82 * Height option. 83 * @type { ?(number | string) } 84 * @syscap SystemCapability.ArkUI.ArkUI.Full 85 * @form 86 * @since 9 87 */ 88 /** 89 * Height option. 90 * @type { ?(number | string) } 91 * @syscap SystemCapability.ArkUI.ArkUI.Full 92 * @crossplatform 93 * @form 94 * @since 10 95 */ 96 /** 97 * Height option. 98 * @type { ?(number | string) } 99 * @syscap SystemCapability.ArkUI.ArkUI.Full 100 * @crossplatform 101 * @form 102 * @atomicservice 103 * @since 11 104 */ 105 /** 106 * Height option. 107 * Anonymous Object Rectification. 108 * 109 * @type { ?(number | string) } 110 * @syscap SystemCapability.ArkUI.ArkUI.Full 111 * @crossplatform 112 * @form 113 * @atomicservice 114 * @since 18 115 */ 116 height?: number | string; 117 118 /** 119 * Commands option. 120 * @type { ?string } 121 * @syscap SystemCapability.ArkUI.ArkUI.Full 122 * @since 7 123 */ 124 /** 125 * Commands option. 126 * @type { ?string } 127 * @syscap SystemCapability.ArkUI.ArkUI.Full 128 * @form 129 * @since 9 130 */ 131 /** 132 * Commands option. 133 * @type { ?string } 134 * @syscap SystemCapability.ArkUI.ArkUI.Full 135 * @crossplatform 136 * @form 137 * @since 10 138 */ 139 /** 140 * Commands option. 141 * @type { ?string } 142 * @syscap SystemCapability.ArkUI.ArkUI.Full 143 * @crossplatform 144 * @form 145 * @atomicservice 146 * @since 11 147 */ 148 /** 149 * Commands option. 150 * Anonymous Object Rectification. 151 * 152 * @type { ?string } 153 * @syscap SystemCapability.ArkUI.ArkUI.Full 154 * @crossplatform 155 * @form 156 * @atomicservice 157 * @since 18 158 */ 159 commands?: string 160} 161 162/** 163 * Provides the path drawing interface. 164 * 165 * @interface PathInterface 166 * @syscap SystemCapability.ArkUI.ArkUI.Full 167 * @since 7 168 */ 169/** 170 * Provides the path drawing interface. 171 * 172 * @interface PathInterface 173 * @syscap SystemCapability.ArkUI.ArkUI.Full 174 * @form 175 * @since 9 176 */ 177/** 178 * Provides the path drawing interface. 179 * 180 * @interface PathInterface 181 * @syscap SystemCapability.ArkUI.ArkUI.Full 182 * @crossplatform 183 * @form 184 * @since 10 185 */ 186/** 187 * Provides the path drawing interface. 188 * 189 * @interface PathInterface 190 * @syscap SystemCapability.ArkUI.ArkUI.Full 191 * @crossplatform 192 * @form 193 * @atomicservice 194 * @since 11 195 */ 196interface PathInterface { 197 /** 198 * Use new to create Path. 199 * 200 * @param { object } value 201 * @returns { PathAttribute } 202 * @syscap SystemCapability.ArkUI.ArkUI.Full 203 * @since 7 204 */ 205 /** 206 * Use new to create Path. 207 * 208 * @param { object } value 209 * @returns { PathAttribute } 210 * @syscap SystemCapability.ArkUI.ArkUI.Full 211 * @form 212 * @since 9 213 */ 214 /** 215 * Use new to create Path. 216 * 217 * @param { object } value 218 * @returns { PathAttribute } 219 * @syscap SystemCapability.ArkUI.ArkUI.Full 220 * @crossplatform 221 * @form 222 * @since 10 223 */ 224 /** 225 * Use new to create Path. 226 * 227 * @param { object } value 228 * @returns { PathAttribute } 229 * @syscap SystemCapability.ArkUI.ArkUI.Full 230 * @crossplatform 231 * @form 232 * @atomicservice 233 * @since 11 234 */ 235 /** 236 * Use new to create Path. 237 * Annonymous Object Rectification. 238 * 239 * @param { PathOptions } [options] - path options 240 * @returns { PathAttribute } 241 * @syscap SystemCapability.ArkUI.ArkUI.Full 242 * @crossplatform 243 * @form 244 * @atomicservice 245 * @since 18 246 */ 247 new (options?: PathOptions): PathAttribute; 248 249 /** 250 * Called when drawing path. 251 * 252 * @param { object } value 253 * @returns { PathAttribute } 254 * @syscap SystemCapability.ArkUI.ArkUI.Full 255 * @since 7 256 */ 257 /** 258 * Called when drawing path. 259 * 260 * @param { object } value 261 * @returns { PathAttribute } 262 * @syscap SystemCapability.ArkUI.ArkUI.Full 263 * @form 264 * @since 9 265 */ 266 /** 267 * Called when drawing path. 268 * 269 * @param { object } value 270 * @returns { PathAttribute } 271 * @syscap SystemCapability.ArkUI.ArkUI.Full 272 * @crossplatform 273 * @form 274 * @since 10 275 */ 276 /** 277 * Called when drawing path. 278 * 279 * @param { object } value 280 * @returns { PathAttribute } 281 * @syscap SystemCapability.ArkUI.ArkUI.Full 282 * @crossplatform 283 * @form 284 * @atomicservice 285 * @since 11 286 */ 287 /** 288 * Called when drawing path. 289 * Anonymous Object Rectification. 290 * 291 * @param { PathOptions } [options] - path options 292 * @returns { PathAttribute } 293 * @syscap SystemCapability.ArkUI.ArkUI.Full 294 * @crossplatform 295 * @form 296 * @atomicservice 297 * @since 18 298 */ 299 (options?: PathOptions): PathAttribute; 300} 301 302/** 303 * Provides methods for attribute path component. 304 * 305 * @extends CommonShapeMethod<PathAttribute> 306 * @syscap SystemCapability.ArkUI.ArkUI.Full 307 * @since 7 308 */ 309/** 310 * Provides methods for attribute path component. 311 * 312 * @extends CommonShapeMethod<PathAttribute> 313 * @syscap SystemCapability.ArkUI.ArkUI.Full 314 * @form 315 * @since 9 316 */ 317/** 318 * Provides methods for attribute path component. 319 * 320 * @extends CommonShapeMethod<PathAttribute> 321 * @syscap SystemCapability.ArkUI.ArkUI.Full 322 * @crossplatform 323 * @form 324 * @since 10 325 */ 326/** 327 * Provides methods for attribute path component. 328 * 329 * @extends CommonShapeMethod<PathAttribute> 330 * @syscap SystemCapability.ArkUI.ArkUI.Full 331 * @crossplatform 332 * @form 333 * @atomicservice 334 * @since 11 335 */ 336declare class PathAttribute extends CommonShapeMethod<PathAttribute> { 337 /** 338 * Called when the command string drawn by the path is set. 339 * 340 * @param { string } value 341 * @returns { PathAttribute } 342 * @syscap SystemCapability.ArkUI.ArkUI.Full 343 * @since 7 344 */ 345 /** 346 * Called when the command string drawn by the path is set. 347 * 348 * @param { string } value 349 * @returns { PathAttribute } 350 * @syscap SystemCapability.ArkUI.ArkUI.Full 351 * @form 352 * @since 9 353 */ 354 /** 355 * Called when the command string drawn by the path is set. 356 * 357 * @param { string } value 358 * @returns { PathAttribute } 359 * @syscap SystemCapability.ArkUI.ArkUI.Full 360 * @crossplatform 361 * @form 362 * @since 10 363 */ 364 /** 365 * Called when the command string drawn by the path is set. 366 * 367 * @param { string } value 368 * @returns { PathAttribute } 369 * @syscap SystemCapability.ArkUI.ArkUI.Full 370 * @crossplatform 371 * @form 372 * @atomicservice 373 * @since 11 374 */ 375 commands(value: string): PathAttribute; 376} 377 378/** 379 * Defines Path Component. 380 * 381 * @syscap SystemCapability.ArkUI.ArkUI.Full 382 * @since 7 383 */ 384/** 385 * Defines Path Component. 386 * 387 * @syscap SystemCapability.ArkUI.ArkUI.Full 388 * @form 389 * @since 9 390 */ 391/** 392 * Defines Path Component. 393 * 394 * @syscap SystemCapability.ArkUI.ArkUI.Full 395 * @crossplatform 396 * @form 397 * @since 10 398 */ 399/** 400 * Defines Path Component. 401 * 402 * @syscap SystemCapability.ArkUI.ArkUI.Full 403 * @crossplatform 404 * @form 405 * @atomicservice 406 * @since 11 407 */ 408declare const Path: PathInterface; 409 410/** 411 * Defines Path Component instance. 412 * 413 * @syscap SystemCapability.ArkUI.ArkUI.Full 414 * @since 7 415 */ 416/** 417 * Defines Path Component instance. 418 * 419 * @syscap SystemCapability.ArkUI.ArkUI.Full 420 * @form 421 * @since 9 422 */ 423/** 424 * Defines Path Component instance. 425 * 426 * @syscap SystemCapability.ArkUI.ArkUI.Full 427 * @crossplatform 428 * @form 429 * @since 10 430 */ 431/** 432 * Defines Path Component instance. 433 * 434 * @syscap SystemCapability.ArkUI.ArkUI.Full 435 * @crossplatform 436 * @form 437 * @atomicservice 438 * @since 11 439 */ 440declare const PathInstance: PathAttribute; 441