Этап 2

This commit is contained in:
2026-03-29 15:34:33 +03:00
parent 09d52aa973
commit 08b9039b58
19 changed files with 872 additions and 3 deletions

View File

@@ -0,0 +1,25 @@
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);
}