|
|
@ -215,7 +215,7 @@ namespace Avalonia.Controls |
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Transformation matrix corresponding to _matrixTransform.
|
|
|
/// Transformation matrix corresponding to _matrixTransform.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
private Matrix _transformation; |
|
|
private Matrix _transformation = Matrix.Identity; |
|
|
private IDisposable? _transformChangedEvent; |
|
|
private IDisposable? _transformChangedEvent; |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
@ -256,13 +256,16 @@ namespace Avalonia.Controls |
|
|
/// </remarks>
|
|
|
/// </remarks>
|
|
|
private void ApplyLayoutTransform() |
|
|
private void ApplyLayoutTransform() |
|
|
{ |
|
|
{ |
|
|
if (LayoutTransform == null) |
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
// Get the transform matrix and apply it
|
|
|
// Get the transform matrix and apply it
|
|
|
_transformation = RoundMatrix(LayoutTransform.Value, DecimalsAfterRound); |
|
|
var matrix = LayoutTransform is null ? |
|
|
|
|
|
Matrix.Identity : |
|
|
|
|
|
RoundMatrix(LayoutTransform.Value, DecimalsAfterRound); |
|
|
|
|
|
|
|
|
|
|
|
if (_transformation == matrix) |
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
_matrixTransform.Matrix = _transformation; |
|
|
_transformation = matrix; |
|
|
|
|
|
_matrixTransform.Matrix = matrix; |
|
|
|
|
|
|
|
|
// New transform means re-layout is necessary
|
|
|
// New transform means re-layout is necessary
|
|
|
InvalidateMeasure(); |
|
|
InvalidateMeasure(); |
|
|
|