Examples of drawArc()


Examples of java.awt.Graphics.drawArc()

            // draw top-left & right corners
            bg.drawArc(x, y, arcSize, arcSize, 180, -90);
            bg.drawArc(x2, y, arcSize, arcSize, 0, 90);
               
            // draw bottom-left & right corners
            bg.drawArc(x, y2, arcSize, arcSize, 180, 90);
            bg.drawArc(x2, y2, arcSize, arcSize, 0, -90);
               
            // update coordinates
            x++;
            y++;
View Full Code Here

Examples of java.awt.Graphics.drawArc()

            bg.drawArc(x, y, arcSize, arcSize, 180, -90);
            bg.drawArc(x2, y, arcSize, arcSize, 0, 90);
               
            // draw bottom-left & right corners
            bg.drawArc(x, y2, arcSize, arcSize, 180, 90);
            bg.drawArc(x2, y2, arcSize, arcSize, 0, -90);
               
            // update coordinates
            x++;
            y++;
               
View Full Code Here

Examples of java.awt.Graphics.drawArc()

    final BufferedImage i = new BufferedImage(500, 500, BufferedImage.TYPE_INT_RGB);
    s.accept(new Draw(i.getGraphics()));
    final BufferedImage j = new BufferedImage(500, 500, BufferedImage.TYPE_INT_RGB);
    Graphics g = j.getGraphics();
    g.translate(50, 100);
    g.drawArc(-20, -20, 40, 40, 0, 360);
    assertEquals(i, j);
  }

  @Test
  public void testSimple2() {
View Full Code Here

Examples of java.awt.Graphics.drawArc()

    final BufferedImage i = new BufferedImage(500, 500, BufferedImage.TYPE_INT_RGB);
    s.accept(new Draw(i.getGraphics()));
    final BufferedImage j = new BufferedImage(500, 500, BufferedImage.TYPE_INT_RGB);
    Graphics g = j.getGraphics();
    g.translate(50, 100);
    g.drawArc(-20, -20, 40, 40, 0, 360);
    TestDraw.assertEquals(i, j);
  }

  @Test
  public void testGroupComplex() {
View Full Code Here

Examples of java.awt.Graphics.drawArc()

    final BufferedImage i = new BufferedImage(500, 500, BufferedImage.TYPE_INT_RGB);
    s.accept(new Draw(i.getGraphics()));
    final BufferedImage j = new BufferedImage(500, 500, BufferedImage.TYPE_INT_RGB);
    Graphics g = j.getGraphics();
    g.translate(50, 100);
    g.drawArc(-20, -20, 40, 40, 0, 360);
    g.drawRect(0, 0, 100, 200);
    g.setColor(Color.RED);
    g.fillRect(150, 50, 50, 30);
    g.drawRect(150, 50, 300, 60);
    g.setColor(Color.ORANGE);
View Full Code Here

Examples of java.awt.Graphics.drawArc()

    final BufferedImage i = new BufferedImage(500, 500, BufferedImage.TYPE_INT_RGB);
    s.accept(new Draw(i.getGraphics()));
    final BufferedImage j = new BufferedImage(500, 500, BufferedImage.TYPE_INT_RGB);
    Graphics g = j.getGraphics();
    g.translate(50, 100);
    g.drawArc(-20, -20, 40, 40, 0, 360);
    g.drawRect(0, 0, 100, 200);
    g.setColor(Color.RED);
    g.fillRect(150, 50, 50, 30);
    g.drawRect(150, 50, 300, 60);
    g.setColor(Color.CYAN);
View Full Code Here

Examples of java.awt.Graphics.drawArc()

    g.drawRect(150, 50, 300, 60);
    g.setColor(Color.CYAN);
    g.fillPolygon(new int[] { 200, 210, 250, 270 }, new int[] { 100, 150, 160, 110 }, 4);
    g.setColor(Color.ORANGE);
    g.translate(250, 250);
    g.drawArc(-50, -50, 100, 100, 0, 360);
    TestDraw.assertEquals(i, j);
  }
}
View Full Code Here

Examples of java.awt.Graphics.drawArc()

    // relleno de la bola
    g.setColor(color);
    g.fillArc(0, 0, 2*radius-1, 2*radius-1, 0, 360);
    // contorno
    g.setColor(new Color(0,0,0,80));
    g.drawArc(0, 0, 2*radius-1, 2*radius-1, 0, 360);
    // brillo
    g.setColor(new Color(250,250,250,80));
    int width = (int) (radius/2);
    int x = radius + (int) (radius / 4);
    int y = radius - (int) (2 * radius / 3);
View Full Code Here

Examples of java.awt.Graphics.drawArc()

    // relleno de la bola
    g.setColor(color);
    g.fillArc(0, 0, 2*radius-1, 2*radius-1, 0, 360);
    // contorno
    g.setColor(new Color(0,0,0,80));
    g.drawArc(0, 0, 2*radius-1, 2*radius-1, 0, 360);
    // brillo
    g.setColor(new Color(250,250,250,80));
    int width = (int) (radius/2);
    int x = radius + (int) (radius / 4);
    int y = radius - (int) (2 * radius / 3);
View Full Code Here

Examples of java.awt.Graphics.drawArc()

    // relleno de la bola
    g.setColor(color);
    g.fillArc(0, 0, 2*radius-1, 2*radius-1, 0, 360);
    // contorno
    g.setColor(new Color(0,0,0,80));
    g.drawArc(0, 0, 2*radius-1, 2*radius-1, 0, 360);
    // brillo
    g.setColor(new Color(250,250,250,80));
    int width = (int) (radius/2);
    int x = radius + (int) (radius / 4);
    int y = radius - (int) (2 * radius / 3);
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.