public void RestoreRegion(PdnRegion region) { if (region != null) { BitmapLayer activeLayer = (BitmapLayer)ActiveLayer; activeLayer.Surface.CopySurface(this.ScratchSurface, region); activeLayer.Invalidate(region); } }
public void RestoreSavedRegion() { if (this.saveRegion != null) { BitmapLayer activeLayer = (BitmapLayer)ActiveLayer; activeLayer.Surface.CopySurface(this.ScratchSurface, this.saveRegion); activeLayer.Invalidate(this.saveRegion); this.saveRegion.Dispose(); this.saveRegion = null; } }