X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosSiteMapTile.java;h=9e62bb47c751fdfa967ae358af80467cbd443409;hb=f6db11c3c87725c809c518f5f19b07325faf9c84;hp=66da7c54f01db2362941610adaf68a71ad91a91d;hpb=f7cd8317bf78ece334e1ceb0263b875ca43bbbd2;p=fw%2Faltos 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);