Changeset 23752 in osm for applications/editors/josm


Ignore:
Timestamp:
2010-10-22T20:35:03+02:00 (14 years ago)
Author:
oliverw
Message:

Draw line labels with shadow for better contrast.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/ElevationProfilePanel.java

    r23751 r23752  
    272272                        if (yLine <= getPlotBottom() && yLine >= getPlotTop()) {
    273273                                String txt = String.format("%dm", i);
    274 
    275                                 g.setColor(Color.BLACK);
     274                               
    276275                                Rectangle r = drawAlignedString(txt, getPlotHCenter(), yLine - 2,
    277276                                                TextAlignment.Right, g);
     
    283282                                g.drawLine(r.x + r.width, yLine, getPlotRight(),
    284283                                                yLine);                         
    285                                 // Draw label
     284                                // Draw label with shadow
     285                                g.setColor(Color.WHITE);
     286                                drawAlignedString(txt, getPlotHCenter() + 1, yLine - 1,
     287                                                TextAlignment.Right, g);
     288                                g.setColor(Color.BLACK);
    286289                                drawAlignedString(txt, getPlotHCenter(), yLine - 2,
    287290                                                TextAlignment.Right, g);
Note: See TracChangeset for help on using the changeset viewer.