From ce41afdd1282981968a86c03a64a18149be4d8a4 Mon Sep 17 00:00:00 2001 From: tznind Date: Wed, 23 Oct 2024 19:36:09 +0100 Subject: [PATCH] xml comments --- Terminal.Gui/Application/Application.Driver.cs | 4 ++++ Terminal.Gui/Drawing/Quant/ColorQuantizer.cs | 6 ++++++ .../Drawing/Quant/PopularityPaletteWithThreshold.cs | 1 + 3 files changed, 11 insertions(+) diff --git a/Terminal.Gui/Application/Application.Driver.cs b/Terminal.Gui/Application/Application.Driver.cs index 0518dfdb5..c2f6431db 100644 --- a/Terminal.Gui/Application/Application.Driver.cs +++ b/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; + /// + /// Collection of sixel images to write out to screen when updating. + /// Only add to this collection if you are sure terminal supports sixel format. + /// public static List Sixel = new List (); } diff --git a/Terminal.Gui/Drawing/Quant/ColorQuantizer.cs b/Terminal.Gui/Drawing/Quant/ColorQuantizer.cs index 5aa10c652..ec6d102ea 100644 --- a/Terminal.Gui/Drawing/Quant/ColorQuantizer.cs +++ b/Terminal.Gui/Drawing/Quant/ColorQuantizer.cs @@ -55,6 +55,12 @@ public class ColorQuantizer Palette = PaletteBuildingAlgorithm.BuildPalette (allColors, MaxColors); } + /// + /// Returns the closest color in that matches + /// based on the color comparison algorithm defined by + /// + /// + /// public int GetNearestColor (Color toTranslate) { if (_nearestColorCache.TryGetValue (toTranslate, out int cachedAnswer)) diff --git a/Terminal.Gui/Drawing/Quant/PopularityPaletteWithThreshold.cs b/Terminal.Gui/Drawing/Quant/PopularityPaletteWithThreshold.cs index 0a7e8a023..86bbed404 100644 --- a/Terminal.Gui/Drawing/Quant/PopularityPaletteWithThreshold.cs +++ b/Terminal.Gui/Drawing/Quant/PopularityPaletteWithThreshold.cs @@ -23,6 +23,7 @@ public class PopularityPaletteWithThreshold : IPaletteBuilder _mergeThreshold = mergeThreshold; // Set the threshold for merging similar colors } + /// public List BuildPalette (List colors, int maxColors) { if (colors == null || colors.Count == 0 || maxColors <= 0)