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.
*/
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);
}