Beispiel #1
0
        public void FinishSelection()
        {
            // We don't have an uncommitted layer, abort
            if (!ShowSelectionLayer)
            {
                return;
            }

            FinishPixelsHistoryItem hist = new FinishPixelsHistoryItem();

            hist.TakeSnapshot();

            Layer layer = SelectionLayer;

            using (Cairo.Context g = new Cairo.Context(CurrentLayer.Surface)) {
                g.Save();

                g.SetSourceSurface(layer.Surface, (int)layer.Offset.X, (int)layer.Offset.Y);
                g.PaintWithAlpha(layer.Opacity);

                g.Restore();
            }

            DestroySelectionLayer();
            Workspace.Invalidate();

            Workspace.History.PushNewItem(hist);
        }
Beispiel #2
0
        public void FinishSelection()
        {
            // We don't have an uncommitted layer, abort
            if (!ShowSelectionLayer)
            {
                return;
            }

            FinishPixelsHistoryItem hist = new FinishPixelsHistoryItem();

            hist.TakeSnapshot();

            Layer layer = SelectionLayer;

            using (Cairo.Context g = new Cairo.Context(CurrentUserLayer.Surface)) {
                layer.Draw(g);
            }

            DestroySelectionLayer();
            Workspace.Invalidate();

            Workspace.History.PushNewItem(hist);
        }
Beispiel #3
0
        public void FinishSelection()
        {
            // We don't have an uncommitted layer, abort
            if (!ShowSelectionLayer)
                return;

            FinishPixelsHistoryItem hist = new FinishPixelsHistoryItem ();
            hist.TakeSnapshot ();

            Layer layer = SelectionLayer;

            using (Cairo.Context g = new Cairo.Context (CurrentLayer.Surface)) {
                g.Save ();

                g.SetSourceSurface (layer.Surface, (int)layer.Offset.X, (int)layer.Offset.Y);
                g.PaintWithAlpha (layer.Opacity);

                g.Restore ();
            }

            DestroySelectionLayer ();
            Workspace.Invalidate ();

            Workspace.History.PushNewItem (hist);
        }
Beispiel #4
0
		public void FinishSelection ()
		{
			// We don't have an uncommitted layer, abort
			if (!ShowSelectionLayer)
				return;

			FinishPixelsHistoryItem hist = new FinishPixelsHistoryItem ();
			hist.TakeSnapshot ();

			Layer layer = SelectionLayer;

			using (Cairo.Context g = new Cairo.Context (CurrentUserLayer.Surface)) {
				layer.Draw(g);
			}

			DestroySelectionLayer ();
			Workspace.Invalidate ();

			Workspace.History.PushNewItem (hist);
		}