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

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


            return;

        Vector2D v = direction.copy();
        v.setLength(length);

        v.rotate(angle*0.5);
        g.drawLine((int)anchor.getX(), (int)anchor.getY(), (int)(anchor.getX()+v.getX()), (int)(anchor.getY()+v.getY()));

        v.rotate(-angle);
        g.drawLine((int)anchor.getX(), (int)anchor.getY(), (int)(anchor.getX()+v.getX()), (int)(anchor.getY()+v.getY()));
    }
View Full Code Here


        v.setLength(length);

        v.rotate(angle*0.5);
        g.drawLine((int)anchor.getX(), (int)anchor.getY(), (int)(anchor.getX()+v.getX()), (int)(anchor.getY()+v.getY()));

        v.rotate(-angle);
        g.drawLine((int)anchor.getX(), (int)anchor.getY(), (int)(anchor.getX()+v.getX()), (int)(anchor.getY()+v.getY()));
    }

}
View Full Code Here

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

            corde.rotate(-40);
            cubic.ctrlx1 = getStartWithOffset().getX()+corde.getX();
            cubic.ctrly1 = getStartWithOffset().getY()+corde.getY();

            corde.rotate(+80);
            cubic.ctrlx2 = getStartWithOffset().getX()+corde.getX();
View Full Code Here

            corde.rotate(-40);
            cubic.ctrlx1 = getStartWithOffset().getX()+corde.getX();
            cubic.ctrly1 = getStartWithOffset().getY()+corde.getY();

            corde.rotate(+80);
            cubic.ctrlx2 = getStartWithOffset().getX()+corde.getX();
            cubic.ctrly2 = getStartWithOffset().getY()+corde.getY();

            // Move the start/end point according to offset
View Full Code Here

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

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

            if(flateness == 0)
                height.setLength(0.01);
            else
                height.setLength(flateness);
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.