Transform.cs 910 B

123456789101112131415161718192021222324252627282930313233
  1. // Copyright (c) The Avalonia Project. All rights reserved.
  2. // Licensed under the MIT license. See licence.md file in the project root for full license information.
  3. using System;
  4. using Avalonia.Animation;
  5. using Avalonia.VisualTree;
  6. namespace Avalonia.Media
  7. {
  8. /// <summary>
  9. /// Represents a transform on an <see cref="IVisual"/>.
  10. /// </summary>
  11. public abstract class Transform : Animatable
  12. {
  13. /// <summary>
  14. /// Raised when the transform changes.
  15. /// </summary>
  16. public event EventHandler Changed;
  17. /// <summary>
  18. /// Gets the tranform's <see cref="Matrix"/>.
  19. /// </summary>
  20. public abstract Matrix Value { get; }
  21. /// <summary>
  22. /// Raises the <see cref="Changed"/> event.
  23. /// </summary>
  24. protected void RaiseChanged()
  25. {
  26. Changed?.Invoke(this, EventArgs.Empty);
  27. }
  28. }
  29. }