Lines Matching refs:rectangle

77         RectangleWithTextSelectionLayout(RectF rectangle, int textSelectionLayout) {
78 mRectangle = Preconditions.checkNotNull(rectangle);
93 * A rounded rectangle with a configurable corner radius and the ability to expand outside of
94 * its bounding rectangle and clip against it.
101 * The direction in which the rectangle will perform its expansion. A rectangle can expand
104 * user's action being on the first line will have the top rectangle and expansion direction
126 /** How offset the left edge of the rectangle is from the left side of the bounding box. */
128 /** How offset the right edge of the rectangle is from the left side of the bounding box. */
158 * In order to achieve the "rounded rectangle hits the wall" effect, we draw an expanding
159 * rounded rectangle that is clipped by the bounding box of the selected text.
255 for (RoundedRectangleShape rectangle : mReversedRectangles) {
256 final float rectangleLeftBoundary = boundarySoFar - rectangle.getBoundingWidth();
258 rectangle.setStartBoundary(0);
260 rectangle.setStartBoundary(rectangle.getBoundingWidth());
262 rectangle.setStartBoundary(
263 rectangle.getBoundingWidth() - boundarySoFar + leftBoundary);
272 for (RoundedRectangleShape rectangle : mRectangles) {
273 final float rectangleRightBoundary = rectangle.getBoundingWidth() + boundarySoFar;
275 rectangle.setEndBoundary(rectangle.getBoundingWidth());
277 rectangle.setEndBoundary(0);
279 rectangle.setEndBoundary(rightBoundary - boundarySoFar);
292 for (RoundedRectangleShape rectangle : mRectangles) {
293 sum += rectangle.getBoundingWidth();
308 for (RoundedRectangleShape rectangle : mRectangles) {
309 rectangle.draw(canvas, paint);
383 final RectF rectangle = rectangleWithTextSelectionLayout.getRectangle();
384 if (contains(rectangle, start)) {
388 startingOffset += rectangle.width();
403 final RectF rectangle = rectangleWithTextSelectionLayout.getRectangle();
405 rectangle,
542 * the right boundary of the rectangle.
544 * @param rectangle the rectangle inside which the point should be to be considered "contained"
546 * @return whether the point is inside the rectangle (or on it's right boundary)
548 private static boolean contains(final RectF rectangle, final PointF point) {
551 return x >= rectangle.left && x <= rectangle.right && y >= rectangle.top
552 && y <= rectangle.bottom;