Этап 2
This commit is contained in:
23
Minint.Core/Services/IPaletteService.cs
Normal file
23
Minint.Core/Services/IPaletteService.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using Minint.Core.Models;
|
||||
|
||||
namespace Minint.Core.Services;
|
||||
|
||||
public interface IPaletteService
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the index of <paramref name="color"/> in the document palette.
|
||||
/// If the color is not present, appends it and returns the new index.
|
||||
/// </summary>
|
||||
int EnsureColor(MinintDocument document, RgbaColor color);
|
||||
|
||||
/// <summary>
|
||||
/// Finds index of an exact color match, or returns -1 if not found.
|
||||
/// </summary>
|
||||
int FindColor(MinintDocument document, RgbaColor color);
|
||||
|
||||
/// <summary>
|
||||
/// Removes unused colors from the palette and remaps all layer pixel indices.
|
||||
/// Index 0 (transparent) is always preserved.
|
||||
/// </summary>
|
||||
void CompactPalette(MinintDocument document);
|
||||
}
|
||||
Reference in New Issue
Block a user