Package org.joshy.gfx.draw

Examples of org.joshy.gfx.draw.ImageBuffer


    protected void regenInnerShadow(GFX g) {
        //setup
        int blurRadius = 5;
        Bounds b = getBounds();
        ImageBuffer bufx = g.createBuffer(
                (int)b.getWidth()+blurRadius*2,
                (int)b.getHeight()+blurRadius*2);

        //render shadow to buffer
        bufx.clear();
        GFX g2 = bufx.getGFX();
        g2.setPaint(FlatColor.BLACK);
        g2.translate(10, 10);
        fillShape(g2);
        g2.translate(-10, -10);
        bufx.apply(new BlurEffect(blurRadius));
        g2.dispose();

        //invert alpha channel
        for(int i=0; i<bufx.buf.getWidth(); i++) {
            for(int j=0; j<bufx.buf.getHeight(); j++) {
View Full Code Here


            public void doSkins() {      }

            @Override
            public void draw(GFX gfx) {
                if(img == null) {
                    img =new ImageBuffer((int)size,(int)size);
                }
                double hue = getColor().getHue();
                double sat = getColor().getSaturation();
                double bri = getColor().getBrightness();
                double red = getColor().getRed();
View Full Code Here

TOP

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

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.