Skip to content

Commit

Permalink
Merge pull request #592 from PixiEditor/debug_save_desktop_fix
Browse files Browse the repository at this point in the history
Removed debug fella
  • Loading branch information
flabbet committed Dec 14, 2023
2 parents 8bf53cd + e4bfaa0 commit 9ea875b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/ChunkyImageLib/Surface.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Runtime.CompilerServices;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using PixiEditor.DrawingApi.Core.ColorsImpl;
using PixiEditor.DrawingApi.Core.Numerics;
Expand Down Expand Up @@ -131,6 +132,7 @@ public unsafe bool IsFullyTransparent()
return true;
}

#if DEBUG
public void SaveToDesktop(string filename = "savedSurface.png")
{
using var final = DrawingSurface.Create(new ImageInfo(Size.X, Size.Y, ColorType.Rgba8888, AlphaType.Premul, ColorSpace.CreateSrgb()));
Expand All @@ -142,6 +144,7 @@ public void SaveToDesktop(string filename = "savedSurface.png")
png.SaveTo(stream);
}
}
#endif

private DrawingSurface CreateDrawingSurface()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ public override bool InitializeAndValidate(Document target)
image.SetBlendMode(blendMode);

var selectionImage = FloodFillHelper.FillSelection(target, selection!);

selectionImage.SaveToDesktop();

image.EnqueueDrawImage(new VecI(0, 0), selectionImage);

Expand Down

0 comments on commit 9ea875b

Please sign in to comment.