Package gwt.g2d.client.graphics

Examples of gwt.g2d.client.graphics.Gradient


    Surface originalCanvas = new Surface(300, 300);
    Circle smallCircle = new Circle(150, 150, 140);
    Circle bigCircle = new Circle(150, 150, 150);
    Shape smallCircleShape = new ShapeBuilder().drawCircle(smallCircle).build();
    Shape bigCircleShape = new ShapeBuilder().drawCircle(bigCircle).build();
    Gradient radialGradient = new RadialGradient(new Circle(150, 150, 0), smallCircle)
        .addColorStop(0, KnownColor.RED)
        .addColorStop(1, KnownColor.GREEN);
    originalCanvas.setFillStyle(KnownColor.BLACK)
        .fillShape(bigCircleShape)
        .setFillStyle(radialGradient)
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.Gradient

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.