void addDashLine(double x1, double y1, double x2, double y2) {
        double x21 = x2 - x1;
        double y21 = y2 - y1;

        double l21 = Math.sqrt(x21 * x21 + y21 * y21);

        if (l21 == 0.0) {
            return;
        }

        double px1, py1;
        px1 = py1 = 0.0;
        double w = w2 / l21;
        double mx = - y21 * w;
        double my =   x21 * w;

        dasher.init(new DashIterator.Line(l21));

        while(!dasher.eof()) {
            double t = dasher.getValue();
            scx = x1 + t * x21;
            scy = y1 + t * y21;

            if (dasher.isOpen()) {
                px1 = scx;
                py1 = scy;
                double lx1 = px1 + mx;
                double ly1 = py1 + my;
                double rx1 = px1 - mx;
                double ry1 = py1 - my;
                if (isMove) {
                    isMove = false;
                    smx = px1;
                    smy = py1;
                    rp.clean();
                    lp.moveTo(lx1, ly1);
                    rp.moveTo(rx1, ry1);
                } else {
                    addJoin(lp, x1, y1, lx1, ly1, true);
                    addJoin(rp, x1, y1, rx1, ry1, false);
                }
            } else
                if (dasher.isContinue()) {
                    double px2 = scx;
                    double py2 = scy;
                    lp.lineTo(px2 + mx, py2 + my);
                    rp.lineTo(px2 - mx, py2 - my);
                    if (dasher.close) {
                        addCap(lp, px2, py2, rp.xLast, rp.yLast);
                        lp.combine(rp);
                        if (isFirst) {
                            isFirst = false;
                            fmx = smx;
                            fmy = smy;
                            sp = lp;
                            lp = new BufferedPath();
                        } else {
                            addCap(lp, smx, smy, lp.xMove, lp.yMove);
                            lp.closePath();
                        }
                        isMove = true;
                    }
                }

            dasher.next();
        }
    }