Changeset 23755 in osm for applications/editors
- Timestamp:
- 2010-10-22T21:38:47+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/DefaultElevationProfileRenderer.java
r23753 r23755 41 41 IElevationProfileRenderer { 42 42 43 private static final int ROUND_RECT_RADIUS = 8; 43 44 /** 44 45 * … … 384 385 Graphics2D g2d = (Graphics2D) g; 385 386 386 int width = g.getFontMetrics(g.getFont()).stringWidth(s) + 5;387 int height = g.getFont().getSize() + g.getFontMetrics().getLeading() ;387 int width = g.getFontMetrics(g.getFont()).stringWidth(s) + 10; 388 int height = g.getFont().getSize() + g.getFontMetrics().getLeading() + 5; 388 389 389 390 g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, 390 391 RenderingHints.VALUE_ANTIALIAS_ON); 392 391 393 GradientPaint gradient = new GradientPaint(x, y, Color.WHITE, x, y 392 + height, Color. GRAY, false);393 g2d.setPaint(gradient); 394 395 Rectangle r = new Rectangle(x - (width / 2) - 2, y - (height / 2) -1, width, height);394 + height, Color.BLACK, false); 395 g2d.setPaint(gradient); 396 397 Rectangle r = new Rectangle(x - (width / 2) - 5, y - (height / 2) + 1, width, height); 396 398 g2d.fillRect(r.x, r.y, r.width, r.height); 397 399 398 400 g2d.setColor(Color.BLACK); 399 g2d.drawRoundRect(r.x, r.y, r.width, r.height, 2, 2); 401 402 g2d.drawRoundRect(r.x, r.y, r.width, r.height, ROUND_RECT_RADIUS, ROUND_RECT_RADIUS); 400 403 g2d.drawString(s, x - width / 2, y + (height / 2) - 2); 401 404 }
Note:
See TracChangeset
for help on using the changeset viewer.