Package gwt.g2d.client.graphics

Examples of gwt.g2d.client.graphics.LinearGradient


        KnownColor.CYAN,
        KnownColor.BLUE,
        KnownColor.MAGENTA,
        KnownColor.RED };

    LinearGradient gradient = new LinearGradient(0, 0, 220, 0);
   
  // Add the color stops.
    for (int i = 0; i < hue.length; i++) {
      gradient.addColorStop(i / 6.0, hue[i]);
    }
 
    // Use the gradient for the fillStyle.
    getPrimarySurface().setFillStyle(gradient)
   
View Full Code Here


      if (type == null) {
        return;
      }
      position.set(col * BLOCK_PIXEL_SIZE, row * BLOCK_PIXEL_SIZE);
      strokeRectangle.move(position.add(STROKE_OFFSET));
      surface.setStrokeStyle(new LinearGradient(
          position.add(GRADIENT_POINT1_OFFSET),
          position.add(GRADIENT_POINT2_OFFSET))
              .addColorStop(0, KnownColor.WHITE)
              .addColorStop(1, KnownColor.GRAY))
          .strokeRectangle(strokeRectangle);
     
      fillRectangle.move(position.add(FILL_OFFSET));
      surface.setFillStyle(new LinearGradient(
          position.add(GRADIENT_POINT1_OFFSET),
          position.add(GRADIENT_POINT2_OFFSET))
              .addColorStop(0, type.getColor())
              .addColorStop(1, KnownColor.WHITE))             
          .fillRectangle(fillRectangle);
View Full Code Here

    surface.fillRectangle(0, 0, size, size)
        .setTransform(matrix.mutableTranslate(size / 2, size / 2))
        .clipShape(new CircleShape(0, 0, size / 2.0 * .8));

    Gradient gradient = new LinearGradient(0, -size / 2, 0, size / 2)
        .addColorStop(0, new Color(35, 34, 86))
        .addColorStop(1, new Color(20, 55, 120));
   
    surface.setFillStyle(gradient)
        .fillRectangle(-size / 2, -size / 2, size, size);
View Full Code Here

TOP

Related Classes of gwt.g2d.client.graphics.LinearGradient

Copyright © 2018 www.massapicom. 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.