Package playn.core

Examples of playn.core.SurfaceImage


        }

        final Map<String,Image.Region> packed = new HashMap<String,Image.Region>();
        for (Atlas atlas : atlases) {
            Node root = atlas.root;
            final SurfaceImage atlasImage = graphics().createSurface(root.width, root.height);
            root.visitItems(new Slot<Node>() { @Override public void onEmit (Node node) {
                // Draw the item to the atlas
                node.item.draw(atlasImage.surface(), node.x, node.y);

                // Record its region
                packed.put(node.item.id, atlasImage.subImage(
                    node.x, node.y, node.width, node.height));
            }});
        }
        return packed;
    }
View Full Code Here

TOP

Related Classes of playn.core.SurfaceImage

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.