Examples of fillRoundRect()


Examples of java.awt.Graphics2D.fillRoundRect()

    g.setColor(Color.GREEN);
    Graphics2D g2d = (Graphics2D) g;
    AlphaComposite myAlpha = AlphaComposite.getInstance(
        AlphaComposite.SRC_OVER, 0.22f);
    g2d.setComposite(myAlpha);
    g2d.fillRoundRect(30, 100, Core.WIDTH - 60, 100, 20, 20);
    AlphaComposite noAlpha = AlphaComposite.getInstance(
        AlphaComposite.SRC_OVER, 1.0f);
    g2d.setComposite(noAlpha);
   
   
View Full Code Here

Examples of java.awt.Graphics2D.fillRoundRect()

        // draw shadow shape
        Graphics2D g2 = (Graphics2D)img1.getGraphics();
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                RenderingHints.VALUE_ANTIALIAS_ON);
        g2.setColor(color);
        g2.fillRoundRect(2,0,26,26,RADIUS,RADIUS);
        g2.dispose();
        // draw shadow
        InnerShadowEffect effect = new InnerShadowEffect();
        effect.setDistance(1);
        effect.setSize(3);
View Full Code Here

Examples of java.awt.Graphics2D.fillRoundRect()

      Graphics g = image[i].getGraphics();
      Graphics2D g2d = (Graphics2D) g;
      g2d.setBackground(Color.WHITE);
      g2d.fillRect(0, 0, 16, 16);
      g2d.setColor(Color.LIGHT_GRAY);
      g2d.fillRoundRect(2, 2, 11, 11, 5, 5);
      g2d.setColor(Color.DARK_GRAY);
      g2d.drawRoundRect(2, 2, 11, 11, 5, 5);
      int count = 0;
      for (int y = 4; y < 12; y += 3) {
        for (int x = 4; x < 12; x += 3) {
View Full Code Here

Examples of java.awt.Graphics2D.fillRoundRect()

      Graphics g = image[i].getGraphics();
      Graphics2D g2d = (Graphics2D) g;
      g2d.setBackground(Color.WHITE);
      g2d.fillRect(0, 0, 16, 16);
      g2d.setColor(Color.LIGHT_GRAY);
      g2d.fillRoundRect(2, 2, 11, 11, 5, 5);
      g2d.setColor(Color.DARK_GRAY);
      g2d.drawRoundRect(2, 2, 11, 11, 5, 5);
      int count = 0;
      for (int y = 4; y < 12; y += 3) {
        for (int x = 4; x < 12; x += 3) {
View Full Code Here

Examples of java.awt.Graphics2D.fillRoundRect()

    }
   
    //for debug repainting
    //g2d.setColor(new Color(MyRandom.random.nextInt(255),MyRandom.random.nextInt(255),MyRandom.random.nextInt(255),150));
    int cornerSize = Math.max(4, Math.round(cardWidth * ROUNDED_CORNER_SIZE));
    g2d.fillRoundRect(cardXOffset, cardYOffset, cardWidth, cardHeight, cornerSize, cornerSize);
    if (isSelected) {
      //g2d.setColor(new Color(0,250,0,200));
      g2d.setColor(new Color(200,120,40,200));
      g2d.fillRoundRect(cardXOffset+1, cardYOffset+1, cardWidth-2, cardHeight-2, cornerSize, cornerSize);
    }
View Full Code Here

Examples of java.awt.Graphics2D.fillRoundRect()

    int cornerSize = Math.max(4, Math.round(cardWidth * ROUNDED_CORNER_SIZE));
    g2d.fillRoundRect(cardXOffset, cardYOffset, cardWidth, cardHeight, cornerSize, cornerSize);
    if (isSelected) {
      //g2d.setColor(new Color(0,250,0,200));
      g2d.setColor(new Color(200,120,40,200));
      g2d.fillRoundRect(cardXOffset+1, cardYOffset+1, cardWidth-2, cardHeight-2, cornerSize, cornerSize);
    }
   
    //TODO:uncomment
    /*
    if (gameCard.isAttacking()) {
View Full Code Here

Examples of java.awt.Graphics2D.fillRoundRect()

        g2D.setColor(color);
        g2D.fill(new Ellipse2D.Double(ball.getxPos() * xE, ball.getyPos() * yE, xE, yE));

        if(laser){
            g2D.setColor(Color.ORANGE);
          g2D.fillRoundRect(
              (int) (ball.getxPos() * xE + xE / 2 - 5 ),
              0,
              10,
              (int) (yE * (mechanics.getHeight() - 1)), 5, 40);
          laser = false;
View Full Code Here

Examples of java.awt.Graphics2D.fillRoundRect()

          laser = false;
        }
       
        if (!showString.equals("")) {
            g2D.setColor(Color.WHITE);
            g2D.fillRoundRect(7, (getHeight() / 2)-20, getWidth() - 17, 25, 10, 10);
           
            g2D.setColor(Color.BLACK);
            g2D.setFont(new Font("Arial", Font.BOLD, 20));
            g2D.drawString(showString, 12, getHeight() / 2);
        }
View Full Code Here

Examples of java.awt.Graphics2D.fillRoundRect()

                g.translate(-bounds.x, -bounds.y);
                g.clip(bounds);
                if (isOpaque()) {
                        Color c = g.getColor();
                        g.setColor(getBackground());
                        g.fillRoundRect(bounds.x, bounds.y, bounds.width, bounds.height, arc, arc);
                        g.setColor(c);
                }
                if (offscreen == null) {
                        offscreen = /*!Sprite._isTrueVolatile() ? */ new Sprite(SpriteIO.createBufferedImage(getSize(), Sprite.DEFAULT_TYPE), "image/x-png", getSize())/* : new Sprite(Sprite.createVolatileImage(getSize()), "image/x-png", getSize())*/;
                        offscreen.setMt(new SfMediaTracker(this), this);
View Full Code Here

Examples of java.awt.Graphics2D.fillRoundRect()

                g2.setClip(0, 0, offscreen.getWidth(), offscreen.getHeight());
                g2.translate(-bounds.x, -bounds.y);
                Composite cps = g2.getComposite();
                Color c = g2.getColor();
                g2.setBackground(Color.WHITE);
                g2.fillRoundRect(bounds.x, bounds.y, bounds.width, bounds.height, arc, arc);
                g2.setColor(Color.ORANGE);
                GradientPaint gradient = addGradient(this, g2, g2.getBackground(), g2.getColor(), "0");
                final float glow = isIndeterminate() ? JProgressMemory.glow : 1f;
                g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, glow));
                Paint paint = g2.getPaint();
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.