building blocks for drawing the race line around the course

#story[1087]
main
hba56 8 years ago
parent 4195d41814
commit 62752c142a

@ -323,6 +323,13 @@ public abstract class Race implements Runnable {
return lastFps; return lastFps;
} }
/**
* Returns the legs of this race
* @return list of legs
*/
public List<Leg> getLegs() {
return legs;
}
/** /**
* Increments the FPS counter, and adds timePeriod milliseconds to our FPS reset timer. * Increments the FPS counter, and adds timePeriod milliseconds to our FPS reset timer.

@ -1,6 +1,7 @@
package visualiser.model; package visualiser.model;
import javafx.collections.ObservableList;
import javafx.scene.Node; import javafx.scene.Node;
import javafx.scene.image.Image; import javafx.scene.image.Image;
import javafx.scene.paint.Color; import javafx.scene.paint.Color;
@ -9,6 +10,7 @@ import javafx.scene.transform.Rotate;
import network.Messages.Enums.BoatStatusEnum; import network.Messages.Enums.BoatStatusEnum;
import shared.dataInput.RaceDataSource; import shared.dataInput.RaceDataSource;
import shared.model.GPSCoordinate; import shared.model.GPSCoordinate;
import shared.model.Leg;
import shared.model.Mark; import shared.model.Mark;
import shared.model.RaceClock; import shared.model.RaceClock;
@ -516,6 +518,17 @@ public class ResizableRaceCanvas extends ResizableCanvas {
} }
/**
* draws a transparent line around the course that shows the paths boats must travel
*/
public void drawRaceLine(){
List<Leg> legs = this.visualiserRace.getLegs();
for (Leg leg: legs) {
//todo calculate and draw line around this leg
}
}
/** /**
* Draws the race boundary image onto the canvas. * Draws the race boundary image onto the canvas.

Loading…
Cancel
Save