protected override void OnUpdateTransform(Matrix transform) { base.OnUpdateTransform(transform); Document doc = PintaCore.Workspace.ActiveDocument; doc.Selection.Dispose(); doc.Selection = original_selection.Transform(transform); doc.Selection.Visible = true; doc.SelectionLayer.Transform.InitMatrix(original_transform); doc.SelectionLayer.Transform.Multiply(transform); PintaCore.Workspace.Invalidate(); }
protected override void OnUpdateTransform(Matrix transform) { base.OnUpdateTransform(transform); List <List <IntPoint> > newSelectionPolygons = DocumentSelection.Transform(original_selection, transform); Document doc = PintaCore.Workspace.ActiveDocument; doc.Selection.SelectionClipper.Clear(); doc.Selection.SelectionPolygons = newSelectionPolygons; doc.Selection.MarkDirty(); doc.ShowSelection = true; PintaCore.Workspace.Invalidate(); }
protected override void OnUpdateTransform(Matrix transform) { base.OnUpdateTransform(transform); List <List <IntPoint> > newSelectionPolygons = DocumentSelection.Transform(original_selection, transform); Document doc = PintaCore.Workspace.ActiveDocument; doc.Selection.SelectionClipper.Clear(); doc.Selection.SelectionPolygons = newSelectionPolygons; using (var g = new Cairo.Context(doc.CurrentUserLayer.Surface)) { doc.Selection.SelectionPath = g.CreatePolygonPath(DocumentSelection.ConvertToPolygonSet(newSelectionPolygons)); g.FillRule = FillRule.EvenOdd; g.AppendPath(doc.Selection.SelectionPath); } doc.ShowSelection = true; PintaCore.Workspace.Invalidate(); }