Examples of height()


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

Examples of playn.core.CanvasImage.height()

        @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

Examples of playn.core.ImageLayer.height()

                String instanceDesc;
                if (instance instanceof Movie) {
                    instanceDesc = ((Movie) instance).symbol().name();
                } else if (instance instanceof Texture) {
                    ImageLayer tLayer = ((Texture) instance).layer();
                    instanceDesc = "Texture (" + tLayer.width() + " x " + tLayer.height() + ")";
                    if (tLayer.destroyed()) {
                        instanceDesc += " (DESTROYED)";
                    }
                } else if (instance != null) {
                    instanceDesc = instance.toString();
View Full Code Here

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

Examples of playn.core.TextLayout.height()

            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

Examples of playn.core.TextLayout.height()

            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

Examples of pythagoras.f.Dimension.height()

            for (; elemIdx < m.rowBreaks.get(row).intValue(); ++elemIdx) {
                Element<?> elem = elems.childAt(elemIdx);
                if (!elem.isVisible()) continue;
                IDimension esize = preferredSize(elem, width, height);
                if (_valign == null) {
                    setBounds(elem, x, y, esize.width(), rowSize.height());
                } else {
                    setBounds(elem, x, y + _valign.offset(esize.height(), rowSize.height()),
                        esize.width(), esize.height());
                }
                x += esize.width() + _hgap;
View Full Code Here

Examples of pythagoras.f.Dimension.height()

                if (!elem.isVisible()) continue;
                IDimension esize = preferredSize(elem, width, height);
                if (_valign == null) {
                    setBounds(elem, x, y, esize.width(), rowSize.height());
                } else {
                    setBounds(elem, x, y + _valign.offset(esize.height(), rowSize.height()),
                        esize.width(), esize.height());
                }
                x += esize.width() + _hgap;
            }
            y += _vgap + rowSize.height;
View Full Code Here

Examples of pythagoras.f.IDimension.height()

        float bx = _elementBuffer.width(), by = _elementBuffer.height();
        for (Element<?> child : (Container<?>)content) {
            IDimension size = child.size();
            if (child.isVisible()) child.layer.setVisible(
                child.x() - bx < x + wid && child.x() + size.width() + bx > x &&
                child.y() - by < y + hei && child.y() + size.height() + by > y);
        }
    }

    /** Dispatches a {@link Listener#viewChanged()} to listeners. */
    protected void fireViewChanged () {
View Full Code Here

Examples of pythagoras.f.IDimension.height()

            // only compute the preferred size for the fixed elements in this pass
            Constraint c = constraint(elem);
            if (!c.stretch) {
                IDimension psize = preferredSize(elem, hintX, hintY);
                float pwidth = psize.width(), pheight = psize.height();
                m.prefWidth += pwidth;
                m.prefHeight += pheight;
                m.maxWidth = Math.max(m.maxWidth, pwidth);
                m.maxHeight = Math.max(m.maxHeight, pheight);
                m.fixWidth += pwidth;
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.