Package java.awt

Examples of java.awt.Graphics2D.drawRect()


                BufferedImage.TYPE_INT_RGB);
        Graphics2D g = img.createGraphics();
        g.setColor(Color.white);
        g.fillRect(0, 0, img.getWidth() - 1, img.getHeight() - 1);
        g.setColor(Color.black);
        g.drawRect(0, 0, img.getWidth() - 1, img.getHeight() - 1);

        if (this.neuronCount == 0) {
            return img;
        }
View Full Code Here


        }
       
        g.setColor(Color.orange);
        g.fillRect(width / 2 - 3, width / 2 - 3, width / 2 + 6, 3 * width / 2 + 6);
        g.setColor(Color.black);
        g.drawRect(width / 2 - 3, width / 2 - 3, width / 2 + 6, 3 * width / 2 + 6);

        g.setColor(top);
        g.fillOval(width / 2, 1 * width / 2, radius, radius);
        g.setColor(Color.black);
        g.drawOval(width / 2, 1 * width / 2, radius, radius);
View Full Code Here

              if(j>=i)
              {
//                    g.setColor(new Color(80, 80, 80));
                g.setColor(Color.black);
//                g.setStroke(new BasicStroke(2));
                    g.drawRect(j*16+5, i*16+5, 6, 6);
              }
              else
              {
                    g.setColor(Color.black);
                    g.fillRect(j*16+5, i*16+5, 6, 6);
View Full Code Here

          int j = l.neuron;
         
          if(i < imgNet.inputs+1)
          {
            g.setColor(Color.white);
            g.drawRect(j*16, i*16, 14, 14);
          }
          else
          {
            if(j < imgNet.inputs+1)
            {
View Full Code Here

            {
              if(j>=i)
              {
//                    g.setColor(new Color(80, 80, 80));
                g.setColor(Color.black);
                g.drawRect(j*16, i*16, 13, 13);
//                    g.fillRect(j*16, i*16, 14, 14);
              }
              else
              {
                    g.setColor(Color.black);
View Full Code Here

                autImg.getWidth(),
                autImg.getHeight(),
                null);

        g.setColor(Color.black);
        g.drawRect(0, 0, gesamtImg.getWidth() - 1, gesamtImg.getHeight() - 1);

        return gesamtImg;
    }
   
    /**
 
View Full Code Here

                (400, 400, BufferedImage.TYPE_INT_ARGB);
            Graphics2D g2d = img.createGraphics();
            g2d.setColor(Color.black);
            g2d.fillRect(0, 0, 400, 400);
            g2d.setColor(Color.red);
            g2d.drawRect(100, 50, 100, 50);
            ByteArrayOutputStream ostream = new ByteArrayOutputStream();
            PNGTranscoder t = new PNGTranscoder();
            TranscoderOutput output = new TranscoderOutput(ostream);
            t.writeImage(img, output);
            return ostream.toByteArray();
View Full Code Here

                txf.setToIdentity();
                txf.translate(-100, -100);
                txf.rotate(j*Math.PI/100);
                txf.translate(100, 100);
                g.setTransform(txf);
                g.drawRect(30, 30, 140, 140);
            }
            /*
            Vector v = new Vector();
            for (int i=0; i<5000; i++) {
                v.addElement("" + i);
View Full Code Here

            Graphics2D g2d = bi.createGraphics();
 
            g2d.setColor(new Color(255,255,255,190));
            g2d.fillRect(0, 0, 100, 100);
            g2d.setColor(Color.black);
            g2d.drawRect(2, 2, 96, 96);
            g2d.drawString("Broken Image", 6, 50);
            g2d.dispose();

            brokenLinkImg = new RedRable(GraphicsUtil.wrap(bi));
            return brokenLinkImg;
View Full Code Here

                  BufferedImage image = new BufferedImage((int) (bounds
                      .getWidth() * scale), (int) (bounds.getHeight() * scale),
                      BufferedImage.TYPE_INT_ARGB);
                  Graphics2D g2d = image.createGraphics();
                  g2d.setColor(Color.black);
                  g2d.drawRect((int) (2 * scale), (int) (2 * scale),
                      (int) ((bounds.getWidth() - 4) * scale),
                      (int) ((bounds.getHeight() - 4) * scale));
                  dge.startDrag(GraphView.this.getCursor(), image, offset,
                      new Transferable() {

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.