Package playn.core

Examples of playn.core.CanvasImage.height()


    @Override public Root setSize (float width, float height) {
        super.setSize(width, height);
        // update the image to the new size, if it's changed
        CanvasImage old = _image.get();
        if (old == null || old.width() != width || old.height() != height) {
            _image.update(graphics().createImage(width, height));
        }
        return this;
    }
View Full Code Here


        @Override protected LayoutData createLayoutData (float hintX, float hintY) {
            return new LayoutData() {
                @Override public Dimension computeSize (float hintX, float hintY) {
                    CanvasImage image = _image.get();
                    return image == null ? new Dimension(0, 0) :
                        new Dimension(image.width(), image.height());
                }
            };
        }

        @Override protected void wasAdded () {
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.