1 31 package org.pdfbox.util; 32 33 import org.pdfbox.pdmodel.font.PDFont; 34 35 41 public class TextPosition 42 { 43 private float x; 44 private float y; 45 private float xScale; 46 private float yScale; 47 private float width; 48 private float height; 49 private float widthOfSpace; 50 private String c; 51 private PDFont font; 52 private float fontSize; 53 private float wordSpacing; 54 55 70 public TextPosition( 71 float xPos, 72 float yPos, 73 float xScl, 74 float yScl, 75 float widthValue, 76 float heightValue, 77 float spaceWidth, 78 String string, 79 PDFont currentFont, 80 float fontSizeValue, 81 float ws 82 ) 83 { 84 this.x = xPos; 85 this.y = yPos; 86 this.xScale = xScl; 87 this.yScale = yScl; 88 this.width = widthValue; 89 this.height = heightValue; 90 this.widthOfSpace = spaceWidth; 91 this.c = string; 92 this.font = currentFont; 93 this.fontSize = fontSizeValue; 94 this.wordSpacing = ws; 95 } 96 97 102 public String getCharacter() 103 { 104 return c; 105 } 106 107 112 public float getX() 113 { 114 return x; 115 } 116 117 122 public float getY() 123 { 124 return y; 125 } 126 127 132 public float getWidth() 133 { 134 return width; 135 } 136 137 142 public float getHeight() 143 { 144 return height; 145 } 146 147 153 public float getFontSize() 154 { 155 return fontSize; 156 } 157 158 163 public PDFont getFont() 164 { 165 return font; 166 } 167 168 173 public float getWordSpacing() 174 { 175 return wordSpacing; 176 } 177 178 185 public float getWidthOfSpace() 186 { 187 return widthOfSpace; 188 } 189 192 public float getXScale() 193 { 194 return xScale; 195 } 196 199 public void setXScale(float scale) 200 { 201 xScale = scale; 202 } 203 206 public float getYScale() 207 { 208 return yScale; 209 } 210 213 public void setYScale(float scale) 214 { 215 yScale = scale; 216 } 217 } | Popular Tags |