Package org.antlr.xjlib.appkit.gview.base

Examples of org.antlr.xjlib.appkit.gview.base.Vector2D.stretch()


        path.add(p2);
        path.add(end_);
        path.add(end);

        Vector2D labelv = start_.sub(p2);
        labelv.stretch(0.5);
        link.label.setPosition(p2.add(labelv).shift(0, LABEL_OFFSET));
    }
}
View Full Code Here


        if(selfLoop) {
            if(cubic == null)
                cubic = new CubicCurve2D.Double();

            Vector2D corde = direction.copy();
            corde.stretch(1.7);
            if(corde.length()<100)
                corde.setLength(100);

            corde.rotate(-40);
            cubic.ctrlx1 = getStartWithOffset().getX()+corde.getX();
View Full Code Here

            v1 = v1.normalize();
            v1.stretch(startTangentOffset);

            v2 = v2.normalize();
            v2.stretch(endTangentOffset);

            cubic.x1 = getStartWithOffset().getX()+v1.getX();
            cubic.y1 = getStartWithOffset().getY()+v1.getY();
            cubic.x2 = getEndWithOffset().getX()+v2.getX();
            cubic.y2 = getEndWithOffset().getY()+v2.getY();
View Full Code Here

            arrow.setDirection(new Vector2D(cubic.ctrlx2-cubic.x2, cubic.ctrly2-cubic.y2));

            shape = cubic;
        } else {
            Vector2D middle = getEndWithOffset().sub(getStartWithOffset());
            middle.stretch(0.5);

            Vector2D height = middle.normalize();
            height.rotate(-90);

            if(flateness == 0)
View Full Code Here

            v1 = v1.normalize();
            v1.stretch(startTangentOffset);

            v2 = v2.normalize();
            v2.stretch(endTangentOffset);

            quad.x1 = getStartWithOffset().getX()+v1.getX();
            quad.y1 = getStartWithOffset().getY()+v1.getY();
            quad.x2 = getEndWithOffset().getX()+v2.getX();
            quad.y2 = getEndWithOffset().getY()+v2.getY();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.