/// <summary>Gets a snapshot that captures the given diagram view.</summary> public static DiagramSnapshot Capture(DiagramViewer view, DiagramSnapshotScope scope) { var snapshot = new DiagramSnapshot(view.Shell.ViewName, scope); if (snapshot.Matches(DiagramSnapshotScope.Viewport)) { snapshot._captureViewport(view); } if (snapshot.Matches(DiagramSnapshotScope.Settings)) { snapshot._captureSettings(view); } if (snapshot.Matches(DiagramSnapshotScope.Filter)) { snapshot._captureFilter(view.Shell); } return snapshot; }
/// <summary>Loads a snapshot from the specified path.</summary> public static DiagramSnapshot Load(string path) { var snapshot = new DiagramSnapshot(path, DiagramSnapshotScope.None); snapshot._load(path); return snapshot; }