IOutlineSettings.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // Copyright (C) 2019-2021 Alexander Bogarsukov. All rights reserved.
  2. // See the LICENSE.md file in the project root for more information.
  3. using System;
  4. using UnityEngine;
  5. namespace UnityFx.Outline
  6. {
  7. /// <summary>
  8. /// Generic outline settings.
  9. /// </summary>
  10. public interface IOutlineSettings : IEquatable<IOutlineSettings>
  11. {
  12. /// <summary>
  13. /// Gets or sets outline color.
  14. /// </summary>
  15. /// <seealso cref="OutlineWidth"/>
  16. /// <seealso cref="OutlineRenderMode"/>
  17. Color OutlineColor { get; set; }
  18. /// <summary>
  19. /// Gets or sets outline width in pixels. Allowed range is [<see cref="OutlineRenderer.MinWidth"/>, <see cref="OutlineRenderer.MaxWidth"/>].
  20. /// </summary>
  21. /// <seealso cref="OutlineColor"/>
  22. /// <seealso cref="OutlineRenderMode"/>
  23. int OutlineWidth { get; set; }
  24. /// <summary>
  25. /// Gets or sets outline intensity value. Allowed range is [<see cref="OutlineRenderer.MinIntensity"/>, <see cref="OutlineRenderer.MaxIntensity"/>].
  26. /// This is used for blurred oulines only (i.e. <see cref="OutlineRenderMode"/> has <see cref="OutlineRenderFlags.Blurred"/> flag).
  27. /// </summary>
  28. /// <seealso cref="OutlineRenderMode"/>
  29. /// <seealso cref="OutlineColor"/>
  30. /// <seealso cref="OutlineWidth"/>
  31. float OutlineIntensity { get; set; }
  32. /// <summary>
  33. /// Gets or sets alpha cutoff value. Allowed range is [0, 1]. This is used only when <see cref="OutlineRenderMode"/> has <see cref="OutlineRenderFlags.EnableAlphaTesting"/> flag.
  34. /// </summary>
  35. /// <seealso cref="OutlineRenderMode"/>
  36. float OutlineAlphaCutoff { get; set; }
  37. /// <summary>
  38. /// Gets or sets outline render mode.
  39. /// </summary>
  40. /// <seealso cref="OutlineWidth"/>
  41. /// <seealso cref="OutlineColor"/>
  42. /// <seealso cref="OutlineIntensity"/>
  43. OutlineRenderFlags OutlineRenderMode { get; set; }
  44. }
  45. }