protected void AddToUndoBuffer(GraphActionType actionType, DrawingItem cutItem, DrawingItem newItem) { if (this.currentActionIndex != (this.GraphActions.Count - 1)) // Some undo occured before { // Delete all that has been undid this.GraphActions = this.GraphActions.Take(this.currentActionIndex + 1).ToList(); } this.GraphActions.Add(new GraphAction(actionType, cutItem, newItem)); this.currentActionIndex++; }
protected void DrawTmpItem(Graphics graph, Pen pen, DrawingItem item, bool useTransform, bool temporary) { // Calculate intersection with bounding rectangle Rectangle2D rect2D = new Rectangle2D(GraphRectangle); if (useTransform) { item.Draw(graph, pen, this.matrixValueToScreen, rect2D, this.IsLogScale); } else { item.Draw(graph, pen, GraphControl.matrixIdentity, rect2D, this.IsLogScale); } }
public GraphAction(GraphActionType actionType, DrawingItem targetItem, DrawingItem targetItem2) { this.ActionType = actionType; this.TargetItem = targetItem; this.TargetItem2 = targetItem2; }