// Path: src/main/java/com/orange/dgil/trail/core/common/TrailPoint.java
// @Getter
// @NoArgsConstructor
// public class TrailPoint {
//   private int x = -1;
//   private int y = -1;
// 
//   public TrailPoint(int x, int y) {
//     set(x, y);
//   }
// 
//   public void set(int x, int y) {
//     this.x = x;
//     this.y = y;
//   }
// 
//   public boolean isSameAs(TrailPoint point) {
//     return x == point.x && y == point.y;
//   }
// 
//   public double getDistanceTo(TrailPoint point) {
//     int dx = x - point.getX();
//     int dy = y - point.getY();
//     return Math.sqrt(dx * dx + dy * dy);
//   }
// 
//   public void deepCopy(TrailPoint point) {
//     x = point.x;
//     y = point.y;
//   }
// }
// 
// Path: src/main/java/com/orange/dgil/trail/core/vecto/vecto/VectoFilter.java
// @RequiredArgsConstructor
// public class VectoFilter implements LinearWindowFilterListener, VectoFilterListener {
// 
//   private final LinearWindowFilter linearWindowFilter = new LinearWindowFilter(this);
//   private final RawVectoFilter rawVectoFilter = new RawVectoFilter(this);
//   private final VectoFilterListener vectoFilterListener;
//   private final TrailPoint trailPoint = new TrailPoint();
// 
//   public void reset() {
//     linearWindowFilter.reset();
//     rawVectoFilter.reset();
//   }
// 
//   public void addPoint(int x, int y) {
//     trailPoint.set(x, y);
//     linearWindowFilter.addPoint(trailPoint);
//   }
// 
//   public void epilogue() {
//     rawVectoFilter.addPoint(linearWindowFilter.getLastPoint());
//     rawVectoFilter.epilogue();
//   }
// 
//   @Override
//   public void onNewFilteredPointAvailable(int x, int y) {
//     trailPoint.set(x, y);
//     rawVectoFilter.addPoint(trailPoint);
//   }
// 
//   @Override
//   public void onNewVectoPointAvailable(int x, int y) {
//     vectoFilterListener.onNewVectoPointAvailable(x, y);
//   }
// 
//   @Override
//   public void onLastVectoPointAvailable(int x, int y) {
//     vectoFilterListener.onLastVectoPointAvailable(x, y);
//   }
// 
//   public VectoSettings getVectoSettings() {
//     return rawVectoFilter.getVectoSettings();
//   }
// }
// 
// Path: src/main/java/com/orange/dgil/trail/core/vecto/vecto/VectoFilterListener.java
// public interface VectoFilterListener {
//   void onNewVectoPointAvailable(int x, int y);
//   void onLastVectoPointAvailable(int x, int y);
// }


import com.orange.dgil.trail.core.common.TrailPoint;
import com.orange.dgil.trail.core.vecto.vecto.VectoFilter;
import com.orange.dgil.trail.core.vecto.vecto.VectoFilterListener;
import com.orange.dgil.trail.core.vecto.vecto.VectoSettings;
import lombok.Getter;
/**
 * Trail drawing library
 * Copyright (C) 2014 Orange
 * Authors: christophe.maldivi@orange.com, eric.petit@orange.com
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
package com.orange.dgil.trail.core.quad;



public class QuadCurve implements VectoFilterListener {

  @Getter
  private final TrailPoint lastVectoPoint = new TrailPoint();
  private final boolean vectoEnabled;

  private QuadInterpolator quadInterpolator;
// Path: src/main/java/com/orange/dgil/trail/core/common/TrailPoint.java
// @Getter
// @NoArgsConstructor
// public class TrailPoint {
//   private int x = -1;
//   private int y = -1;
// 
//   public TrailPoint(int x, int y) {
//     set(x, y);
//   }
// 
//   public void set(int x, int y) {
//     this.x = x;
//     this.y = y;
//   }
// 
//   public boolean isSameAs(TrailPoint point) {
//     return x == point.x && y == point.y;
//   }
// 
//   public double getDistanceTo(TrailPoint point) {
//     int dx = x - point.getX();
//     int dy = y - point.getY();
//     return Math.sqrt(dx * dx + dy * dy);
//   }
// 
//   public void deepCopy(TrailPoint point) {
//     x = point.x;
//     y = point.y;
//   }
// }
// 
// Path: src/main/java/com/orange/dgil/trail/core/vecto/vecto/VectoFilter.java
// @RequiredArgsConstructor
// public class VectoFilter implements LinearWindowFilterListener, VectoFilterListener {
// 
//   private final LinearWindowFilter linearWindowFilter = new LinearWindowFilter(this);
//   private final RawVectoFilter rawVectoFilter = new RawVectoFilter(this);
//   private final VectoFilterListener vectoFilterListener;
//   private final TrailPoint trailPoint = new TrailPoint();
// 
//   public void reset() {
//     linearWindowFilter.reset();
//     rawVectoFilter.reset();
//   }
// 
//   public void addPoint(int x, int y) {
//     trailPoint.set(x, y);
//     linearWindowFilter.addPoint(trailPoint);
//   }
// 
//   public void epilogue() {
//     rawVectoFilter.addPoint(linearWindowFilter.getLastPoint());
//     rawVectoFilter.epilogue();
//   }
// 
//   @Override
//   public void onNewFilteredPointAvailable(int x, int y) {
//     trailPoint.set(x, y);
//     rawVectoFilter.addPoint(trailPoint);
//   }
// 
//   @Override
//   public void onNewVectoPointAvailable(int x, int y) {
//     vectoFilterListener.onNewVectoPointAvailable(x, y);
//   }
// 
//   @Override
//   public void onLastVectoPointAvailable(int x, int y) {
//     vectoFilterListener.onLastVectoPointAvailable(x, y);
//   }
// 
//   public VectoSettings getVectoSettings() {
//     return rawVectoFilter.getVectoSettings();
//   }
// }
// 
// Path: src/main/java/com/orange/dgil/trail/core/vecto/vecto/VectoFilterListener.java
// public interface VectoFilterListener {
//   void onNewVectoPointAvailable(int x, int y);
//   void onLastVectoPointAvailable(int x, int y);
// }


// Path: src/main/java/com/orange/dgil/trail/core/quad/QuadCurve.java
import com.orange.dgil.trail.core.common.TrailPoint;
import com.orange.dgil.trail.core.vecto.vecto.VectoFilter;
import com.orange.dgil.trail.core.vecto.vecto.VectoFilterListener;
import com.orange.dgil.trail.core.vecto.vecto.VectoSettings;
import lombok.Getter;

/**
 * Trail drawing library
 * Copyright (C) 2014 Orange
 * Authors: christophe.maldivi@orange.com, eric.petit@orange.com
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
package com.orange.dgil.trail.core.quad;



public class QuadCurve implements VectoFilterListener {

  @Getter
  private final TrailPoint lastVectoPoint = new TrailPoint();
  private final boolean vectoEnabled;

  private QuadInterpolator quadInterpolator;
  private VectoFilter vectoFilter = new VectoFilter(this);