code: private void renderPath(Graphic g)
      {
          final int tw = map.getTileWidth();
          final int th = map.getTileHeight();
          for (int i = 0; i < path.getLength(); i++)
          {
              final int x = (int) viewer.getViewpointX(path.getX(i) * (double) tw);
              final int y = (int) viewer.getViewpointY(path.getY(i) * (double) th);
              g.drawRect(x, y - th, tw, th, true);
              if (renderDebug)
              {
                  final Tile tile = map.getTile(path.getX(i), path.getY(i));
                  if (tile != null)
                  {
                      final TilePath tilePath = tile.getFeature(TilePath.class);
                      text.draw(g, x + 2, y - th + 2, String.valueOf(getCost(tilePath.getCategory())));
                  }
              }
          }
      }
docs: Render the current path.
  
  @param g The graphic output.