Package com.cburch.logisim.data

Examples of com.cburch.logisim.data.Direction.toRadians()


                    GraphicsUtil.H_CENTER, GraphicsUtil.V_BASELINE);
        }

        double rotate = 0.0;
        if (g instanceof Graphics2D) {
            rotate = Direction.SOUTH.toRadians() - facing.toRadians();
            if (rotate != 0.0) ((Graphics2D) g).rotate(rotate);
        }
        g.drawLine(0, -30, 0, -26);
        g.drawLine(-6, -30, 6, -30);
        if (color && outColor != null) g.setColor(outColor);
View Full Code Here


        int x = loc.getX();
        int y = loc.getY();
        g.translate(x, y);
        double rotate = 0.0;
        if (facing != null && facing != Direction.EAST && g instanceof Graphics2D) {
            rotate = -facing.toRadians();
            ((Graphics2D) g).rotate(rotate);
        }

        Object shape = painter.getGateShape();
        if (shape == AppPreferences.SHAPE_RECTANGULAR) {
View Full Code Here

        int y = loc.getY();
        Graphics g = painter.getGraphics();
        g.translate(x, y);
        double rotate = 0.0;
        if (facing != Direction.EAST && g instanceof Graphics2D) {
            rotate = -facing.toRadians();
            ((Graphics2D) g).rotate(rotate);
        }

        GraphicsUtil.switchToWidth(g, 2);
        int[] xp = new int[4];
View Full Code Here

            }

            int x = bds.getX() + bds.getWidth() / 2;
            int y = bds.getY() + bds.getHeight() / 2;
            Graphics g = painter.getGraphics().create();
            double angle = Math.PI / 2 - (up.toRadians() - defaultFacing.toRadians()) - facing.toRadians();
            if (g instanceof Graphics2D && Math.abs(angle) > 0.01) {
                Graphics2D g2 = (Graphics2D) g;
                g2.rotate(angle, x, y);
            }
            g.setFont(font);
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.