Skip to content

Commit

Permalink
xml comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tznind committed Oct 23, 2024
1 parent 3156641 commit ce41afd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Terminal.Gui/Application/Application.Driver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 6 additions & 0 deletions Terminal.Gui/Drawing/Quant/ColorQuantizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ public void BuildPalette (Color [,] pixels)
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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public PopularityPaletteWithThreshold (IColorDistance colorDistance, double merg
_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)
Expand Down

0 comments on commit ce41afd

Please sign in to comment.