MockedSinglePixelPenTool.cs 634 B

1234567891011121314151617181920
  1. using System.Collections.Generic;
  2. using System.Windows.Media;
  3. using PixiEditor.Models.DataHolders;
  4. using PixiEditor.Models.Layers;
  5. using PixiEditor.Models.Position;
  6. using PixiEditor.Models.Tools;
  7. using SkiaSharp;
  8. namespace PixiEditorTests.ModelsTests.ControllersTests
  9. {
  10. public class MockedSinglePixelPenTool : BitmapOperationTool
  11. {
  12. public override string Tooltip => "";
  13. public override LayerChange[] Use(Layer layer, List<Coordinates> mouseMove, SKColor color)
  14. {
  15. return Only(BitmapPixelChanges.FromSingleColoredArray(new[] { mouseMove[0] }, color), layer.LayerGuid);
  16. }
  17. }
  18. }