TakeSnapshot() public method

public TakeSnapshot ( ) : void
return void
Example #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);
        }
Example #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);
        }
Example #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);
        }
Example #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);
		}