Ignore:
Timestamp:
2009-07-03T23:15:39+02:00 (17 years ago)
Author:
stoecker
Message:

some cleanups

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

Legend:

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

    r1722 r1725  
    650650        }
    651651
    652         Point pFrom = nc.getPoint(fromNode.getEastNorth());
    653         Point pVia = nc.getPoint(viaNode.getEastNorth());
     652        Point pFrom = nc.getPoint(fromNode);
     653        Point pVia = nc.getPoint(viaNode);
    654654
    655655        //if(restrictionDebug) {
     
    663663        //        toNode = toWay.nodes.get(toWay.nodes.size()-2);
    664664        //    }
    665         //    Point pTo = nc.getPoint(toNode.eastNorth);
     665        //    Point pTo = nc.getPoint(toNode);
    666666
    667667        //    /* debug output of interesting nodes */
     
    887887                        for (Node n : w.nodes)
    888888                        {
    889                             p = nc.getPoint(n.getEastNorth());
     889                            p = nc.getPoint(n);
    890890                            poly.addPoint(p.x,p.y);
    891891                        }
     
    941941                    for (Node n : wInner.nodes)
    942942                    {
    943                         Point pInner = nc.getPoint(n.getEastNorth());
     943                        Point pInner = nc.getPoint(n);
    944944                        polygon.addPoint(pInner.x,pInner.y);
    945945                    }
    946946                    if(!wInner.isClosed())
    947947                    {
    948                         Point pInner = nc.getPoint(wInner.nodes.get(0).getEastNorth());
     948                        Point pInner = nc.getPoint(wInner.nodes.get(0));
    949949                        polygon.addPoint(pInner.x,pInner.y);
    950950                    }
     
    10651065        for (Node n : w.nodes)
    10661066        {
    1067             Point p = nc.getPoint(n.getEastNorth());
     1067            Point p = nc.getPoint(n);
    10681068            polygon.addPoint(p.x,p.y);
    10691069        }
     
    10881088
    10891089    protected void drawNode(Node n, ImageIcon icon, boolean annotate, Boolean selected) {
    1090         Point p = nc.getPoint(n.getEastNorth());
     1090        Point p = nc.getPoint(n);
    10911091        if ((p.x < 0) || (p.y < 0) || (p.x > nc.getWidth()) || (p.y > nc.getHeight())) return;
    10921092
     
    11301130            displaySegments(col, width, dashed, dashedColor);
    11311131        }
    1132         Point p1 = nc.getPoint(n1.getEastNorth());
    1133         Point p2 = nc.getPoint(n2.getEastNorth());
     1132        Point p1 = nc.getPoint(n1);
     1133        Point p2 = nc.getPoint(n2);
    11341134
    11351135        if (!isSegmentVisible(p1, p2)) {
     
    12091209    public void drawNode(Node n, Color color, int size, int radius, boolean fill) {
    12101210        if (isZoomOk(null) && size > 1) {
    1211             Point p = nc.getPoint(n.getEastNorth());
     1211            Point p = nc.getPoint(n);
    12121212            if ((p.x < 0) || (p.y < 0) || (p.x > nc.getWidth())
    12131213                    || (p.y > nc.getHeight()))
     
    14561456     */
    14571457    protected void drawOrderNumber(Node n1, Node n2, int orderNumber) {
    1458         Point p1 = nc.getPoint(n1.getEastNorth());
    1459         Point p2 = nc.getPoint(n2.getEastNorth());
     1458        Point p1 = nc.getPoint(n1);
     1459        Point p2 = nc.getPoint(n2);
    14601460        drawOrderNumber(p1, p2, orderNumber);
    14611461    }
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/SimplePaintVisitor.java

    r1640 r1725  
    271271        Iterator<Node> it = w.nodes.iterator();
    272272        if (it.hasNext()) {
    273             Point lastP = nc.getPoint(it.next().getEastNorth());
     273            Point lastP = nc.getPoint(it.next());
    274274            while(it.hasNext())
    275275            {
    276                 Point p = nc.getPoint(it.next().getEastNorth());
     276                Point p = nc.getPoint(it.next());
    277277                if(isSegmentVisible(lastP, p) && isLargeSegment(lastP, p, virtualNodeSpace))
    278278                {
     
    321321        Iterator<Node> it = w.nodes.iterator();
    322322        if (it.hasNext()) {
    323             Point lastP = nc.getPoint(it.next().getEastNorth());
     323            Point lastP = nc.getPoint(it.next());
    324324            for (int orderNumber = 1; it.hasNext(); orderNumber++) {
    325                 Point p = nc.getPoint(it.next().getEastNorth());
     325                Point p = nc.getPoint(it.next());
    326326                drawSegment(lastP, p, wayColor,
    327327                    showOnlyHeadArrowOnly ? !it.hasNext() : showThisDirectionArrow);
     
    352352
    353353            if (m.member instanceof Node) {
    354                 Point p = nc.getPoint(((Node) m.member).getEastNorth());
     354                Point p = nc.getPoint((Node) m.member);
    355355                if (p.x < 0 || p.y < 0
    356356                    || p.x > nc.getWidth() || p.y > nc.getHeight()) continue;
     
    363363                for (Node n : ((Way) m.member).nodes) {
    364364                    if (n.incomplete || n.deleted) continue;
    365                     Point p = nc.getPoint(n.getEastNorth());
     365                    Point p = nc.getPoint(n);
    366366                    if (first) {
    367367                        path.moveTo(p.x, p.y);
     
    410410    public void drawNode(Node n, Color color, int size, int radius, boolean fill) {
    411411        if (size > 1) {
    412             Point p = nc.getPoint(n.getEastNorth());
     412            Point p = nc.getPoint(n);
    413413            if ((p.x < 0) || (p.y < 0) || (p.x > nc.getWidth())
    414414                    || (p.y > nc.getHeight()))
Note: See TracChangeset for help on using the changeset viewer.