Examples of drawPolyline()


Examples of java.awt.Graphics.drawPolyline()

    if (toolIcon != null) {
      toolIcon.paintIcon(painter.getDestination(), g, 2, 2);
    } else {
      g.drawRect(4, 4, 13, 13);
      g.setColor(Value.FALSE.getColor());
      g.drawPolyline(new int[] { 6, 6, 10, 10, 14, 14 },
          new int[] { 10, 6, 6, 14, 14, 10 }, 6);
    }

    Direction dir = painter.getAttributeValue(StdAttr.FACING);
    int pinx = 15; int piny = 8;
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()

    BufferedImage bi = new BufferedImage(bounds.width, bounds.height, BufferedImage.TYPE_4BYTE_ABGR);
    Graphics g = bi.getGraphics();
    int qLength = bounds.width * 3 / 5, height = bounds.height, width = bounds.width;
    for (int i = 0, monoChannel = 0; i < 5; i++, monoChannel = (int) ((1 - Math.exp(-i)) * 50)) {
      g.setColor(new Color(230 - monoChannel, 230 - monoChannel, 230 - monoChannel, 255));
      g.drawPolyline(new int[] { i, i, qLength - i }, new int[] { height - i, i, i }, 3);
      g.fillArc(width - height + i, i, height - 2 * i, height - 2 * i, 45, 180);
      g.setColor(new Color(130 + monoChannel, 130 + monoChannel, 130 + monoChannel, 255));
      g.drawPolyline(new int[] { i, qLength - i, qLength - i }, new int[] { height - i, height - i, i }, 3);
      g.fillArc(width - height + i, i, height - 2 * i, height - 2 * i, 225, 180);
    }
View Full Code Here

Examples of java.awt.Graphics.drawPolyline()

    for (int i = 0, monoChannel = 0; i < 5; i++, monoChannel = (int) ((1 - Math.exp(-i)) * 50)) {
      g.setColor(new Color(230 - monoChannel, 230 - monoChannel, 230 - monoChannel, 255));
      g.drawPolyline(new int[] { i, i, qLength - i }, new int[] { height - i, i, i }, 3);
      g.fillArc(width - height + i, i, height - 2 * i, height - 2 * i, 45, 180);
      g.setColor(new Color(130 + monoChannel, 130 + monoChannel, 130 + monoChannel, 255));
      g.drawPolyline(new int[] { i, qLength - i, qLength - i }, new int[] { height - i, height - i, i }, 3);
      g.fillArc(width - height + i, i, height - 2 * i, height - 2 * i, 225, 180);
    }
    g.fillRect(5, 5, qLength - 9, height - 9);
    g.fillOval(width - height + 5, 5, height - 10, height - 10);
    return bi;
View Full Code Here

Examples of java.awt.Graphics.drawPolyline()

      lights[i] = new Color(255, 255, 255, 200 - (i * 200) / lights.length);
    }
    Graphics g = overlayedShading.getGraphics();
    for (int i = 0; i < shades.length; i++) {
      g.setColor(lights[i]);
      g.drawPolyline(new int[] { i, i, qLength - i }, new int[] { height - i - yOffs, i + yOffs, i + yOffs }, 3);
      g.drawArc(width - height + i, i, height - 2 * i, height - 2 * i, 45 + 4 * i, 180 - 8 * i);
      g.setColor(shades[i]);
      g.drawPolyline(new int[] { i, qLength - i, qLength - i }, new int[] { height - i - yOffs, height - i - yOffs, i + yOffs }, 2);
      g.drawArc(width - height + i, i, height - 2 * i, height - 2 * i, 225 + 4 * i, 180 - 8 * i);
    }
 
View Full Code Here

Examples of java.awt.Graphics.drawPolyline()

    for (int i = 0; i < shades.length; i++) {
      g.setColor(lights[i]);
      g.drawPolyline(new int[] { i, i, qLength - i }, new int[] { height - i - yOffs, i + yOffs, i + yOffs }, 3);
      g.drawArc(width - height + i, i, height - 2 * i, height - 2 * i, 45 + 4 * i, 180 - 8 * i);
      g.setColor(shades[i]);
      g.drawPolyline(new int[] { i, qLength - i, qLength - i }, new int[] { height - i - yOffs, height - i - yOffs, i + yOffs }, 2);
      g.drawArc(width - height + i, i, height - 2 * i, height - 2 * i, 225 + 4 * i, 180 - 8 * i);
    }
    overlayedShading = overlayedShading.getScaledInstance(getBounds().width, getBounds().height, Image.SCALE_SMOOTH);
  }

View Full Code Here

Examples of java.awt.Graphics.drawPolyline()

    int qLength = 60, height = 40, width = 100;
    BufferedImage bi = new BufferedImage(width, height, BufferedImage.TYPE_4BYTE_ABGR);
    Graphics g = bi.getGraphics();
    for (int i = 0, monoChannel = 0; i < 10; i++, monoChannel = (int) ((1 - Math.exp(-i)) * 50)) {
      g.setColor(new Color(230 - monoChannel, 230 - monoChannel, 230 - monoChannel));
      g.drawPolyline(new int[] { i, i, qLength - i }, new int[] { height - i, i, i }, 3);
      g.fillArc(width - height + i, i, height - 2 * i, height - 2 * i, 45, 180);
      g.setColor(new Color(130 + monoChannel, 130 + monoChannel, 130 + monoChannel));
      g.drawPolyline(new int[] { i, qLength - i, qLength - i }, new int[] { height - i, height - i, i }, 3);
      g.fillArc(width - height + i, i, height - 2 * i, height - 2 * i, 225, 180);
    }
View Full Code Here

Examples of java.awt.Graphics.drawPolyline()

    for (int i = 0, monoChannel = 0; i < 10; i++, monoChannel = (int) ((1 - Math.exp(-i)) * 50)) {
      g.setColor(new Color(230 - monoChannel, 230 - monoChannel, 230 - monoChannel));
      g.drawPolyline(new int[] { i, i, qLength - i }, new int[] { height - i, i, i }, 3);
      g.fillArc(width - height + i, i, height - 2 * i, height - 2 * i, 45, 180);
      g.setColor(new Color(130 + monoChannel, 130 + monoChannel, 130 + monoChannel));
      g.drawPolyline(new int[] { i, qLength - i, qLength - i }, new int[] { height - i, height - i, i }, 3);
      g.fillArc(width - height + i, i, height - 2 * i, height - 2 * i, 225, 180);
    }
    g.fillRect(5, 5, qLength - 9, height - 9);
    g.fillOval(width - height + 5, 5, height - 10, height - 10);
    return bi.getScaledInstance(bounds.width, bounds.height, Image.SCALE_SMOOTH);
View Full Code Here

Examples of java.awt.Graphics.drawPolyline()

    tg.drawImage(map.getOriginImage(), 0, 0, null);

    tg.setColor(color);
    int[] xa=toXa(e.getX());
    int[] ya=toYa(e.getY());
    tg.drawPolyline(xa,ya,xa.length);

    image.flush();
    map.getGraphics().drawImage(image, 0, 0, map);
  }
View Full Code Here

Examples of java.awt.Graphics.drawPolyline()

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

    @Override
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.