()
| 519 | } |
| 520 | |
| 521 | _updateLocalTransformation() { |
| 522 | const absScaleX = Math.abs(this._scaleX); |
| 523 | const absScaleY = Math.abs(this._scaleY); |
| 524 | const centerX = this.getUnscaledCenterX() * absScaleX; |
| 525 | const centerY = this.getUnscaledCenterY() * absScaleY; |
| 526 | const angleInRadians = (this.angle * Math.PI) / 180; |
| 527 | |
| 528 | this._localTransformation.setToTranslation(this.x, this.y); |
| 529 | this._localTransformation.rotateAround(angleInRadians, centerX, centerY); |
| 530 | if (this._flippedX) { |
| 531 | this._localTransformation.flipX(centerX); |
| 532 | } |
| 533 | if (this._flippedY) { |
| 534 | this._localTransformation.flipY(centerY); |
| 535 | } |
| 536 | this._localTransformation.scale(absScaleX, absScaleY); |
| 537 | |
| 538 | this._localInverseTransformation.copyFrom(this._localTransformation); |
| 539 | this._localInverseTransformation.invert(); |
| 540 | this._isLocalTransformationDirty = false; |
| 541 | } |
| 542 | |
| 543 | /** |
| 544 | * Return an array containing the coordinates of the point passed as parameter |
nothing calls this directly
no test coverage detected