Lines Matching defs:bounds

153  *   Rectangle2D bounds = layout.getBounds();
154 * bounds.setRect(bounds.getX()+loc.getX(),
155 * bounds.getY()+loc.getY(),
156 * bounds.getWidth(),
157 * bounds.getHeight());
158 * g.draw(bounds);
282 * Natural bounds is used internally. It is built on demand in
723 * The 'natural bounds' encloses all the carets the layout can draw.
959 * Returns the bounds of this <code>TextLayout</code>.
960 * The bounds are in standard coordinates.
961 * <p>Due to rasterization effects, this bounds might not enclose all of the
965 * @return a {@link Rectangle2D} that is the bounds of this
982 Rectangle2D bounds = new Rectangle2D.Float();
983 bounds.setRect(boundsRect);
985 return bounds;
989 * Returns the pixel bounds of this <code>TextLayout</code> when
1117 Rectangle2D bounds,
1181 info[1] = (float) ((topX - bottomX) / bounds.getWidth());
1182 info[0] = (float) (topX + (info[1]*bounds.getX()));
1185 info[1] = (float) ((topX - bottomX) / bounds.getHeight());
1186 info[0] = (float) (bottomX + (info[1]*bounds.getMaxY()));
1202 * @param bounds the bounds to which the caret info is constructed.
1203 * The bounds is in baseline-relative coordinates.
1209 public float[] getCaretInfo(TextHitInfo hit, Rectangle2D bounds) {
1213 return getCaretInfoTestInternal(hit, bounds);
1221 // these values are trimmed to the bounds where required to fit,
1223 private float[] getCaretInfoTestInternal(TextHitInfo hit, Rectangle2D bounds) {
1230 getCaretInfo(hitToCaret(hit), bounds, info);
1306 * uses the natural bounds of this <code>TextLayout</code>.
1396 * If the hit character index is out of bounds, an
1436 throw new IllegalArgumentException("Offset out of bounds in TextLayout.getNextRightHit()");
1478 * If the hit character index is out of bounds, an
1522 throw new IllegalArgumentException("Offset out of bounds in TextLayout.getNextLeftHit()");
1623 private double[] getCaretPath(TextHitInfo hit, Rectangle2D bounds) {
1624 float[] info = getCaretInfo(hit, bounds);
1637 private double[] getCaretPath(int caret, Rectangle2D bounds,
1640 float[] info = getCaretInfo(caret, bounds, null);
1648 double left = bounds.getX();
1649 double right = left + bounds.getWidth();
1650 double top = bounds.getY();
1651 double bottom = top + bounds.getHeight();
1769 * hit inside the specified bounds.
1771 * @param bounds the bounds of the <code>TextLayout</code> to use
1772 * in generating the caret. The bounds is in baseline-relative
1777 public Shape getCaretShape(TextHitInfo hit, Rectangle2D bounds) {
1781 if (bounds == null) {
1785 return pathToShape(getCaretPath(hit, bounds), false, textLine.getLayoutPath());
1790 * hit inside the natural bounds of this <code>TextLayout</code>.
1855 * @param bounds the bounds to which to extend the carets. The
1856 * bounds is in baseline-relative coordinates.
1863 public Shape[] getCaretShapes(int offset, Rectangle2D bounds, CaretPolicy policy) {
1868 throw new IllegalArgumentException("Offset out of bounds in TextLayout.getCaretShapes()");
1871 if (bounds == null) {
1886 Shape hitShape = pathToShape(getCaretPath(hit, bounds), false, lp);
1894 Shape otherShape = pathToShape(getCaretPath(otherHit, bounds), false, lp);
1917 * @param bounds the bounds to which to extend the carets. This is
1923 public Shape[] getCaretShapes(int offset, Rectangle2D bounds) {
1925 return getCaretShapes(offset, bounds, DEFAULT_CARET_POLICY);
1932 * object's natural bounds.
1993 // {jbr} Shape is never outside of bounds.
1996 Rectangle2D bounds) {
2004 return boundingShape(getCaretPath(caret0, bounds, true),
2005 getCaretPath(caret1, bounds, true));
2011 * Shape is never outside of bounds.
2013 private GeneralPath leftShape(Rectangle2D bounds) {
2017 path0 = new double[] { bounds.getX(), bounds.getY(),
2018 bounds.getX() + bounds.getWidth(),
2019 bounds.getY() };
2021 path0 = new double[] { bounds.getX(),
2022 bounds.getY() + bounds.getHeight(),
2023 bounds.getX(), bounds.getY() };
2026 double[] path1 = getCaretPath(0, bounds, true);
2035 private GeneralPath rightShape(Rectangle2D bounds) {
2039 bounds.getX(),
2040 bounds.getY() + bounds.getHeight(),
2041 bounds.getX() + bounds.getWidth(),
2042 bounds.getY() + bounds.getHeight()
2046 bounds.getX() + bounds.getWidth(),
2047 bounds.getY() + bounds.getHeight(),
2048 bounds.getX() + bounds.getWidth(),
2049 bounds.getY()
2053 double[] path0 = getCaretPath(characterCount, bounds, true);
2135 * extended to <code>bounds</code>.
2138 * is extended to the left (top) of <code>bounds</code>. If the
2140 * is extended to the right (bottom) of the bounds. The height
2142 * <code>bounds</code>.
2159 * selected, the selection is extended to the right of the bounds.
2162 * @param bounds the bounding rectangle to which to extend the selection.
2171 Rectangle2D bounds)
2178 if(bounds == null) {
2187 result.append(caretBoundingShape(firstCaret, secondCaret, bounds),
2191 GeneralPath ls = leftShape(bounds);
2197 GeneralPath rs = rightShape(bounds);
2213 * specified range, extended to the bounds. This method is a
2215 * uses the natural bounds of this <code>TextLayout</code>.
2228 * specified range, extended to the specified <code>bounds</code>.
2231 * selection is extended to the portion of <code>bounds</code> before
2234 * of <code>bounds</code> after the end of this <code>TextLayout</code>.
2236 * extended to <code>bounds</code>.
2251 * of the <code>bounds</code> before the start of the layout, which in
2253 * <code>bounds</code>.
2259 * @param bounds the bounding rectangle to which to extend the selection.
2267 Rectangle2D bounds) {
2268 if (bounds == null) {
2317 result.append(caretBoundingShape(carets[i], carets[i+1], bounds),
2324 GeneralPath ls = leftShape(bounds);
2333 GeneralPath rs = rightShape(bounds);
2349 * specified range, extended to the natural bounds of this
2351 * <code>getLogicalHighlightShape</code> that uses the natural bounds of
2367 * Returns the black box bounds of the characters in the specified range.
2368 * The black box bounds is an area consisting of the union of the bounding
2374 * @return a <code>Shape</code> enclosing the black box bounds. This is
2442 * Coordinates outside the bounds of the <code>TextLayout</code>
2451 * @param bounds the bounds of the <code>TextLayout</code>. This
2456 public TextHitInfo hitTestChar(float x, float y, Rectangle2D bounds) {
2469 if (y < bounds.getMinY()) {
2471 } else if (y >= bounds.getMaxY()) {
2475 if (x < bounds.getMinX()) {
2477 } else if (x >= bounds.getMaxX()) {
2486 // bounds, pick the closest one, then see which side of the character's
2548 * <code>hitTestChar</code> that uses the natural bounds of this