protected override void UpdateWithLocation(Rectangle rect, Keys modifiers, Point end) { shouldApplyCharacter = ApplyCharacter; //modifiers.HasFlag (Key.Shift | Application.Instance.CommonModifier) ^ ApplyCharacter; shouldApplyColour = ApplyColour; //modifiers.HasFlag (Key.Alt | Application.Instance.CommonModifier) ^ ApplyColour; var oldRect = currentRect; rect.Normalize(); lines.Clear(); if (!Filled) { var templines = new ScanLines(); currentRect = rect = templines.AddEllipse(rect); ScanLinesDrawDelegate draw = (drawrect) => { lines.AddRect(drawrect); }; templines.Outline(draw); } else { currentRect = rect = lines.AddEllipse(rect); } if (oldRect != null) { rect = Rectangle.Union(rect, oldRect.Value); } UpdatingCursor = true; Handler.CursorPosition = end; UpdatingCursor = false; Handler.InvalidateCharacterRegion(rect, false, false); }
protected override void UpdateWithLocation(Rectangle rect, Keys modifiers, Point end) { shouldApplyCharacter = ApplyCharacter; //modifiers.HasFlag (Key.Shift | Application.Instance.CommonModifier) ^ ApplyCharacter; //applyInverted = modifiers.HasFlag (Key.Shift | Application.Instance.CommonModifier) ^ Inverted; shouldApplyColour = ApplyColour; //modifiers.HasFlag (Key.Alt | Application.Instance.CommonModifier) ^ ApplyColour; var oldRect = CurrentRectangle; lines.Clear(); lines.AddLine(rect.Location, rect.EndLocation); if (oldRect != null) { rect = Rectangle.Union(rect, oldRect.Value); } UpdatingCursor = true; Handler.CursorPosition = end; UpdatingCursor = false; Handler.InvalidateCharacterRegion(rect, false, false); }