Changeset 10670 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss
- Timestamp:
- 2016-07-29T00:02:17+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
r10657 r10670 884 884 } 885 885 final Way way = (Way) env.osm; 886 return way.isClosed() && Geometry.isClockwise(way)887 || !way.isClosed() && way.getNodesCount() > 2 && Geometry.angleIsClockwise(way.getNode(0), way.getNode(1), way.lastNode());886 return (way.isClosed() && Geometry.isClockwise(way)) 887 || (!way.isClosed() && way.getNodesCount() > 2 && Geometry.angleIsClockwise(way.getNode(0), way.getNode(1), way.lastNode())); 888 888 } 889 889 … … 900 900 } 901 901 final Way way = (Way) env.osm; 902 return way.isClosed() && !Geometry.isClockwise(way)903 || !way.isClosed() && way.getNodesCount() > 2 && !Geometry.angleIsClockwise(way.getNode(0), way.getNode(1), way.lastNode());902 return (way.isClosed() && !Geometry.isClockwise(way)) 903 || (!way.isClosed() && way.getNodesCount() > 2 && !Geometry.angleIsClockwise(way.getNode(0), way.getNode(1), way.lastNode())); 904 904 } 905 905 -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
r10659 r10670 277 277 public void visit(Node n) { 278 278 if (e.child == null && left.matches(new Environment(n).withParent(e.osm))) { 279 if ( e.osm instanceof Way && Geometry.nodeInsidePolygon(n, ((Way) e.osm).getNodes())280 || e.osm instanceof Relation && (281 (Relation) e.osm).isMultipolygon() && Geometry.isNodeInsideMultiPolygon(n, (Relation) e.osm, null)) {279 if ((e.osm instanceof Way && Geometry.nodeInsidePolygon(n, ((Way) e.osm).getNodes())) 280 || (e.osm instanceof Relation && ( 281 (Relation) e.osm).isMultipolygon() && Geometry.isNodeInsideMultiPolygon(n, (Relation) e.osm, null))) { 282 282 e.child = n; 283 283 } … … 288 288 public void visit(Way w) { 289 289 if (e.child == null && left.matches(new Environment(w).withParent(e.osm))) { 290 if ( e.osm instanceof Way && Geometry.PolygonIntersection.FIRST_INSIDE_SECOND.equals(291 Geometry.polygonIntersection(w.getNodes(), ((Way) e.osm).getNodes())) 292 || e.osm instanceof Relation && (290 if ((e.osm instanceof Way && Geometry.PolygonIntersection.FIRST_INSIDE_SECOND.equals( 291 Geometry.polygonIntersection(w.getNodes(), ((Way) e.osm).getNodes()))) 292 || (e.osm instanceof Relation && ( 293 293 (Relation) e.osm).isMultipolygon() 294 && Geometry.isPolygonInsideMultiPolygon(w.getNodes(), (Relation) e.osm, null)) {294 && Geometry.isPolygonInsideMultiPolygon(w.getNodes(), (Relation) e.osm, null))) { 295 295 e.child = w; 296 296 }
Note:
See TracChangeset
for help on using the changeset viewer.