| 1 31 package org.pdfbox.util; 32 33 40 public class BoundingBox 41 { 42 private float lowerLeftX; 43 private float lowerLeftY; 44 private float upperRightX; 45 private float upperRightY; 46 47 52 public float getLowerLeftX() 53 { 54 return lowerLeftX; 55 } 56 57 62 public void setLowerLeftX(float lowerLeftXValue) 63 { 64 this.lowerLeftX = lowerLeftXValue; 65 } 66 67 72 public float getLowerLeftY() 73 { 74 return lowerLeftY; 75 } 76 77 82 public void setLowerLeftY(float lowerLeftYValue) 83 { 84 this.lowerLeftY = lowerLeftYValue; 85 } 86 87 92 public float getUpperRightX() 93 { 94 return upperRightX; 95 } 96 97 102 public void setUpperRightX(float upperRightXValue) 103 { 104 this.upperRightX = upperRightXValue; 105 } 106 107 112 public float getUpperRightY() 113 { 114 return upperRightY; 115 } 116 117 122 public void setUpperRightY(float upperRightYValue) 123 { 124 this.upperRightY = upperRightYValue; 125 } 126 127 133 public float getWidth() 134 { 135 return getUpperRightX() - getLowerLeftX(); 136 } 137 138 144 public float getHeight() 145 { 146 return getUpperRightY() - getLowerLeftY(); 147 } 148 149 154 public String toString() 155 { 156 return "[" + getLowerLeftX() + "," + getLowerLeftY() + "," + 157 getUpperRightX() + "," + getUpperRightY() +"]"; 158 } 159 160 } | Popular Tags |