for( Edge edge : path ){
Object obj = edge.getObject();
Node start = edge.getNodeA();
Node end = edge.getNodeB();
Point startPoint = (Point) start.getObject();
Point endPoint = (Point) end.getObject();
java.awt.Point startPixel = context.worldToPixel( startPoint.getCoordinate() );
java.awt.Point endPixel = context.worldToPixel( endPoint.getCoordinate() );
graphics.drawLine(startPixel.x, startPixel.y, endPixel.x, endPixel.y);
}
graphics.setColor( Color.YELLOW );
graphics.setLineWidth(2);
for( Edge edge : path ){
Object obj = edge.getObject();
Node start = edge.getNodeA();
Node end = edge.getNodeB();
Point startPoint = (Point) start.getObject();
Point endPoint = (Point) end.getObject();
java.awt.Point startPixel = context.worldToPixel( startPoint.getCoordinate() );
java.awt.Point endPixel = context.worldToPixel( endPoint.getCoordinate() );
graphics.drawLine(startPixel.x, startPixel.y, endPixel.x, endPixel.y);
}
for( Node node : waypoints ){
Point point = (Point) node.getObject();
java.awt.Point pixel = context.worldToPixel( point.getCoordinate() );
graphics.setColor( Color.YELLOW );
graphics.fillOval(pixel.x-3, pixel.y-3, 7, 7 );
graphics.setColor( Color.BLACK );