Examples of Color


Examples of gwt.g2d.client.graphics.Color

    particles.clear();
    for (int i = 0; i < NUM_PARTICLES; i++) {
      particles.add(new Particle(
          new Vector2(Random.nextInt(WIDTH), Random.nextInt(HEIGHT)),
          new Vector2(Math.random(), Math.random()).normalize(),
          new Color(Random.nextInt(256),
              Random.nextInt(256),
              Random.nextInt(256),
              Math.random())));
    }
  }
View Full Code Here

Examples of gwt.g2d.shared.Color

 
  /**
   * Get the color at a given location.
   */
  public Color getColor(int x, int y) {
    return new Color(imageData.getRedAt(x,  y), imageData.getGreenAt(x,  y), imageData.getBlueAt(x,  y), (double)imageData.getAlphaAt(x, y) / 255.0);
  }
View Full Code Here

Examples of hasami.Board.Color

    int size=b.getBoardSize();
        for(int line=size-1; line >= 0; line--){
            printLinha();
            System.out.print((line+1)+" ");
            for(int col=0; col < size; col++){
                Color piece = b.get(line, col);
                if(piece==null)
                    System.out.print("|   ");
                else if( piece == Color.BLACK)
                    System.out.print("| X ");
                else if(piece == Color.WHITE)
View Full Code Here

Examples of java.awt.Color

    repaint();
  }
 
  private void resetBackground() {
    Color temp = Settings.propProgramTableBackgroundSingleColor.getColor();
   
    Settings.propProgramTableBackgroundSingleColor.setColor(Color.white);
    repaint();
    Settings.propProgramTableBackgroundSingleColor.setColor(temp);
  }
View Full Code Here

Examples of java.awt.Color

    setPreferredSize(new Dimension(prefWidth, prefHeight));
 
    fadeStop = (float) (About.IMAGE_HEIGHT / 4.0);

    colorBase = new Color[] {
        new Color(143, 0, 0),
        new Color(48, 0, 96),
        new Color(48, 0, 96),
    };
    font = new Font[] {
        new Font("Sans Serif", Font.ITALIC, 20),
        new Font("Sans Serif", Font.BOLD, 24),
        new Font("Sans Serif", Font.BOLD, 18),
    };
    paintSteady = new Paint[colorBase.length];
    for (int i = 0; i < colorBase.length; i++) {
      Color hue = colorBase[i];
      paintSteady[i] = new GradientPaint(0.0f, 0.0f, derive(hue, 0),
          0.0f, fadeStop, hue);
    }
   
    URL url = AboutCredits.class.getClassLoader().getResource(HENDRIX_PATH);
View Full Code Here

Examples of java.awt.Color

    scroll = value;
    repaint();
  }
 
  private Color derive(Color base, int alpha) {
    return new Color(base.getRed(), base.getGreen(), base.getBlue(), alpha);
  }
View Full Code Here

Examples of java.awt.Color

      } else if (a < 15) {
        paint = paintSteady;
      } else {
        paint = new Paint[colorBase.length];
        for (int i = 0; i < paint.length; i++) {
          Color hue = colorBase[i];
          paint[i] = new GradientPaint(0.0f, 0.0f, derive(hue, a),
            0.0f, fadeStop, hue);
        }
      }
      yPos = initY;
View Full Code Here

Examples of java.awt.Color

    if (opacity == null || opacity.equals("")) {
      a = 255;
    } else {
      a = (int) Math.round(Double.parseDouble(opacity) * 255);
    }
    return new Color(r, g, b, a);
  }
View Full Code Here

Examples of java.awt.Color

      val = data == null ? Value.FALSE : (Value) data.getValue();
    } else {
      val = Value.FALSE;
    }
   
    Color color = painter.getAttributeValue(Io.ATTR_COLOR);
    if (!painter.shouldDrawColor()) {
      int hue = (color.getRed() + color.getGreen() + color.getBlue()) / 3;
      color = new Color(hue, hue, hue);
    }
   
    Graphics g = painter.getGraphics();
    int depress;
    if (val == Value.TRUE) {
      x += DEPTH;
      y += DEPTH;
      Object labelLoc = painter.getAttributeValue(Io.ATTR_LABEL_LOC);
      if (labelLoc == Io.LABEL_CENTER || labelLoc == Direction.NORTH
          || labelLoc == Direction.WEST) {
        depress = DEPTH;
      } else {
        depress = 0;
      }
     
      Object facing = painter.getAttributeValue(StdAttr.FACING);
      if (facing == Direction.NORTH || facing == Direction.WEST) {
        Location p = painter.getLocation();
        int px = p.getX();
        int py = p.getY();
        GraphicsUtil.switchToWidth(g, Wire.WIDTH);
        g.setColor(Value.TRUE_COLOR);
        if (facing == Direction.NORTH) g.drawLine(px, py, px, py + 10);
        else                          g.drawLine(px, py, px + 10, py);
        GraphicsUtil.switchToWidth(g, 1);
      }
     
      g.setColor(color);
      g.fillRect(x, y, w - DEPTH, h - DEPTH);
      g.setColor(Color.BLACK);
      g.drawRect(x, y, w - DEPTH, h - DEPTH);
    } else {
      depress = 0;
      int[] xp = new int[] { x, x + w - DEPTH, x + w, x + w, x + DEPTH, x };
      int[] yp = new int[] { y, y, y + DEPTH, y + h, y + h, y + h - DEPTH };
      g.setColor(color.darker());
      g.fillPolygon(xp, yp, xp.length);
      g.setColor(color);
      g.fillRect(x, y, w - DEPTH, h - DEPTH);
      g.setColor(Color.BLACK);
      g.drawRect(x, y, w - DEPTH, h - DEPTH);
View Full Code Here

Examples of javafx.scene.paint.Color

    messageTypeRegEx = new SimpleStringProperty((String)in.readObject());
    double r = in.readDouble();
    double g = in.readDouble();
    double b = in.readDouble();
    double o = in.readDouble();
    color = new SimpleObjectProperty<Color>(new Color(r,g,b,o));
  }
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.