/** * Sets the bounding height of this template. * * @param height the bounding height */ public void setHeight(float height) { bBox.setBottom(0); bBox.setTop(height); }
/** * Sets the bounding height of this template. * * @param height the bounding height */ public void setHeight(float height) { bBox.setBottom(0); bBox.setTop(height); }
/** * Gets a Rectangle that is altered to fit on the page. * * @param top the top position * @param bottom the bottom position * @return a <CODE>Rectangle</CODE> */ public Rectangle rectangle(final float top, final float bottom) { Rectangle tmp = new Rectangle(this); if (getTop() > top) { tmp.setTop(top); tmp.disableBorderSide(TOP); } if (getBottom() < bottom) { tmp.setBottom(bottom); tmp.disableBorderSide(BOTTOM); } return tmp; }
/** * Gets a Rectangle that is altered to fit on the page. * * @param top the top position * @param bottom the bottom position * @return a <CODE>Rectangle</CODE> */ public Rectangle rectangle(final float top, final float bottom) { Rectangle tmp = new Rectangle(this); if (getTop() > top) { tmp.setTop(top); tmp.disableBorderSide(TOP); } if (getBottom() < bottom) { tmp.setBottom(bottom); tmp.disableBorderSide(BOTTOM); } return tmp; }
scaledBox.setRight(smallestBox.getLeft() + (smallestBox.getWidth() * (1 - rotRatios[2]))); scaledBox.setTop(smallestBox.getBottom() + (smallestBox.getHeight() * (1 - rotRatios[3])));
scaledBox.setRight(smallestBox.getLeft() + (smallestBox.getWidth() * (1 - rotRatios[2]))); scaledBox.setTop(smallestBox.getBottom() + (smallestBox.getHeight() * (1 - rotRatios[3])));