Package ch.blackspirit.graphics.util

Examples of ch.blackspirit.graphics.util.ColorGradientFactory.drawGradient()


    final Color4f red = new Color4f(1,0,0,1);
       
    ColorGradientFactory gradientFactory = new ColorGradientFactory();
    gradientFactory.addSourcePoint(light.getWidth() / 2, light.getHeight() / 2, light.getWidth() / 2f * .9f, new Color4f(0,0,0,0));
    gradientFactory.setBaseColor(new Color4f(1,1,1,1));
    gradientFactory.drawGradient(light);
 
    GraphicsContext imageContext = canvas.createImageGraphicsContext(dark);
    walk = animFrontStill;
   
    // Draw the light shine
View Full Code Here


    final Color4f red = new Color4f(1,0,0,1);
       
    ColorGradientFactory gradientFactory = new ColorGradientFactory();
    gradientFactory.addSourceSegment(50, 0, 50, 255, 150, new Color4f(1, 0, 0, 1));
    gradientFactory.addSourceSegment(205, 0, 205, 255,150, new Color4f(0, 0, 1, 1));
    gradientFactory.drawGradient(gradient);

    final Font fontNormal = new Font("SansSerif", Font.PLAIN, 24);
    final Font fontSmall = new Font("SansSerif", Font.PLAIN, 16);
   
    System.out.println("starting demo");
View Full Code Here

    ColorGradientFactory gradientFactory = new ColorGradientFactory();
    gradientFactory.addSourceSegment(50, 0, 50, 255, 150, new Color4f(1, 0, 0, 1));
    gradientFactory.addSourceSegment(205, 0, 205, 255,150, new Color4f(0, 0, 1, 1));
//    gradientFactory.addSourceSegment(0, 0, 0, 255, 256, new Color4f(0, 0, 0, 1));
//    gradientFactory.addSourceSegment(255, 0, 255, 255, 256, new Color4f(1, 1, 1, 1));
    gradientFactory.drawGradient(gradient);
//    gradient.setDirty();

    gradientFactory.clearSources();
    gradientFactory.addSourcePoint(light.getWidth() / 2, light.getHeight() / 2, light.getWidth() / 2f * .9f, new Color4f(0,0,0,0));
    gradientFactory.setBaseColor(new Color4f(1,1,1,1));
View Full Code Here

//    gradient.setDirty();

    gradientFactory.clearSources();
    gradientFactory.addSourcePoint(light.getWidth() / 2, light.getHeight() / 2, light.getWidth() / 2f * .9f, new Color4f(0,0,0,0));
    gradientFactory.setBaseColor(new Color4f(1,1,1,1));
    gradientFactory.drawGradient(light);
//    gradientFactory.addSourceSegment(0, 0, 255, 255, new Color4f(1, 1, 1, 1));

//    rm.cacheImage(gradient);
//    rm.cacheImage(light);

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.