Package megamek.client.ui.swing.util

Examples of megamek.client.ui.swing.util.StraightArrowPolygon


                    - (int) Math.round(Math.sin(an) * (int) (18 * scale));

            // Checking if given attack is mutual. In this case we building
            // halved arrow
            if (isMutualAttack()) {
                attackPoly = new StraightArrowPolygon(a, t, (int) (8 * scale), (int) (12 * scale),
                        true);
            } else {
                attackPoly = new StraightArrowPolygon(a, t, (int) (4 * scale), (int) (8 * scale),
                        false);
            }
        }
View Full Code Here


        /**
         * If we have build full arrow already with single attack and have got counter attack from
         * our target lately - lets change arrow to halved.
         */
        public void rebuildToHalvedPolygon() {
            attackPoly = new StraightArrowPolygon(a, t, (int) (8 * scale), (int) (12 * scale), true);
            // set bounds
            bounds = new Rectangle(attackPoly.getBounds());
            bounds.setSize(bounds.getSize().width + 1, bounds.getSize().height + 1);
            // move poly to upper right of image
            attackPoly.translate(-bounds.getLocation().x, -bounds.getLocation().y);
View Full Code Here

                    - (int) Math.round(Math.cos(an) * (int) (18 * scale));
            a.y = a.y + (int) (HEX_H / 2 * scale)
                    + (int) Math.round(Math.sin(an) * (int) (18 * scale));
            t.y = t.y + (int) (HEX_H / 2 * scale)
                    - (int) Math.round(Math.sin(an) * (int) (18 * scale));
            movePoly = new StraightArrowPolygon(a, t, (int) (4 * scale), (int) (8 * scale), false);
        }
View Full Code Here

TOP

Related Classes of megamek.client.ui.swing.util.StraightArrowPolygon

Copyright © 2018 www.massapicom. 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.