BoxDiagrams.DiagramGestureAnalyzer.ShowEraseDuringDrag C# (CSharp) Метод

ShowEraseDuringDrag() приватный Метод

private ShowEraseDuringDrag ( DragState state, MSet adorners, IEnumerable eraseSet, List simplified, bool cancel ) : void
state DragState
adorners MSet
eraseSet IEnumerable
simplified List
cancel bool
Результат void
		private void ShowEraseDuringDrag(DragState state, MSet<LLShape> adorners, IEnumerable<Shape> eraseSet, List<PointT> simplified, bool cancel)
		{
			DiagramControl.EraseLineStyle.LineColor = Color.FromArgb(128, Control.BackColor);
			var eraseLine = new LLPolyline(DiagramControl.EraseLineStyle, simplified);
			adorners.Add(eraseLine);

			if (cancel)
			{
				eraseLine.Style = Control.LineStyle;
				Control.BeginRemoveAnimation(adorners);
				adorners.Clear();
				state.IsComplete = true;
			}
			else
			{
				// Show which shapes are erased by drawing them in the background color
				foreach (Shape s in eraseSet)
				{
					Shape s_ = s.Clone();
					s_.Style = (DiagramDrawStyle)s.Style.Clone();
					s_.Style.FillColor = s_.Style.LineColor = s_.Style.TextColor = Color.FromArgb(192, Control.BackColor);
					// avoid an outline artifact, in which color from the edges of the 
					// original shape bleeds through by a variable amount that depends 
					// on subpixel offsets.
					s_.Style.LineWidth++;
					s_.AddLLShapesTo(adorners);
				}
			}
		}
		private Shape DetectNewShapeDuringDrag(DragState state, MSet<LLShape> adorners, out bool potentialSelection)