/** * Constructs a <CODE>RectangleReadOnly</CODE>-object starting from the origin * (0, 0) and with a specific rotation (valid values are 0, 90, 180, 270). * * @param urx upper right x * @param ury upper right y * @param rotation the rotation * @since iText 5.0.6 */ public RectangleReadOnly(final float urx, final float ury, final int rotation) { super(0, 0, urx, ury); super.setRotation(rotation); }
/** * Constructs a <CODE>Rectangle</CODE>-object. * * @param llx lower left x * @param lly lower left y * @param urx upper right x * @param ury upper right y * @param rotation the rotation (0, 90, 180, or 270) * @since iText 5.0.6 */ public Rectangle(final float llx, final float lly, final float urx, final float ury, final int rotation) { this(llx, lly, urx, ury); setRotation(rotation); }
/** * Constructs a <CODE>RectangleReadOnly</CODE>-object starting from the origin * (0, 0) and with a specific rotation (valid values are 0, 90, 180, 270). * * @param urx upper right x * @param ury upper right y * @param rotation the rotation * @since iText 5.0.6 */ public RectangleReadOnly(final float urx, final float ury, final int rotation) { super(0, 0, urx, ury); super.setRotation(rotation); }
/** * Constructs a <CODE>Rectangle</CODE>-object. * * @param llx lower left x * @param lly lower left y * @param urx upper right x * @param ury upper right y * @param rotation the rotation (0, 90, 180, or 270) * @since iText 5.0.6 */ public Rectangle(final float llx, final float lly, final float urx, final float ury, final int rotation) { this(llx, lly, urx, ury); setRotation(rotation); }
/** * Constructs a <CODE>RectangleReadOnly</CODE> -object. * * @param llx lower left x * @param lly lower left y * @param urx upper right x * @param ury upper right y * @param rotation the rotation of the Rectangle (0, 90, 180, 270) * @since iText 5.0.6 */ public RectangleReadOnly(final float llx, final float lly, final float urx, final float ury, final int rotation) { super(llx, lly, urx, ury); super.setRotation(rotation); }
/** * Constructs a <CODE>RectangleReadOnly</CODE> -object. * * @param llx lower left x * @param lly lower left y * @param urx upper right x * @param ury upper right y * @param rotation the rotation of the Rectangle (0, 90, 180, 270) * @since iText 5.0.6 */ public RectangleReadOnly(final float llx, final float lly, final float urx, final float ury, final int rotation) { super(llx, lly, urx, ury); super.setRotation(rotation); }
/** * Rotates the rectangle. * Swaps the values of llx and lly and of urx and ury. * * @return the rotated <CODE>Rectangle</CODE> */ public Rectangle rotate() { Rectangle rect = new Rectangle(lly, llx, ury, urx); rect.setRotation(rotation + 90); return rect; }
/** * Rotates the rectangle. * Swaps the values of llx and lly and of urx and ury. * * @return the rotated <CODE>Rectangle</CODE> */ public Rectangle rotate() { Rectangle rect = new Rectangle(lly, llx, ury, urx); rect.setRotation(rotation + 90); return rect; }
Rectangle test = new Rectangle(100, 100, 50, 100, vboManager); mainScene.attachChild(test); System.out.println("Before RotCtrX = " + test.getRotationCenterX()); System.out.println("Before RotCtrY = " + test.getRotationCenterY()); test.setRotation(45); System.out.println("After RotCtrX = " + test.getRotationCenterX()); System.out.println("After RotCtrY = " + test.getRotationCenterY());