1/* 2 * Copyright (c) 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 * 2D transformation matrix, supporting rotation, translation, and scaling of the X-axis and Y-axis 18 * 19 * @syscap SystemCapability.ArkUI.ArkUI.Full 20 * @since 8 21 */ 22/** 23 * 2D transformation matrix, supporting rotation, translation, and scaling of the X-axis and Y-axis 24 * 25 * @syscap SystemCapability.ArkUI.ArkUI.Full 26 * @since 9 27 * @form 28 */ 29/** 30 * 2D transformation matrix, supporting rotation, translation, and scaling of the X-axis and Y-axis 31 * 32 * @syscap SystemCapability.ArkUI.ArkUI.Full 33 * @crossplatform 34 * @since 10 35 * @form 36 */ 37/** 38 * 2D transformation matrix, supporting rotation, translation, and scaling of the X-axis and Y-axis 39 * 40 * @syscap SystemCapability.ArkUI.ArkUI.Full 41 * @crossplatform 42 * @atomicservice 43 * @since 11 44 * @form 45 */ 46declare class Matrix2D { 47 /** 48 * Horizontal Zoom 49 * 50 * @type { ?number } 51 * @syscap SystemCapability.ArkUI.ArkUI.Full 52 * @since 8 53 */ 54 /** 55 * Horizontal Zoom 56 * 57 * @type { ?number } 58 * @syscap SystemCapability.ArkUI.ArkUI.Full 59 * @since 9 60 * @form 61 */ 62 /** 63 * Horizontal Zoom 64 * 65 * @type { ?number } 66 * @syscap SystemCapability.ArkUI.ArkUI.Full 67 * @crossplatform 68 * @since 10 69 * @form 70 */ 71 /** 72 * Horizontal Zoom 73 * 74 * @type { ?number } 75 * @syscap SystemCapability.ArkUI.ArkUI.Full 76 * @crossplatform 77 * @atomicservice 78 * @since 11 79 * @form 80 */ 81 scaleX?: number; 82 83 /** 84 * Vertical Tilt 85 * 86 * @type { ?number } 87 * @syscap SystemCapability.ArkUI.ArkUI.Full 88 * @since 8 89 */ 90 /** 91 * Vertical Tilt 92 * 93 * @type { ?number } 94 * @syscap SystemCapability.ArkUI.ArkUI.Full 95 * @since 9 96 * @form 97 */ 98 /** 99 * Vertical Tilt 100 * 101 * @type { ?number } 102 * @syscap SystemCapability.ArkUI.ArkUI.Full 103 * @crossplatform 104 * @since 10 105 * @form 106 */ 107 /** 108 * Vertical Tilt 109 * 110 * @type { ?number } 111 * @syscap SystemCapability.ArkUI.ArkUI.Full 112 * @crossplatform 113 * @atomicservice 114 * @since 11 115 * @form 116 */ 117 rotateY?: number; 118 119 /** 120 * Horizontal Tilt 121 * 122 * @type { ?number } 123 * @syscap SystemCapability.ArkUI.ArkUI.Full 124 * @since 8 125 */ 126 /** 127 * Horizontal Tilt 128 * 129 * @type { ?number } 130 * @syscap SystemCapability.ArkUI.ArkUI.Full 131 * @since 9 132 * @form 133 */ 134 /** 135 * Horizontal Tilt 136 * 137 * @type { ?number } 138 * @syscap SystemCapability.ArkUI.ArkUI.Full 139 * @crossplatform 140 * @since 10 141 * @form 142 */ 143 /** 144 * Horizontal Tilt 145 * 146 * @type { ?number } 147 * @syscap SystemCapability.ArkUI.ArkUI.Full 148 * @crossplatform 149 * @atomicservice 150 * @since 11 151 * @form 152 */ 153 rotateX?: number; 154 155 /** 156 * Vertical Zoom 157 * 158 * @type { ?number } 159 * @syscap SystemCapability.ArkUI.ArkUI.Full 160 * @since 8 161 */ 162 /** 163 * Vertical Zoom 164 * 165 * @type { ?number } 166 * @syscap SystemCapability.ArkUI.ArkUI.Full 167 * @since 9 168 * @form 169 */ 170 /** 171 * Vertical Zoom 172 * 173 * @type { ?number } 174 * @syscap SystemCapability.ArkUI.ArkUI.Full 175 * @crossplatform 176 * @since 10 177 * @form 178 */ 179 /** 180 * Vertical Zoom 181 * 182 * @type { ?number } 183 * @syscap SystemCapability.ArkUI.ArkUI.Full 184 * @crossplatform 185 * @atomicservice 186 * @since 11 187 * @form 188 */ 189 scaleY?: number; 190 191 /** 192 * Horizontal movement 193 * 194 * @type { ?number } 195 * @syscap SystemCapability.ArkUI.ArkUI.Full 196 * @since 8 197 */ 198 /** 199 * Horizontal movement 200 * 201 * @type { ?number } 202 * @syscap SystemCapability.ArkUI.ArkUI.Full 203 * @since 9 204 * @form 205 */ 206 /** 207 * Horizontal movement 208 * 209 * @type { ?number } 210 * @syscap SystemCapability.ArkUI.ArkUI.Full 211 * @crossplatform 212 * @since 10 213 * @form 214 */ 215 /** 216 * Horizontal movement 217 * 218 * @type { ?number } 219 * @syscap SystemCapability.ArkUI.ArkUI.Full 220 * @crossplatform 221 * @atomicservice 222 * @since 11 223 * @form 224 */ 225 translateX?: number; 226 227 /** 228 * Vertical movement 229 * 230 * @type { ?number } 231 * @syscap SystemCapability.ArkUI.ArkUI.Full 232 * @since 8 233 */ 234 /** 235 * Vertical movement 236 * 237 * @type { ?number } 238 * @syscap SystemCapability.ArkUI.ArkUI.Full 239 * @since 9 240 * @form 241 */ 242 /** 243 * Vertical movement 244 * 245 * @type { ?number } 246 * @syscap SystemCapability.ArkUI.ArkUI.Full 247 * @crossplatform 248 * @since 10 249 * @form 250 */ 251 /** 252 * Vertical movement 253 * 254 * @type { ?number } 255 * @syscap SystemCapability.ArkUI.ArkUI.Full 256 * @crossplatform 257 * @atomicservice 258 * @since 11 259 * @form 260 */ 261 translateY?: number; 262 263 /** 264 * Transforms the current 2D matrix back to the identity matrix (i.e., without any rotational 265 * translation scaling effect) 266 * 267 * @returns { Matrix2D } 268 * @syscap SystemCapability.ArkUI.ArkUI.Full 269 * @since 8 270 */ 271 /** 272 * Transforms the current 2D matrix back to the identity matrix (i.e., without any rotational 273 * translation scaling effect) 274 * 275 * @returns { Matrix2D } 276 * @syscap SystemCapability.ArkUI.ArkUI.Full 277 * @since 9 278 * @form 279 */ 280 /** 281 * Transforms the current 2D matrix back to the identity matrix (i.e., without any rotational 282 * translation scaling effect) 283 * 284 * @returns { Matrix2D } 285 * @syscap SystemCapability.ArkUI.ArkUI.Full 286 * @crossplatform 287 * @since 10 288 * @form 289 */ 290 /** 291 * Transforms the current 2D matrix back to the identity matrix (i.e., without any rotational 292 * translation scaling effect) 293 * 294 * @returns { Matrix2D } 295 * @syscap SystemCapability.ArkUI.ArkUI.Full 296 * @crossplatform 297 * @atomicservice 298 * @since 11 299 * @form 300 */ 301 identity(): Matrix2D; 302 303 /** 304 * Transform the current 2D matrix into an inverse matrix (that is, the transformation effect 305 * is the opposite effect of the original) 306 * 307 * @returns { Matrix2D } 308 * @syscap SystemCapability.ArkUI.ArkUI.Full 309 * @since 8 310 */ 311 /** 312 * Transform the current 2D matrix into an inverse matrix (that is, the transformation effect 313 * is the opposite effect of the original) 314 * 315 * @returns { Matrix2D } 316 * @syscap SystemCapability.ArkUI.ArkUI.Full 317 * @since 9 318 * @form 319 */ 320 /** 321 * Transform the current 2D matrix into an inverse matrix (that is, the transformation effect 322 * is the opposite effect of the original) 323 * 324 * @returns { Matrix2D } 325 * @syscap SystemCapability.ArkUI.ArkUI.Full 326 * @crossplatform 327 * @since 10 328 * @form 329 */ 330 /** 331 * Transform the current 2D matrix into an inverse matrix (that is, the transformation effect 332 * is the opposite effect of the original) 333 * 334 * @returns { Matrix2D } 335 * @syscap SystemCapability.ArkUI.ArkUI.Full 336 * @crossplatform 337 * @atomicservice 338 * @since 11 339 * @form 340 */ 341 invert(): Matrix2D; 342 343 /** 344 * The matrix is superimposed in right multiplication mode. When the input parameter is empty, 345 * the matrix is superimposed. 346 * 347 * @param { Matrix2D } other - Matrix to be superimposed 348 * @returns { Matrix2D } 349 * @syscap SystemCapability.ArkUI.ArkUI.Full 350 * @since 8 351 */ 352 /** 353 * The matrix is superimposed in right multiplication mode. When the input parameter is empty, 354 * the matrix is superimposed. 355 * 356 * @param { Matrix2D } other - Matrix to be superimposed 357 * @returns { Matrix2D } 358 * @syscap SystemCapability.ArkUI.ArkUI.Full 359 * @since 9 360 * @deprecated since 10 361 * @form 362 */ 363 multiply(other?: Matrix2D): Matrix2D; 364 365 /** 366 * Adds the rotation effect of the X and Y axes to the current matrix. 367 * 368 * @param { number } rx - Rotation effect of the X-axis 369 * @param { number } ry - Rotation effect of the Y-axis 370 * @returns { Matrix2D } 371 * @syscap SystemCapability.ArkUI.ArkUI.Full 372 * @since 8 373 */ 374 /** 375 * Adds the rotation effect of the X and Y axes to the current matrix. 376 * 377 * @param { number } rx - Rotation effect of the X-axis 378 * @param { number } ry - Rotation effect of the Y-axis 379 * @returns { Matrix2D } 380 * @syscap SystemCapability.ArkUI.ArkUI.Full 381 * @since 9 382 * @deprecated since 10 383 * @useinstead rotate 384 * @form 385 */ 386 rotate(rx?: number, ry?: number): Matrix2D; 387 388 /** 389 * Adds the rotation effect of the X and Y axes to the current matrix. 390 * 391 * @param { number } degree - The rotation angle, clockwise in radians. 392 * @param { number } rx - Rotation effect of the X-axis 393 * @param { number } ry - Rotation effect of the Y-axis 394 * @returns { Matrix2D } 395 * @syscap SystemCapability.ArkUI.ArkUI.Full 396 * @crossplatform 397 * @since 10 398 * @form 399 */ 400 /** 401 * Adds the rotation effect of the X and Y axes to the current matrix. 402 * 403 * @param { number } degree - The rotation angle, clockwise in radians. 404 * @param { number } rx - Rotation effect of the X-axis 405 * @param { number } ry - Rotation effect of the Y-axis 406 * @returns { Matrix2D } 407 * @syscap SystemCapability.ArkUI.ArkUI.Full 408 * @crossplatform 409 * @atomicservice 410 * @since 11 411 * @form 412 */ 413 rotate(degree: number, rx?: number, ry?: number): Matrix2D; 414 415 /** 416 * Adds the translation effect of the X and Y axes to the current matrix. 417 * 418 * @param { number } tx - X-axis translation effect 419 * @param { number } ty - Y-axis translation effect 420 * @returns { Matrix2D } 421 * @syscap SystemCapability.ArkUI.ArkUI.Full 422 * @since 8 423 */ 424 /** 425 * Adds the translation effect of the X and Y axes to the current matrix. 426 * 427 * @param { number } tx - X-axis translation effect 428 * @param { number } ty - Y-axis translation effect 429 * @returns { Matrix2D } 430 * @syscap SystemCapability.ArkUI.ArkUI.Full 431 * @since 9 432 * @form 433 */ 434 /** 435 * Adds the translation effect of the X and Y axes to the current matrix. 436 * 437 * @param { number } tx - X-axis translation effect 438 * @param { number } ty - Y-axis translation effect 439 * @returns { Matrix2D } 440 * @syscap SystemCapability.ArkUI.ArkUI.Full 441 * @crossplatform 442 * @since 10 443 * @form 444 */ 445 /** 446 * Adds the translation effect of the X and Y axes to the current matrix. 447 * 448 * @param { number } tx - X-axis translation effect 449 * @param { number } ty - Y-axis translation effect 450 * @returns { Matrix2D } 451 * @syscap SystemCapability.ArkUI.ArkUI.Full 452 * @crossplatform 453 * @atomicservice 454 * @since 11 455 * @form 456 */ 457 translate(tx?: number, ty?: number): Matrix2D; 458 459 /** 460 * Adds the scaling effect of the X and Y axes to the current matrix. 461 * 462 * @param { number } sx - X-axis scaling effect 463 * @param { number } sy - Y-axis scaling effect 464 * @returns { Matrix2D } 465 * @syscap SystemCapability.ArkUI.ArkUI.Full 466 * @since 8 467 */ 468 /** 469 * Adds the scaling effect of the X and Y axes to the current matrix. 470 * 471 * @param { number } sx - X-axis scaling effect 472 * @param { number } sy - Y-axis scaling effect 473 * @returns { Matrix2D } 474 * @syscap SystemCapability.ArkUI.ArkUI.Full 475 * @since 9 476 * @form 477 */ 478 /** 479 * Adds the scaling effect of the X and Y axes to the current matrix. 480 * 481 * @param { number } sx - X-axis scaling effect 482 * @param { number } sy - Y-axis scaling effect 483 * @returns { Matrix2D } 484 * @syscap SystemCapability.ArkUI.ArkUI.Full 485 * @crossplatform 486 * @since 10 487 * @form 488 */ 489 /** 490 * Adds the scaling effect of the X and Y axes to the current matrix. 491 * 492 * @param { number } sx - X-axis scaling effect 493 * @param { number } sy - Y-axis scaling effect 494 * @returns { Matrix2D } 495 * @syscap SystemCapability.ArkUI.ArkUI.Full 496 * @crossplatform 497 * @atomicservice 498 * @since 11 499 * @form 500 */ 501 scale(sx?: number, sy?: number): Matrix2D; 502 503 /** 504 * Constructs a 2D change matrix object. The default value is the unit matrix. 505 * 506 * @syscap SystemCapability.ArkUI.ArkUI.Full 507 * @crossplatform 508 * @since 10 509 * @form 510 */ 511 /** 512 * Constructs a 2D change matrix object. The default value is the unit matrix. 513 * 514 * @syscap SystemCapability.ArkUI.ArkUI.Full 515 * @crossplatform 516 * @atomicservice 517 * @since 11 518 * @form 519 */ 520 constructor(); 521} 522