mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Layer - Fixed some clipping/blending issues
This commit is contained in:
1 parent
d307f775c7
commit
050eb5bd2f
1 file changed
+8
-2
@@ -338,7 +338,6 @@ namespace Artemis.Core
|
|||||||
using var layerPaint = new SKPaint
|
using var layerPaint = new SKPaint
|
||||||
{
|
{
|
||||||
FilterQuality = SKFilterQuality.Low,
|
FilterQuality = SKFilterQuality.Low,
|
||||||
BlendMode = General.BlendMode.CurrentValue,
|
|
||||||
Color = new SKColor(0, 0, 0, (byte) (Transform.Opacity.CurrentValue * 2.55f))
|
Color = new SKColor(0, 0, 0, (byte) (Transform.Opacity.CurrentValue * 2.55f))
|
||||||
};
|
};
|
||||||
layerCanvas.Clear();
|
layerCanvas.Clear();
|
||||||
@@ -368,7 +367,14 @@ namespace Artemis.Core
|
|||||||
if (Parent is Folder parentFolder)
|
if (Parent is Folder parentFolder)
|
||||||
targetLocation = Path.Bounds.Location - parentFolder.Path.Bounds.Location;
|
targetLocation = Path.Bounds.Location - parentFolder.Path.Bounds.Location;
|
||||||
|
|
||||||
canvas.DrawBitmap(_layerBitmap, targetLocation, layerPaint);
|
using var canvasPaint = new SKPaint {BlendMode = General.BlendMode.CurrentValue};
|
||||||
|
using var canvasPath = new SKPath(Path);
|
||||||
|
canvasPath.Transform(SKMatrix.MakeTranslation(
|
||||||
|
(canvasPath.Bounds.Left - targetLocation.X) * -1,
|
||||||
|
(canvasPath.Bounds.Top - targetLocation.Y) * -1)
|
||||||
|
);
|
||||||
|
canvas.ClipPath(canvasPath);
|
||||||
|
canvas.DrawBitmap(_layerBitmap, targetLocation, canvasPaint);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SimpleRender(SKCanvas canvas, SKImageInfo canvasInfo, SKPaint paint, SKPath layerPath)
|
private void SimpleRender(SKCanvas canvas, SKImageInfo canvasInfo, SKPaint paint, SKPath layerPath)
|
||||||
|
|||||||
Reference in new issue
Block a user