Remove drawPoint, switch to PointSetOverlay.

This commit is contained in:
Holt59
2018-02-27 22:09:57 +01:00
parent 42f38bb758
commit 43835e4837
5 changed files with 237 additions and 68 deletions

View File

@@ -7,6 +7,7 @@ import org.insa.graph.Path;
import org.insa.graph.Point;
import org.insa.graphics.drawing.overlays.MarkerOverlay;
import org.insa.graphics.drawing.overlays.PathOverlay;
import org.insa.graphics.drawing.overlays.PointSetOverlay;
public interface Drawing {
@@ -29,13 +30,6 @@ public interface Drawing {
*/
public void clear();
/**
* Draw a marker at the given point with the default color.
*
* @param point
*/
public MarkerOverlay drawMarker(Point point);
/**
* Draw the given point with the given color.
*
@@ -44,14 +38,22 @@ public interface Drawing {
public MarkerOverlay drawMarker(Point point, Color color);
/**
* Draw a point width the given width and color. Do not use this to mark
* location, use drawMarker.
* Create a new PointSetOverlay that can be used to add overlay points to this
* drawing.
*
* PointSetOverlay are heavy memory resources, do not use one for each point!
*
* @param point
* @param width
* @param color
*/
public void drawPoint(Point point, int width, Color color);
public PointSetOverlay createPointSetOverlay();
/**
* Create a new PointSetOverlay with the original width and color that can be
* used to add overlay points to this drawing.
*
* PointSetOverlay are heavy memory resources, do not use one for each point!
*
*/
public PointSetOverlay createPointSetOverlay(int width, Color color);
/**
* Draw the given graph using the given palette.