Changeset 7040 in josm for trunk/src


Ignore:
Timestamp:
2014-05-02T00:04:06+02:00 (11 years ago)
Author:
Don-vip
Message:

tests/build update:

  • update Jacoco to version 0.7.0
  • compile performance tests even if not run by ant task
  • do not create empty package-info.class files in javac task
  • move RemoteControl test to unit tests to get coverage information
  • fix NPEs seen in tests in headless mode
  • proper test failures when properties files can not be loaded


Location:
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/LineClip.java

    r6920 r7040  
    1818    private final Rectangle clipBounds;
    1919
     20    /**
     21     * Constructs a new {@code LineClip}.
     22     * @param p1 start point of the clipped line
     23     * @param p2 end point of the clipped line
     24     * @param clipBounds Clip bounds
     25     */
    2026    public LineClip(Point p1, Point p2, Rectangle clipBounds) {
    2127        this.p1 = p1;
     
    2935     */
    3036    public boolean execute() {
     37        if (clipBounds == null) {
     38            return false;
     39        }
    3140        return cohenSutherland(p1.x, p1.y, p2.x, p2.y, clipBounds.x , clipBounds.y, clipBounds.x + clipBounds.width, clipBounds.y + clipBounds.height);
    3241    }
     
    3544     * @return start point of the clipped line
    3645     */
    37     public Point getP1()
    38     {
     46    public Point getP1() {
    3947        return p1;
    4048    }
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java

    r7023 r7040  
    11751175        GeneralPath onewayArrowsCasing = showOneway ? new GeneralPath() : null;
    11761176        Rectangle bounds = g.getClipBounds();
    1177         bounds.grow(100, 100);                  // avoid arrow heads at the border
     1177        if (bounds != null) {
     1178            // avoid arrow heads at the border
     1179            bounds.grow(100, 100);
     1180        }
    11781181
    11791182        double wayLength = 0;
Note: See TracChangeset for help on using the changeset viewer.