Ignore:
Timestamp:
2015-05-28T21:10:44+02:00 (9 years ago)
Author:
malcolmh
Message:

clip to map bounds

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/seachart/src/render/Renderer.java

    r31044 r31157  
    4343                sScale = symbolScale[zoom] * factor;
    4444                if (map != null) {
     45                        Point2D tl = context.getPoint(map.new Snode(map.bounds.maxlat, map.bounds.minlon));
     46                        Point2D br = context.getPoint(map.new Snode(map.bounds.minlat, map.bounds.maxlon));
     47                        g2.clip(new Rectangle2D.Double(tl.getX(), tl.getY(), (br.getX() - tl.getX()), (br.getY() - tl.getY())));
    4548                        g2.setBackground(Symbols.Bwater);
    4649                        g2.clearRect(rect.x, rect.y, rect.width, rect.height);
Note: See TracChangeset for help on using the changeset viewer.