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/*** if arkts 1.2 */ 22import { CommonShapeMethod } from './common'; 23import { ShapePoint } from './line'; 24/*** endif */ 25 26/** 27 * Define options used to construct a polygon. 28 * 29 * @interface PolygonOptions 30 * @syscap SystemCapability.ArkUI.ArkUI.Full 31 * @crossplatform 32 * @form 33 * @atomicservice 34 * @since arkts {'1.1':'18','1.2':'20'} 35 * @arkts 1.1&1.2 36 */ 37declare interface PolygonOptions { 38 /** 39 * Polygon width. 40 * 41 * @type { ?(string | number) } 42 * @syscap SystemCapability.ArkUI.ArkUI.Full 43 * @since 7 44 */ 45 /** 46 * Polygon width. 47 * 48 * @type { ?(string | number) } 49 * @syscap SystemCapability.ArkUI.ArkUI.Full 50 * @form 51 * @since 9 52 */ 53 /** 54 * Polygon width. 55 * 56 * @type { ?(string | number) } 57 * @syscap SystemCapability.ArkUI.ArkUI.Full 58 * @crossplatform 59 * @form 60 * @since 10 61 */ 62 /** 63 * Polygon width. 64 * 65 * @type { ?(string | number) } 66 * @syscap SystemCapability.ArkUI.ArkUI.Full 67 * @crossplatform 68 * @form 69 * @atomicservice 70 * @since 11 71 */ 72/** 73 * Polygon width. 74 * Anonymous Object Rectification. 75 * 76 * @type { ?(string | number) } 77 * @syscap SystemCapability.ArkUI.ArkUI.Full 78 * @crossplatform 79 * @form 80 * @atomicservice 81 * @since 18 82 */ 83 /** 84 * Polygon width. 85 * 86 * @type { ?Length } 87 * @syscap SystemCapability.ArkUI.ArkUI.Full 88 * @crossplatform 89 * @form 90 * @atomicservice 91 * @since 20 92 */ 93 width?: Length; 94 /** 95 * Polygon width. 96 * 97 * @type { ?(string | number) } 98 * @syscap SystemCapability.ArkUI.ArkUI.Full 99 * @crossplatform 100 * @form 101 * @atomicservice 102 * @since 20 103 * @arkts 1.2 104 */ 105 width?: string | number; 106 107 /** 108 * Polygon height. 109 * 110 * @type { ?(string | number) } 111 * @syscap SystemCapability.ArkUI.ArkUI.Full 112 * @since 7 113 */ 114 /** 115 * Polygon height. 116 * 117 * @type { ?(string | number) } 118 * @syscap SystemCapability.ArkUI.ArkUI.Full 119 * @form 120 * @since 9 121 */ 122 /** 123 * Polygon height. 124 * 125 * @type { ?(string | number) } 126 * @syscap SystemCapability.ArkUI.ArkUI.Full 127 * @crossplatform 128 * @form 129 * @since 10 130 */ 131 /** 132 * Polygon height. 133 * 134 * @type { ?(string | number) } 135 * @syscap SystemCapability.ArkUI.ArkUI.Full 136 * @crossplatform 137 * @form 138 * @atomicservice 139 * @since 11 140 */ 141/** 142 * Polygon height. 143 * Anonymous Object Rectification. 144 * 145 * @type { ?(string | number) } 146 * @syscap SystemCapability.ArkUI.ArkUI.Full 147 * @crossplatform 148 * @form 149 * @atomicservice 150 * @since 18 151 */ 152 /** 153 * Polygon height. 154 * 155 * @type { ?Length } 156 * @syscap SystemCapability.ArkUI.ArkUI.Full 157 * @crossplatform 158 * @form 159 * @atomicservice 160 * @since 20 161 */ 162 height?: Length; 163 /** 164 * Polygon height. 165 * 166 * @type { ?(string | number) } 167 * @syscap SystemCapability.ArkUI.ArkUI.Full 168 * @crossplatform 169 * @form 170 * @atomicservice 171 * @since 20 172 * @arkts 1.2 173 */ 174 height?: string | number 175} 176 177/** 178 * Provides the polygon drawing interface. 179 * 180 * @interface PolygonInterface 181 * @syscap SystemCapability.ArkUI.ArkUI.Full 182 * @since 7 183 */ 184/** 185 * Provides the polygon drawing interface. 186 * 187 * @interface PolygonInterface 188 * @syscap SystemCapability.ArkUI.ArkUI.Full 189 * @form 190 * @since 9 191 */ 192/** 193 * Provides the polygon drawing interface. 194 * 195 * @interface PolygonInterface 196 * @syscap SystemCapability.ArkUI.ArkUI.Full 197 * @crossplatform 198 * @form 199 * @since 10 200 */ 201/** 202 * Provides the polygon drawing interface. 203 * 204 * @interface PolygonInterface 205 * @syscap SystemCapability.ArkUI.ArkUI.Full 206 * @crossplatform 207 * @form 208 * @atomicservice 209 * @since 11 210 */ 211interface PolygonInterface { 212 /** 213 * Uses new to create Polygon. 214 * 215 * @since 7 216 */ 217 /** 218 * Uses new to create Polygon. 219 * 220 * @syscap SystemCapability.ArkUI.ArkUI.Full 221 * @form 222 * @since 9 223 */ 224 /** 225 * Uses new to create Polygon. 226 * 227 * @syscap SystemCapability.ArkUI.ArkUI.Full 228 * @crossplatform 229 * @form 230 * @since 10 231 */ 232 /** 233 * Uses new to create Polygon. 234 * 235 * @syscap SystemCapability.ArkUI.ArkUI.Full 236 * @crossplatform 237 * @form 238 * @atomicservice 239 * @since 11 240 */ 241 /** 242 * Uses new to create Polygon. 243 * Anonymous Object Rectification. 244 * 245 * @param { PolygonOptions } [options] - Polygon options 246 * @returns { PolygonAttribute } 247 * @syscap SystemCapability.ArkUI.ArkUI.Full 248 * @crossplatform 249 * @form 250 * @atomicservice 251 * @since 18 252 */ 253 new (options?: PolygonOptions): PolygonAttribute; 254 255 /** 256 * Called when drawing a polygon. 257 * 258 * @param { object } value 259 * @returns { PolygonAttribute } 260 * @syscap SystemCapability.ArkUI.ArkUI.Full 261 * @since 7 262 */ 263 /** 264 * Called when drawing a polygon. 265 * 266 * @param { object } value 267 * @returns { PolygonAttribute } 268 * @syscap SystemCapability.ArkUI.ArkUI.Full 269 * @form 270 * @since 9 271 */ 272 /** 273 * Called when drawing a polygon. 274 * 275 * @param { object } value 276 * @returns { PolygonAttribute } 277 * @syscap SystemCapability.ArkUI.ArkUI.Full 278 * @crossplatform 279 * @form 280 * @since 10 281 */ 282 /** 283 * Called when drawing a polygon. 284 * 285 * @param { object } value 286 * @returns { PolygonAttribute } 287 * @syscap SystemCapability.ArkUI.ArkUI.Full 288 * @crossplatform 289 * @form 290 * @atomicservice 291 * @since 11 292 */ 293 /** 294 * Called when drawing a polygon. 295 * Anonymous Object Rectification. 296 * 297 * @param { PolygonOptions } [options] - Polygon options 298 * @returns { PolygonAttribute } 299 * @syscap SystemCapability.ArkUI.ArkUI.Full 300 * @crossplatform 301 * @form 302 * @atomicservice 303 * @since 18 304 */ 305 (options?: PolygonOptions): PolygonAttribute; 306} 307 308/** 309 * Provides attribute for Polygon. 310 * 311 * @extends CommonShapeMethod<PolygonAttribute> 312 * @syscap SystemCapability.ArkUI.ArkUI.Full 313 * @since 7 314 */ 315/** 316 * Provides attribute for Polygon. 317 * 318 * @extends CommonShapeMethod<PolygonAttribute> 319 * @syscap SystemCapability.ArkUI.ArkUI.Full 320 * @form 321 * @since 9 322 */ 323/** 324 * Provides attribute for Polygon. 325 * 326 * @extends CommonShapeMethod<PolygonAttribute> 327 * @syscap SystemCapability.ArkUI.ArkUI.Full 328 * @crossplatform 329 * @form 330 * @since 10 331 */ 332/** 333 * Provides attribute for Polygon. 334 * 335 * @extends CommonShapeMethod<PolygonAttribute> 336 * @syscap SystemCapability.ArkUI.ArkUI.Full 337 * @crossplatform 338 * @form 339 * @atomicservice 340 * @since arkts {'1.1':'11','1.2':'20'} 341 * @arkts 1.1&1.2 342 */ 343declare class PolygonAttribute extends CommonShapeMethod<PolygonAttribute> { 344 /** 345 * Called when the vertex coordinate list of a polygon is set. 346 * 347 * @param { Array<any> } value 348 * @returns { PolygonAttribute } 349 * @syscap SystemCapability.ArkUI.ArkUI.Full 350 * @since 7 351 */ 352 /** 353 * Called when the vertex coordinate list of a polygon is set. 354 * 355 * @param { Array<any> } value 356 * @returns { PolygonAttribute } 357 * @syscap SystemCapability.ArkUI.ArkUI.Full 358 * @form 359 * @since 9 360 */ 361 /** 362 * Called when the vertex coordinate list of a polygon is set. 363 * 364 * @param { Array<any> } value 365 * @returns { PolygonAttribute } 366 * @syscap SystemCapability.ArkUI.ArkUI.Full 367 * @crossplatform 368 * @form 369 * @since 10 370 */ 371 /** 372 * Called when the vertex coordinate list of a polygon is set. 373 * 374 * @param { Array<any> } value 375 * @returns { PolygonAttribute } 376 * @syscap SystemCapability.ArkUI.ArkUI.Full 377 * @crossplatform 378 * @form 379 * @atomicservice 380 * @since 11 381 */ 382 points(value: Array<any>): PolygonAttribute; 383 384 /** 385 * Called when the vertex coordinate list of a polygon is set. 386 * 387 * @param { Array<ShapePoint> } value 388 * @returns { PolygonAttribute } 389 * @syscap SystemCapability.ArkUI.ArkUI.Full 390 * @crossplatform 391 * @form 392 * @atomicservice 393 * @since 20 394 * @arkts 1.2 395 */ 396 points(value: Array<ShapePoint>): PolygonAttribute; 397} 398 399/** 400 * Defines Polygon Component. 401 * 402 * @syscap SystemCapability.ArkUI.ArkUI.Full 403 * @since 7 404 */ 405/** 406 * Defines CheckboxGroup Component. 407 * 408 * @syscap SystemCapability.ArkUI.ArkUI.Full 409 * @form 410 * @since 9 411 */ 412/** 413 * Defines CheckboxGroup Component. 414 * 415 * @syscap SystemCapability.ArkUI.ArkUI.Full 416 * @crossplatform 417 * @form 418 * @since 10 419 */ 420/** 421 * Defines CheckboxGroup Component. 422 * 423 * @syscap SystemCapability.ArkUI.ArkUI.Full 424 * @crossplatform 425 * @form 426 * @atomicservice 427 * @since 11 428 */ 429declare const Polygon: PolygonInterface; 430 431/** 432 * Defines Polygon Component instance. 433 * 434 * @syscap SystemCapability.ArkUI.ArkUI.Full 435 * @since 7 436 */ 437/** 438 * Defines Polygon Component instance. 439 * 440 * @syscap SystemCapability.ArkUI.ArkUI.Full 441 * @form 442 * @since 9 443 */ 444/** 445 * Defines Polygon Component instance. 446 * 447 * @syscap SystemCapability.ArkUI.ArkUI.Full 448 * @crossplatform 449 * @form 450 * @since 10 451 */ 452/** 453 * Defines Polygon Component instance. 454 * 455 * @syscap SystemCapability.ArkUI.ArkUI.Full 456 * @crossplatform 457 * @form 458 * @atomicservice 459 * @since 11 460 */ 461declare const PolygonInstance: PolygonAttribute; 462 463/** 464 * Provides the polygon drawing interface. 465 * 466 * @interface PolygonInterface 467 * @syscap SystemCapability.ArkUI.ArkUI.Full 468 * @crossplatform 469 * @form 470 * @atomicservice 471 * @since 20 472 * @arkts 1.2 473 */ 474interface PolygonInterface { 475 /** 476 * Called when drawing a polygon. 477 * 478 * @param { PolygonOptions } [options] - Polygon options 479 * @returns { PolygonAttribute } 480 * @syscap SystemCapability.ArkUI.ArkUI.Full 481 * @crossplatform 482 * @form 483 * @atomicservice 484 * @since 20 485 * @arkts 1.2 486 */ 487 (options?: PolygonOptions): PolygonAttribute; 488} 489