protected internal override void OnMouseLeftButtonDown(object sender, MouseEventArgs e) { if (_manipulationScope != null) { return; // don't know if this ever happens, but it should just continue the current manipulation. } _previousDrawPosition = _documentControl.GetDocumentCoordsAt(e.MouseState.Position); _manipulationScope = _documentControl.Document.Manipulator.BeginManipulation(); _layerEditAccess = _manipulationScope.GetLayerEditAccess(_documentControl.ActiveLayerId); EraseGlyph(_previousDrawPosition); }
protected internal override void OnMouseLeftButtonUp(object sender, MouseEventArgs e) { if (_manipulationScope == null) { return; } if (_hasDrawn) { _manipulationScope.Commit(); } _manipulationScope = null; _layerEditAccess = null; }