Equbuxu 3 年 前
コミット
1e7f911ff2

+ 2 - 0
PixiEditor/Models/ImageManipulation/BitmapUtils.cs

@@ -25,6 +25,8 @@ namespace PixiEditor.Models.ImageManipulation
             for (int i = 0; i < layers.Count(); i++)
             {
                 Layer layer = layers.ElementAt(i);
+                if (structure != null && !LayerStructureUtils.GetFinalLayerIsVisible(layer, structure))
+                    continue;
                 float layerOpacity = structure == null ? layer.Opacity : LayerStructureUtils.GetFinalLayerOpacity(layer, structure);
                 paint.Color = new(255, 255, 255, (byte)(layerOpacity * 255));
 

+ 2 - 4
PixiEditor/Models/Tools/Tools/FloodFillTool.cs

@@ -24,18 +24,16 @@ namespace PixiEditor.Models.Tools.Tools
 
         public override void Use(Layer layer, List<Coordinates> coordinates, SKColor color)
         {
-            Stopwatch sw = new Stopwatch();
-            sw.Start();
             if (layer.IsReset)
             {
+                layer.DynamicResizeAbsolute(BitmapManager.ActiveDocument.Width, BitmapManager.ActiveDocument.Height, 0, 0);
                 layer.LayerBitmap.SkiaSurface.Canvas.Clear(color);
+                layer.InvokeLayerBitmapChange();
             }
             else
             {
                 LinearFill(layer, coordinates[0], color);
             }
-            sw.Stop();
-            Trace.WriteLine(sw.ElapsedMilliseconds);
         }
 
         public void LinearFill(Layer layer, Coordinates startingCoords, SKColor newColor)