xml comments

This commit is contained in:
tznind
2024-10-23 19:36:09 +01:00
parent 3156641c1e
commit ce41afdd12
3 changed files with 11 additions and 0 deletions

View File

@@ -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> ();
}

View File

@@ -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))

View File

@@ -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)