SixelSupportResult.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. namespace Terminal.Gui;
  2. /// <summary>
  3. /// Describes the discovered state of sixel support and ancillary information
  4. /// e.g. <see cref="Resolution"/>. You can use any <see cref="ISixelSupportDetector"/>
  5. /// to discover this information.
  6. /// </summary>
  7. public class SixelSupportResult
  8. {
  9. /// <summary>
  10. /// Whether the terminal supports sixel graphic format.
  11. /// Defaults to false.
  12. /// </summary>
  13. public bool IsSupported { get; set; }
  14. /// <summary>
  15. /// The number of pixels of sixel that corresponds to each Col (<see cref="Size.Width"/>)
  16. /// and each Row (<see cref="Size.Height"/>. Defaults to 10x20.
  17. /// </summary>
  18. public Size Resolution { get; set; } = new (10, 20);
  19. /// <summary>
  20. /// The maximum number of colors that can be included in a sixel image. Defaults
  21. /// to 256.
  22. /// </summary>
  23. public int MaxPaletteColors { get; set; } = 256;
  24. /// <summary>
  25. /// Whether the terminal supports transparent background sixels.
  26. /// Defaults to false
  27. /// </summary>
  28. public bool SupportsTransparency { get; set; }
  29. }