Package pythagoras.f

Examples of pythagoras.f.IRectangle.height()


            maybeScrollToBottom();
        }

        @Override public void setPosition (float x, float y) {
            IRectangle bounds = bounds(new Rectangle());
            if (_viewHeight > bounds.height()) {
                // nail the group to the bottom of the scroll area.
                layer.setTranslation(x, _viewHeight - bounds.height());
                _atBottom = true;
            } else {
                layer.setTranslation(x, (float)Math.floor(y));
View Full Code Here


        @Override public void setPosition (float x, float y) {
            IRectangle bounds = bounds(new Rectangle());
            if (_viewHeight > bounds.height()) {
                // nail the group to the bottom of the scroll area.
                layer.setTranslation(x, _viewHeight - bounds.height());
                _atBottom = true;
            } else {
                layer.setTranslation(x, (float)Math.floor(y));
                _atBottom = -y == bounds.height() - _viewHeight;
            }
View Full Code Here

                // nail the group to the bottom of the scroll area.
                layer.setTranslation(x, _viewHeight - bounds.height());
                _atBottom = true;
            } else {
                layer.setTranslation(x, (float)Math.floor(y));
                _atBottom = -y == bounds.height() - _viewHeight;
            }
            schedule();
        }

        public void addEntry (Entry e) {
View Full Code Here

        @Override public void render (Canvas canvas, TextLayout text, int textColor,
            boolean underlined, float x, float y) {
            canvas.save();
            if (underlined) {
                IRectangle bounds = text.bounds();
                float sx = x + bounds.x() + 1, sy = y + bounds.y() + bounds.height() + 2;
                canvas.setFillColor(outlineColor).fillRect(sx-1, sy-1, bounds.width()+3, 3);
                canvas.setFillColor(textColor).fillRect(sx, sy, bounds.width(), 1);
            }
            canvas.setFillColor(outlineColor);
            canvas.fillText(text, x+0, y+0);
View Full Code Here

            canvas.setFillColor(textColor);
            canvas.fillText(text, x+outlineWidth, y+outlineWidth);
            if (underlined) {
                IRectangle bounds = text.bounds();
                float sx = x + bounds.x() + outlineWidth;
                float sy = y + bounds.y() + bounds.height() + outlineWidth + 1;
                canvas.fillRect(sx, sy, bounds.width(), 1);
            }
            canvas.restore();
        }
View Full Code Here

            float sx = (shadowX < 0) ? 0 : shadowX, sy = (shadowY < 0) ? 0 : shadowY;
            canvas.save();
            if (underlined) {
                IRectangle bounds = text.bounds();
                canvas.setFillColor(shadowColor).fillRect(
                    sx+bounds.x()+x, sy+bounds.y()+bounds.height()+1, bounds.width()+1, 1);
                canvas.setFillColor(textColor).fillRect(
                    tx+bounds.x()+x, ty+bounds.y()+bounds.height()+1, bounds.width()+1, 1);
            }
            canvas.setFillColor(shadowColor);
            canvas.fillText(text, x+sx, y+sy);
View Full Code Here

            if (underlined) {
                IRectangle bounds = text.bounds();
                canvas.setFillColor(shadowColor).fillRect(
                    sx+bounds.x()+x, sy+bounds.y()+bounds.height()+1, bounds.width()+1, 1);
                canvas.setFillColor(textColor).fillRect(
                    tx+bounds.x()+x, ty+bounds.y()+bounds.height()+1, bounds.width()+1, 1);
            }
            canvas.setFillColor(shadowColor);
            canvas.fillText(text, x+sx, y+sy);
            canvas.setFillColor(textColor);
            canvas.fillText(text, x+tx, y+ty);
View Full Code Here

                PlayN.graphics().createLinearGradient(0, 0, 0, text.height(), colors, positions));
            canvas.fillText(text, x, y);

            if (underlined) {
                IRectangle bounds = text.bounds();
                float sx = x + bounds.x(), sy = y + bounds.y() + bounds.height() + 1;
                canvas.fillRect(sx, sy, bounds.width(), 1);
            }

            canvas.restore();
        }
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.