Package org.joshy.gfx.draw

Examples of org.joshy.gfx.draw.LinearGradientFill


        }

        private void setBackgroundFill(Paint paint, SketchDocument doc) {
            if(paint instanceof LinearGradientFill) {
                LinearGradientFill grad = (LinearGradientFill) paint;
                grad = resizeTo(grad, new Bounds(0, 0, doc.getWidth(), doc.getHeight()));
                doc.setBackgroundFill(grad);
                return;
            }
View Full Code Here


    }
    public static class Future extends PresoThemeAction {
        protected Future(SketchDocument doc, VectorDocContext context) {
            super(doc, context);
            int size = 100;
            this.backgroundFill = new LinearGradientFill()
                    .setStartX(size / 2).setStartXSnapped(LinearGradientFill.Snap.Middle)
                    .setEndX(size / 2).setEndXSnapped(LinearGradientFill.Snap.Middle)
                    .setStartY(0).setStartYSnapped(LinearGradientFill.Snap.Start)
                    .setEndY(size).setEndYSnapped(LinearGradientFill.Snap.End)
                    .addStop(0, FlatColor.fromRGBInts(0, 0, 0))
View Full Code Here

    @Test public void testArrow() {

    }
   
    @Test public void testGradientRect() throws IOException {
        MultiGradientFill grad = new LinearGradientFill()
                .setStartX(3).setStartY(0).setEndX(97).setEndY(0)
                .addStop(0, FlatColor.BLUE)
                .addStop(1, FlatColor.RED);
        SRect rect = new SRect(0,0,100,100);
        rect.setFillPaint(grad);
View Full Code Here

TOP

Related Classes of org.joshy.gfx.draw.LinearGradientFill

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.