|
@@ -113,25 +113,23 @@ namespace PixiEditor.Models.Controllers
|
|
Int32Rect layerRect = new Int32Rect(layer.OffsetX, layer.OffsetY, layer.Width, layer.Height);
|
|
Int32Rect layerRect = new Int32Rect(layer.OffsetX, layer.OffsetY, layer.Width, layer.Height);
|
|
Int32Rect layerPortion = layerRect.Intersect(dirtyRectangle);
|
|
Int32Rect layerPortion = layerRect.Intersect(dirtyRectangle);
|
|
|
|
|
|
- finalSurface.SkiaSurface.Canvas.DrawImage(
|
|
|
|
- layer.LayerBitmap.SkiaSurface.Snapshot(),
|
|
|
|
- new SKRect(
|
|
|
|
- layerPortion.X - layer.OffsetX,
|
|
|
|
- layerPortion.Y - layer.OffsetY,
|
|
|
|
- layerPortion.X - layer.OffsetX + layerPortion.Width,
|
|
|
|
- layerPortion.Y - layer.OffsetY + layerPortion.Height),
|
|
|
|
- new SKRect(
|
|
|
|
- layerPortion.X,
|
|
|
|
- layerPortion.Y,
|
|
|
|
- layerPortion.X + layerPortion.Width,
|
|
|
|
- layerPortion.Y + layerPortion.Height
|
|
|
|
- ),
|
|
|
|
- BlendingPaint);/*
|
|
|
|
- layer.LayerBitmap.SkiaSurface.Draw(
|
|
|
|
- finalSurface.SkiaSurface.Canvas,
|
|
|
|
- layer.OffsetX,
|
|
|
|
- layer.OffsetY,
|
|
|
|
- BlendingPaint);*/
|
|
|
|
|
|
+ using (var snapshot = layer.LayerBitmap.SkiaSurface.Snapshot())
|
|
|
|
+ {
|
|
|
|
+ finalSurface.SkiaSurface.Canvas.DrawImage(
|
|
|
|
+ snapshot,
|
|
|
|
+ new SKRect(
|
|
|
|
+ layerPortion.X - layer.OffsetX,
|
|
|
|
+ layerPortion.Y - layer.OffsetY,
|
|
|
|
+ layerPortion.X - layer.OffsetX + layerPortion.Width,
|
|
|
|
+ layerPortion.Y - layer.OffsetY + layerPortion.Height),
|
|
|
|
+ new SKRect(
|
|
|
|
+ layerPortion.X,
|
|
|
|
+ layerPortion.Y,
|
|
|
|
+ layerPortion.X + layerPortion.Width,
|
|
|
|
+ layerPortion.Y + layerPortion.Height
|
|
|
|
+ ),
|
|
|
|
+ BlendingPaint);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
finalBitmap.Lock();
|
|
finalBitmap.Lock();
|
|
finalSurface.SkiaSurface.Draw(backingSurface.Canvas, 0, 0, Surface.ReplacingPaint);
|
|
finalSurface.SkiaSurface.Draw(backingSurface.Canvas, 0, 0, Surface.ReplacingPaint);
|