diff options
author | Keith Packard <keithp@keithp.com> | 2011-07-17 15:45:07 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-07-17 15:45:07 -0700 |
commit | ddef3e4ec1b3ff86b164f83807c34c2a78f73eb8 (patch) | |
tree | edf7e74fa0b4b15755ab5b6dd1d10e7606bd1b88 /altosui/AltosSiteMapTile.java | |
parent | 1f3f3d575572eff33a2bc7a53d4691e59a428450 (diff) |
altosui: Mark preload site location with red circles (like launch)
Just to show where on the map the official launch location is.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosSiteMapTile.java')
-rw-r--r-- | altosui/AltosSiteMapTile.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/altosui/AltosSiteMapTile.java b/altosui/AltosSiteMapTile.java index 66da7c54..9e62bb47 100644 --- a/altosui/AltosSiteMapTile.java +++ b/altosui/AltosSiteMapTile.java @@ -43,6 +43,10 @@ public class AltosSiteMapTile extends JLayeredPane { public void clearMap() { fillLabel(mapLabel, Color.GRAY, px_size); + g2d = fillLabel(draw, new Color(127,127,127,0), px_size); + g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, + RenderingHints.VALUE_ANTIALIAS_ON); + g2d.setStroke(new BasicStroke(6, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)); } static Color stateColors[] = { @@ -85,6 +89,13 @@ public class AltosSiteMapTile extends JLayeredPane { repaint(); } + public void draw_circle(Point2D.Double pt) { + g2d.setColor(Color.RED); + g2d.drawOval((int)pt.x-5, (int)pt.y-5, 10, 10); + g2d.drawOval((int)pt.x-20, (int)pt.y-20, 40, 40); + g2d.drawOval((int)pt.x-35, (int)pt.y-35, 70, 70); + } + public static Graphics2D fillLabel(JLabel l, Color c, int px_size) { BufferedImage img = new BufferedImage(px_size, px_size, BufferedImage.TYPE_INT_ARGB); |