* calculate transform matrix that represents the current transformations from the * object's properties, this matrix does not include the group transformation * @return {TMat2D} transform matrix for the object
()
| 499 | * @return {TMat2D} transform matrix for the object |
| 500 | */ |
| 501 | calcOwnMatrix(): TMat2D { |
| 502 | const key = this.transformMatrixKey(true), |
| 503 | cache = this.ownMatrixCache; |
| 504 | if (cache && cache.key === key) { |
| 505 | return cache.value; |
| 506 | } |
| 507 | const center = this.getRelativeCenterPoint(), |
| 508 | options = { |
| 509 | angle: this.angle, |
| 510 | translateX: center.x, |
| 511 | translateY: center.y, |
| 512 | scaleX: this.scaleX, |
| 513 | scaleY: this.scaleY, |
| 514 | skewX: this.skewX, |
| 515 | skewY: this.skewY, |
| 516 | flipX: this.flipX, |
| 517 | flipY: this.flipY, |
| 518 | }, |
| 519 | value = composeMatrix(options); |
| 520 | this.ownMatrixCache = { |
| 521 | key, |
| 522 | value, |
| 523 | }; |
| 524 | return value; |
| 525 | } |
| 526 | |
| 527 | /** |
| 528 | * Calculate object dimensions from its properties |
no test coverage detected