1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
public class Line extends GeometricForm {
private transient float [][] pointsCache;
public Line(float xStart, float yStart, float xEnd, float yEnd) {
super(xStart, yStart, xEnd, yEnd);
}
/**
* Renvoie true si ce trait contient le point
* de coordonnées(x,y) avec une tolérance de margin cm
*/
public boolean containsPoint(float x, float y, float margin) {
// ici je vérifie si le trait correspond aux
// coordonnées en paramètre (x,y) avec une
// marge autour du trait
return true;
}
} |