Skip to content

Commit

Permalink
Fix incorrect cutting/pasting behavior #951 (#978)
Browse files Browse the repository at this point in the history
* Fix selection clipping to handle holes in selected area

* Use document.Selection.Clip() to get selected surface
  • Loading branch information
f-i-l-i-p authored Sep 17, 2024
1 parent deb29b3 commit ab08b7b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Pinta.Core/Classes/DocumentLayers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,7 @@ public ImageSurface GetClippedLayer (int index)
var surf = CairoExtensions.CreateImageSurface (Format.Argb32, document.ImageSize.Width, document.ImageSize.Height);

var g = new Context (surf);
g.AppendPath (document.Selection.SelectionPath);
g.Clip ();
document.Selection.Clip (g);

g.SetSourceSurface (user_layers[index].Surface, 0, 0);
g.Paint ();
Expand Down

0 comments on commit ab08b7b

Please sign in to comment.