Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 207b436c authored by Ruben Brunk's avatar Ruben Brunk Committed by Android Git Automerger
Browse files

am ea2fa83c: Setup geometry xforms and propogation chain.

* commit 'ea2fa83c':
  Setup geometry xforms and propogation chain.
parents 5875c082 ea2fa83c
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -53,6 +53,16 @@ public class BoundedRect {
            reconstrain();
    }

    public void resetTo(float rotation, RectF outerRect, RectF innerRect) {
        rot = rotation;
        outer.set(outerRect);
        inner.set(innerRect);
        innerRotated = CropMath.getCornersFromRect(inner);
        rotateInner();
        if (!isConstrained())
            reconstrain();
    }

    /**
     * Sets inner, and re-constrains it to fit within the rotated bounding rect.
     */
+6 −2
Original line number Diff line number Diff line
@@ -55,11 +55,15 @@ public class CropObject {
        mBoundedRect = new BoundedRect(outerAngle % 360, outerBound, innerBound);
    }

    public void setToInnerBounds(RectF r) {
    public void resetBoundsTo(RectF inner, RectF outer) {
        mBoundedRect.resetTo(0, outer, inner);
    }

    public void getInnerBounds(RectF r) {
        mBoundedRect.setToInner(r);
    }

    public void setToOuterBounds(RectF r) {
    public void getOuterBounds(RectF r) {
        mBoundedRect.setToOuter(r);
    }