1 package net.sf.openrocket.gui.print;
3 import com.itextpdf.text.Rectangle;
4 import com.itextpdf.text.RectangleReadOnly;
6 public enum PaperOrientation {
10 public Rectangle orient(Rectangle rect) {
11 return new RectangleReadOnly(rect);
14 LANDSCAPE("Landscape") {
16 public Rectangle orient(Rectangle rect) {
17 return new RectangleReadOnly(new Rectangle(rect).rotate());
22 private final String name;
24 private PaperOrientation(String name) {
29 * Change the orientation of a portrait paper to the orientation represented by this
32 * @param rect the original paper size rectangle
33 * @return the oriented paper size rectangle
35 public abstract Rectangle orient(Rectangle rect);
39 public String toString() {