using Minint.Core.Models;

namespace Minint.Core.Services;

public interface IDrawingService
{
    /// <summary>
    /// Applies a circular brush stroke at (<paramref name="cx"/>, <paramref name="cy"/>)
    /// with the given <paramref name="radius"/>. Sets affected pixels to <paramref name="colorIndex"/>.
    /// </summary>
    void ApplyBrush(MinintLayer layer, int cx, int cy, int radius, int colorIndex, int width, int height);

    /// <summary>
    /// Applies a circular eraser at (<paramref name="cx"/>, <paramref name="cy"/>)
    /// with the given <paramref name="radius"/>. Sets affected pixels to index 0 (transparent).
    /// </summary>
    void ApplyEraser(MinintLayer layer, int cx, int cy, int radius, int width, int height);

    /// <summary>
    /// Returns the set of pixel coordinates affected by a circular brush/eraser
    /// centered at (<paramref name="cx"/>, <paramref name="cy"/>) with given <paramref name="radius"/>.
    /// Used for tool preview overlay.
    /// </summary>
    List<(int X, int Y)> GetBrushMask(int cx, int cy, int radius, int width, int height);
}
