private void drawCustomCursor(final Graphics2D graphics,final RouteDescription routeDescription,final int xOffset,final int yOffset,final double scale){
  final BufferedImage cursorImage=(BufferedImage)routeDescription.getCursorImage();
  if (cursorImage != null) {
    for (    Point[] endPoint : routeOptimizer.getAllPoints(routeOptimizer.getLastEndPoint())) {
      graphics.drawImage(cursorImage,(int)(((endPoint[0].x - xOffset) - (cursorImage.getWidth() / 2)) * scale),(int)(((endPoint[0].y - yOffset) - (cursorImage.getHeight() / 2)) * scale),null);
    }
  }
}

private void drawCustomCursor ( final Graphics2D graphics , final RouteDescription routeDescription , final int xOffset , final int yOffset , final double scale ) { final BufferedImage cursorImage = ( BufferedImage ) routeDescription . getCursorImage ( ) ; if ( cursorImage != null ) { for ( Point [ ] endPoint : routeOptimizer . getAllPoints ( routeOptimizer . getLastEndPoint ( ) ) ) { graphics . drawImage ( cursorImage , ( int ) ( ( ( endPoint [ 0 ] . x - xOffset ) - ( cursorImage . getWidth ( ) / 2 ) ) * scale ) , ( int ) ( ( ( endPoint [ 0 ] . y - yOffset ) - ( cursorImage . getHeight ( ) / 2 ) ) * scale ) , null ) ; } } }
draws a specified cursorimage if available
