Package playn.core

Examples of playn.core.TextLayout.height()


        final TextLayout layout = graphics().layoutText(label, _fmt);
        _rows.add(new Row() {
            public void update () {} // noop
            public float labelWidth () { return 0; }
            public float width () { return layout.width(); }
            public float height() { return layout.height(); }
            public void render (Canvas canvas, float x, float y, float valueX) {
                if (header) canvas.drawLine(0, y-1, canvas.width(), y-1);
                canvas.fillText(layout, x, y);
                float by = y + layout.height();
                if (header) canvas.drawLine(0, by, canvas.width(), by);
View Full Code Here


            public float width () { return layout.width(); }
            public float height() { return layout.height(); }
            public void render (Canvas canvas, float x, float y, float valueX) {
                if (header) canvas.drawLine(0, y-1, canvas.width(), y-1);
                canvas.fillText(layout, x, y);
                float by = y + layout.height();
                if (header) canvas.drawLine(0, by, canvas.width(), by);
            }
        });
    }
View Full Code Here

            public void update () {
                _vlayout = graphics().layoutText(String.valueOf(value.get()), _fmt);
            }
            public float labelWidth () { return llayout.width(); }
            public float width () { return llayout.width() + GAP + _vlayout.width(); }
            public float height() { return Math.max(llayout.height(), _vlayout.height()); }
            public void render (Canvas canvas, float x, float y, float valueX) {
                canvas.fillText(llayout, x, y);
                canvas.fillText(_vlayout, valueX, y);
            }
            protected TextLayout _vlayout;
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.