+ // current point (make sure it's drawn last)
+ if (selectedPoint > -1)
+ {
+ Altitude alt = _track.getPoint(selectedPoint).getAltitude();
+ if (alt.isValid())
+ {
+ x = (int) (_xScaleFactor * selectedPoint) + 1;
+ g.setColor(secondColour);
+ g.fillRect(BORDER_WIDTH + x, BORDER_WIDTH+1, barWidth, height-2*BORDER_WIDTH-2);
+ g.setColor(currentColour);
+ altitude = alt.getValue(chartFormat);
+ y = (int) (yScaleFactor * (altitude - minAltitude));
+ g.fillRect(BORDER_WIDTH + x, height-BORDER_WIDTH - y, barWidth, y);
+ }
+ }