Package pythagoras.f

Examples of pythagoras.f.Rectangle


     * Gets a Region instance bounded by the given dimensions. The given bounds will restricted to
     * the given bounds of this GestureRegionDirector, and null may be returned if suitable bounds
     * are not found or a conflicting region was already defined on this GestureRegionDirector.
     */
    public GestureDirector getRegion (float x, float y, float width, float height) {
        return getRegion(new Rectangle(x, y, width, height));
    }
View Full Code Here


            Log.log.warning("Supplied region is not within our defined bounds", "_bounds", _bounds,
                "bounds", bounds);
            return null;
        }

        Rectangle regionBounds = _bounds.intersection(bounds);
        GestureDirector region = _regions.get(regionBounds);
        if (region != null) return region;

        // make sure we don't intersect any other defined regions
        for (Rectangle existingRegionBounds : _regions.keySet()) {
View Full Code Here

            _viewHeight = 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 {
View Full Code Here

    @Override public int count () {
        return _frames.length;
    }

    @Override public Image frame (int index) {
        Rectangle b = _frames[index].bounds;
        return _source.subImage(b.x, b.y, b.width, b.height);
    }
View Full Code Here

            Json.Object frame = jframes.getObject(ii);
            Json.TypedArray<Float> off = frame.getArray("off", Float.class);
            Json.TypedArray<Float> src = frame.getArray("src", Float.class);
            frames[frame.getInt("idx")] = new Frame(
                new Point(off.get(0), off.get(1)),
                new Rectangle(src.get(0), src.get(1), src.get(2), src.get(3)));
        }
        return frames;
    }
View Full Code Here

     */
    protected static Frame[] parseFrames (float[][] meta) {
        Frame[] frames = new Frame[(meta.length-1)/2];
        for (int ii = 0, mm = 1; ii < frames.length; ii++) {
            frames[ii] = new Frame(new Point(meta[mm][0], meta[mm++][1]),
                                   new Rectangle(meta[mm][0], meta[mm][1],
                                                 meta[mm][2], meta[mm++][3]));
        }
        return frames;
    }
View Full Code Here

            super(text, style);
            assert wrap != null && align != null;
            this.wrap = wrap;
            this.align = align;
            _layouts = graphics().layoutText(text, style, wrap);
            _bounds = TextBlock.getBounds(_layouts, new Rectangle());
            _bounds.width = style.effect.adjustWidth(_bounds.width);
            _bounds.height = style.effect.adjustHeight(_bounds.height);
        }
View Full Code Here

TOP

Related Classes of pythagoras.f.Rectangle

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.