Examples of drawPolyline()


Examples of java.awt.Graphics.drawPolyline()

        } else {
            int x = isInverter ? 0 : 2;
            g.setColor(Color.BLACK);
            int[] xp = new int[] { x + 15, x + 1, x + 1, x + 15 };
            int[] yp = new int[] { 10,     3,     17,    10 };
            g.drawPolyline(xp, yp, 4);
            if (isInverter) {
                g.drawOval(x + 13, 8, 4, 4);
            }

            g.setColor(Value.FALSE_COLOR);
View Full Code Here

Examples of java.awt.Graphics.drawPolyline()

        } else {
            GraphicsUtil.switchToWidth(g, 2);
            int d = isInverter ? 10 : 0;
            int[] xp = new int[] { -d, -19 - d, -19 - d, -d };
            int[] yp = new int[] {  0,  -7,       7,      0 };
            g.drawPolyline(xp, yp, 4);
            // if (isInverter) g.drawOval(-9, -4, 9, 9);
        }

        if (rotate != 0.0) {
            ((Graphics2D) g).rotate(-rotate);
View Full Code Here

Examples of java.awt.Graphics.drawPolyline()

                g.drawLine(spine0x, spine0y, spine1x, spine1y);
            }
        } else {
            int[] xSpine = { spine0x, spine1x, x0 + parms.getSpine1X() / 4 };
            int[] ySpine = { spine0y, spine1y, y0 + parms.getSpine1Y() / 4 };
            g.drawPolyline(xSpine, ySpine, 3);
        }
    }

    static void drawLabels(ComponentDrawContext context,
            SplitterAttributes attrs, Location origin) {
View Full Code Here

Examples of java.awt.Graphics.drawPolyline()

        GraphicsUtil.switchToWidth(g, 2);
        int[] xp = new int[] { -width / 2, -width + 1, -width + 1, -width / 2 };
        int[] yp = new int[] { -width / 2, -width / 2, width / 2, width / 2 };
        GraphicsUtil.drawCenteredArc(g, -width / 2, 0, width / 2, -90, 180);

        g.drawPolyline(xp, yp, 4);
        if (height > width) {
            g.drawLine(-width + 1, -height / 2, -width + 1, height / 2);
        }
    }
View Full Code Here

Examples of java.awt.Graphics.drawPolyline()

        g.setColor(baseColor);
        GraphicsUtil.switchToWidth(g, 2);
        if (painter.getGateShape() == AppPreferences.SHAPE_SHAPED) {
            int[] xp = {   0,  -5,   5,  -5,   5, -50 };
            int[] yp = { -25, -23, -19, -15, -11, -7, -5};
            g.drawPolyline(xp, yp, xp.length);
        } else {
            g.drawRect(-5, -25, 10, 20);
        }
        if (rotate != 0.0) {
            ((Graphics2D) g).rotate(-rotate);
View Full Code Here

Examples of java.awt.Graphics.drawPolyline()

            int[] yp = new int[4];
            xp[0] =  -6; yp[0] 0;
            xp[1] = -19; yp[1] = -6;
            xp[2] = -19; yp[2] 6;
            xp[3] =  -6; yp[3] 0;
            g.drawPolyline(xp, yp, 4);
            g.drawOval(-6, -3, 6, 6);
        } else {
            int[] xp = new int[4];
            int[] yp = new int[4];
            xp[0] = -10; yp[0] = 0;
View Full Code Here

Examples of java.awt.Graphics.drawPolyline()

            int[] yp = new int[4];
            xp[0] = -10; yp[0] = 0;
            xp[1] = -29; yp[1] = -7;
            xp[2] = -29; yp[2] = 7;
            xp[3] = -10; yp[3] = 0;
            g.drawPolyline(xp, yp, 4);
            g.drawOval(-9, -4, 9, 9);
        }
    }

    static void paintXor(InstancePainter painter, int width, int height) {
View Full Code Here

Examples of java.awt.Graphics.drawPolyline()

                int[] yp = new int[4];
                xp[0] = 15; yp[0] = 10;
                xp[1] 1; yp[1] 3;
                xp[2] 1; yp[2] = 17;
                xp[3] = 15; yp[3] = 10;
                g.drawPolyline(xp, yp, 4);
                g.drawOval(15, 8, 4, 4);
            }
        }
    }
View Full Code Here

Examples of java.awt.Graphics.drawPolyline()

        int[] yp = new int[4];
        xp[0] = 0;   yp[0] 0;
        xp[1] = -19; yp[1] = -7;
        xp[2] = -19; yp[2] 7;
        xp[3] = 0;   yp[3] 0;
        g.drawPolyline(xp, yp, 4);

        if (rotate != 0.0) {
            ((Graphics2D) g).rotate(-rotate);
        }
        g.translate(-x, -y);
View Full Code Here

Examples of java.awt.Graphics.drawPolyline()

    @Override
    protected void paintIconShaped(InstancePainter painter) {
        Graphics g = painter.getGraphics();
        int[] xp = new int[] { 10, 2, 2, 10 };
        int[] yp = new int[] { 2, 2, 18, 18 };
        g.drawPolyline(xp, yp, 4);
        GraphicsUtil.drawCenteredArc(g, 10, 10, 8, -90, 180);
    }

    @Override
    protected void paintShape(InstancePainter painter, int width, int height) {
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.