Пример #1
0
 protected override void StartTouch(PTouch args)
 {
     if (Contains(args))
     {
         SliderValueChanged?.Invoke(ValueFromPoint(args.Position));
     }
 }
Пример #2
0
 public void InitializeDrawing(PTouch touch)
 {
     _layerManager.SetDrawingAsTemporary();
     GetFromKernel();
     Shape.Initialize(touch);
     _layerManager.ClearTemporary();
     DrawStep();
 }
Пример #3
0
 public void FinalizeDrawing(PTouch touch)
 {
     _layerManager.ClearTemporary();
     _layerManager.SetDrawingAsFinal();
     Shape.FinalizeShape(touch);
     DrawStep();
     Clear();
 }
Пример #4
0
 protected override void MoveTouch(PTouch args)
 {
     _service.UpdateShape(args);
 }
Пример #5
0
 protected override void ExitTouch(PTouch args)
 {
     _service.CancelDrawing(args);
 }
Пример #6
0
 protected override void EndTouch(PTouch args)
 {
     _service.FinalizeDrawing(args);
 }
Пример #7
0
 protected abstract void StartTouch(PTouch args);
Пример #8
0
 protected abstract void MoveTouch(PTouch args);
Пример #9
0
 public virtual void Initialize(PTouch initPoint)
 {
     BaseShape.AddStartPoint(initPoint.Position);
     Touches.Add(initPoint);
 }
Пример #10
0
 protected abstract void EndTouch(PTouch args);
Пример #11
0
 public void CancelDrawing(PTouch touch)
 {
     _layerManager.ClearTemporary();
     Clear();
     OnChange?.Invoke();
 }
Пример #12
0
 public void UpdateShape(PTouch touch)
 {
     Shape.Update(touch);
     _layerManager.ClearTemporary();
     DrawStep();
 }
Пример #13
0
 public void Update(PTouch updatePoint)
 {
     BaseShape.AddUpdatePoint(updatePoint.Position);
     Touches.Add(updatePoint);
 }
Пример #14
0
 protected override void StartTouch(PTouch args)
 {
     _service.InitializeDrawing(args);
     System.Diagnostics.Debug.WriteLine("CALLED");
 }
Пример #15
0
 protected abstract void CancelTouch(PTouch args);
Пример #16
0
 protected override void MoveTouch(PTouch args)
 {
     throw new NotImplementedException();
 }
Пример #17
0
 protected abstract void ExitTouch(PTouch args);
Пример #18
0
        private bool Contains(PTouch args)
        {
            var vec = PVector.Sub(args.Position, AbsoluteCenter);

            return(vec.Mag < maxRadius && vec.Mag < minRadius && ContainsRadius(PositionRadius(args.Position)));
        }
Пример #19
0
 public virtual void FinalizeShape(PTouch finalPoint)
 {
     BaseShape.FinalPoint(finalPoint.Position);
 }