2
0
tznind 9 сар өмнө
parent
commit
ce41afdd12

+ 4 - 0
Terminal.Gui/Application/Application.Driver.cs

@@ -27,5 +27,9 @@ public static partial class Application // Driver abstractions
     [SerializableConfigurationProperty (Scope = typeof (SettingsScope))]
     public static string ForceDriver { get; set; } = string.Empty;
 
+    /// <summary>
+    /// Collection of sixel images to write out to screen when updating.
+    /// Only add to this collection if you are sure terminal supports sixel format.
+    /// </summary>
     public static List<SixelToRender> Sixel = new List<SixelToRender> ();
 }

+ 6 - 0
Terminal.Gui/Drawing/Quant/ColorQuantizer.cs

@@ -55,6 +55,12 @@ public class ColorQuantizer
         Palette = PaletteBuildingAlgorithm.BuildPalette (allColors, MaxColors);
     }
 
+    /// <summary>
+    /// Returns the closest color in <see cref="Palette"/> that matches <paramref name="toTranslate"/>
+    /// based on the color comparison algorithm defined by <see cref="DistanceAlgorithm"/>
+    /// </summary>
+    /// <param name="toTranslate"></param>
+    /// <returns></returns>
     public int GetNearestColor (Color toTranslate)
     {
         if (_nearestColorCache.TryGetValue (toTranslate, out int cachedAnswer))

+ 1 - 0
Terminal.Gui/Drawing/Quant/PopularityPaletteWithThreshold.cs

@@ -23,6 +23,7 @@ public class PopularityPaletteWithThreshold : IPaletteBuilder
         _mergeThreshold = mergeThreshold; // Set the threshold for merging similar colors
     }
 
+    /// <inheritdoc/>
     public List<Color> BuildPalette (List<Color> colors, int maxColors)
     {
         if (colors == null || colors.Count == 0 || maxColors <= 0)