Ignore:
Timestamp:
2012-04-29T22:23:26+02:00 (13 years ago)
Author:
bastiK
Message:

applied #7624 - Allow MapCSS to style right and left side casings differently (patch by cmuelle8)

File:
1 edited

Legend:

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

    r5054 r5206  
    127127     * @param onewayReversed for oneway=-1 and similar
    128128     */
    129     public void drawWay(Way way, Color color, BasicStroke line, BasicStroke dashes, Color dashedColor, int offset,
     129    public void drawWay(Way way, Color color, BasicStroke line, BasicStroke dashes, Color dashedColor, float offset,
    130130            boolean showOrientation, boolean showHeadArrowOnly,
    131131            boolean showOneway, boolean onewayReversed) {
     
    259259
    260260        private List<Node> nodes;
    261         private int offset;
     261        private float offset;
    262262        private int idx;
    263263
     
    269269        private int x_prev0, y_prev0;
    270270
    271         public OffsetIterator(List<Node> nodes, int offset) {
     271        public OffsetIterator(List<Node> nodes, float offset) {
    272272            this.nodes = nodes;
    273273            this.offset = offset;
     
    282282        @Override
    283283        public Point next() {
    284             if (offset == 0) return nc.getPoint(nodes.get(idx++));
     284            if (Math.abs(offset) < 0.1f) return nc.getPoint(nodes.get(idx++));
    285285
    286286            Point current = nc.getPoint(nodes.get(idx));
     
    861861            if ((pb.width >= nb.getWidth() && pb.height >= nb.getHeight()) && // quick check
    862862                    area.contains(centeredNBounds) // slow but nice
    863                     ) {
     863            ) {
    864864                g.setColor(text.color);
    865865                Font defaultFont = g.getFont();
Note: See TracChangeset for help on using the changeset viewer.