public void UpdateDrag(Point firstPoint, Point currentPoint, Size delta, DocumentFrame frame, DocumentFrameMemento memento) { frame.RestoreFromMemento(memento); frame.OffsetInDocument += delta; }
public void UpdateDrag(Point firstPoint, Point currentPoint, Size delta, DocumentFrame frame, DocumentFrameMemento memento) { RectangularDocumentFrame rectangularFrame = (RectangularDocumentFrame)frame; frame.RestoreFromMemento(memento); Rectangle clipBounds = rectangularFrame.ClipBounds; if (_isEast) clipBounds.Width += delta.Width; if (_isSouth) { clipBounds.Y += delta.Height; clipBounds.Height -= delta.Height; } if (_isWest) { clipBounds.X += delta.Width; clipBounds.Width -= delta.Width; } if (_isNorth) clipBounds.Height += delta.Height; clipBounds.Intersect(rectangularFrame.ObjectBounds); rectangularFrame.ClipBounds = clipBounds; }