Package org.joshy.gfx.draw

Examples of org.joshy.gfx.draw.Image


                for(int y=0; y<600; y+=256) {
                    for(int x=0; x<600; x+=256) {
                        PixelTile tile = layer.getTile(x/256,y/256);
                        if(tile != null) {
                            //u.p("drawing tile at : " + x + " " + y);
                            Image image = tile.getImage();
                            if(image != null) {
                                gfx.drawImage(image,x,y);
                            }
                        }
                        //tile grid lines
View Full Code Here


        try {
            File json_file = new File(src_base,"common/controls2.json");
            String text = new Scanner( json_file ).useDelimiter("\\A").next();
            JSONObject rootJSON = new JSONObject(text);
            final BufferedImage skinpng = ImageIO.read(new File(src_base,"common/skin.png"));
            final Image skin = Image.create(skinpng);

            JSONArray root = rootJSON.getJSONArray("controls");
            for(int i=0; i<root.length(); i++) {
                u.p("control = " + root.getJSONObject(i).getString("name"));
                set.addSymbol(createControl(root.getJSONObject(i),skin));
View Full Code Here

                }
                if(column == 1) {
                    Font.drawCenteredVertically(gfx, asset.getKind(), Font.DEFAULT, x, y, w, h, false);
                }
                if(column == 2) {
                    Image img = null;
                    if(asset.getKind().equals(AssetDB.PATTERN)) {
                        img = RenderUtil.patternToImage(asset);
                    }
                    if(asset.getKind().equals(AssetDB.PALETTE)) {
                        img = RenderUtil.toImage((Palette)asset);
View Full Code Here

TOP

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

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.