Ignore:
Timestamp:
2013-02-11T18:19:49+01:00 (11 years ago)
Author:
bastiK
Message:

mapcss: rework of eval expressions; significant performance improvement; fixes a bug w.r.t. overloading of the 'length' function.

File:
1 edited

Legend:

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

    r5590 r5705  
    308308    private Color highlightColorTransparent;
    309309   
    310     private static int FLAG_NORMAL = 0;
    311     private static int FLAG_DISABLED = 1;
    312     private static int FLAG_MEMBER_OF_SELECTED = 2;
    313     private static int FLAG_SELECTED = 4;
     310    private static final int FLAG_NORMAL = 0;
     311    private static final int FLAG_DISABLED = 1;
     312    private static final int FLAG_MEMBER_OF_SELECTED = 2;
     313    private static final int FLAG_SELECTED = 4;
    314314
    315315    private static final double PHI = Math.toRadians(20);
     
    366366    }
    367367
    368     private void collectRelationStyles(DataSet data, StyleCollector sc, BBox bbox) {
    369         for (Relation r: data.searchRelations(bbox)) {
    370             if (r.isDrawable()) {
    371                 if (r.isDisabled()) {
    372                     sc.add(r, FLAG_DISABLED);
    373                 } else if (data.isSelected(r)) {
    374                     sc.add(r, FLAG_SELECTED);
    375                 } else {
    376                     sc.add(r, FLAG_NORMAL);
    377                 }
    378             }
    379         }
    380     }
    381 
    382368    private void collectWayStyles(DataSet data, StyleCollector sc, BBox bbox) {
    383369        for (final Way w : data.searchWays(bbox)) {
     
    391377                } else {
    392378                    sc.add(w, FLAG_NORMAL);
     379                }
     380            }
     381        }
     382    }
     383
     384    private void collectRelationStyles(DataSet data, StyleCollector sc, BBox bbox) {
     385        for (Relation r: data.searchRelations(bbox)) {
     386            if (r.isDrawable()) {
     387                if (r.isDisabled()) {
     388                    sc.add(r, FLAG_DISABLED);
     389                } else if (data.isSelected(r)) {
     390                    sc.add(r, FLAG_SELECTED);
     391                } else {
     392                    sc.add(r, FLAG_NORMAL);
    393393                }
    394394            }
Note: See TracChangeset for help on using the changeset viewer.