Package java.awt

Examples of java.awt.Graphics2D.fillPolygon()


                // Aguja de los segundos
                if (m_bSeconds) {
                    g2.setTransform(mytrans);      
                    g2.transform(AffineTransform.getRotateInstance(dsecond * Math.PI / 30.0)); // Poner segundos
                    g2.setColor(Color.YELLOW);
                    g2.fillPolygon(new int[]{-15, 0, 15}, new int[]{200, -900, 200}3);  
                    g2.setColor(Color.DARK_GRAY);
                    g2.drawPolygon(new int[]{-15, 0, 15}, new int[]{200, -900, 200}3);  

                    g2.setTransform(mytrans);      
                    g2.setColor(Color.YELLOW);
View Full Code Here


            g2.setStroke(defaultStroke);

            g2.setColor(arrowColor);
            int[] xpts = {minGrip - GRIP_WIDTH, minGrip + 1, minGrip + 1};
            int[] ypts = {GRIP_MIDDLE_Y, GRIP_TOP_Y, GRIP_BOTTOM_Y};
            g2.fillPolygon(xpts, ypts, 3);
        }
        if (rSlideMoved) {
            g2.setColor(bg);
            g2.fillRect(minGrip + 1, GRIP_TOP_Y, w - minGrip - 3, GRIP_HEIGHT);
View Full Code Here

            g2.setStroke(defaultStroke);

            g2.setColor(arrowColor);
            int[] xpts = new int[]{maxGrip + GRIP_WIDTH - 1, maxGrip, maxGrip};
            int[] ypts = {GRIP_MIDDLE_Y, GRIP_TOP_Y, GRIP_BOTTOM_Y};
            g2.fillPolygon(xpts, ypts, 3);
        }
        if (lSlideMoved || rSlideMoved) {
            g2.setColor(Color.gray);
            g2.draw3DRect(minGrip + 1, GRIP_MIDDLE_Y - 7, maxGrip - minGrip - 1, 15, true);
            g2.fill3DRect(minGrip + 1, GRIP_MIDDLE_Y - 7, maxGrip - minGrip - 1, 15, true);
View Full Code Here

        BufferedImage.TYPE_INT_ARGB_PRE);

    final Graphics2D g2 = dst.createGraphics();
    g2.setBackground(new Color(0, 0, 0, 255));
    g2.setColor(color);
    g2.fillPolygon(new int[] { 0, height, 0 }, new int[] { 0, middle,
        height }, 3);
    return new ImageIcon(dst);
  }

  public static ImageIcon getPauseIcon(int height, final Color color) {
View Full Code Here

        BufferedImage.TYPE_INT_ARGB_PRE);

    final Graphics2D g2 = dst.createGraphics();
    g2.setBackground(new Color(0, 0, 0, 255));
    g2.setColor(color);
    g2.fillPolygon(new int[] { 0, (int) step, (int) step, 0 }, new int[] {
        0, 0, height, height }, 4);
    g2.fillPolygon(new int[] { (int) (2 * step),
        (int) (2 * step) + (int) step, (int) (2 * step) + (int) step,
        (int) (2 * step) }, new int[] { 0, 0, height, height }, 4);
    return new ImageIcon(dst);
View Full Code Here

    final Graphics2D g2 = dst.createGraphics();
    g2.setBackground(new Color(0, 0, 0, 255));
    g2.setColor(color);
    g2.fillPolygon(new int[] { 0, (int) step, (int) step, 0 }, new int[] {
        0, 0, height, height }, 4);
    g2.fillPolygon(new int[] { (int) (2 * step),
        (int) (2 * step) + (int) step, (int) (2 * step) + (int) step,
        (int) (2 * step) }, new int[] { 0, 0, height, height }, 4);
    return new ImageIcon(dst);
  }
}
View Full Code Here

    if( cycle ) {
      g2.rotate( Math.PI, 4, 2 );
    }
    g2.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON );
    g2.setColor( isEnabled() ? colrTri : colrTriD );
    g2.fillPolygon( polyX, polyY, 3 );
   
    g2.setTransform( atOrig );
  }
 
// ----------------- internal classes -----------------
View Full Code Here

                g2d.drawLine(0, h, w/2, h/2);
                Polygon p = new Polygon();
                p.addPoint(w/2, h);
                p.addPoint(w, h);
                p.addPoint(3*w/4, h/2);
                g2d.fillPolygon(p);
                break;
            }

            switch (paintType) {
            default:
View Full Code Here

            throw new RuntimeException("xi or yi are null or they have not the same length!");
        }
        Graphics2D g2d = image.createGraphics();
        g2d.setColor(TRANSPARENT);
        g2d.setComposite(AlphaComposite.Src);
        g2d.fillPolygon(xi, yi, xi.length);
    }
}
View Full Code Here

        g.translate(pt.x, pt.y);
        g.scale(2, 2);
        g.rotate(theta - Math.PI / 2);
        int x = 0;
        int y = 0;
        g.fillPolygon(xpts, ypts, xpts.length);
    }

    public static void main(String[] args)
    {
        buggy view = new buggy("buggy");
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.