1 31 package org.pdfbox.pdmodel.text; 32 33 import org.pdfbox.pdmodel.font.PDFont; 34 35 42 public class PDTextState implements Cloneable 43 { 44 47 public static final int RENDERING_MODE_FILL_TEXT = 0; 48 51 public static final int RENDERING_MODE_STROKE_TEXT = 1; 52 55 public static final int RENDERING_MODE_FILL_THEN_STROKE_TEXT = 2; 56 59 public static final int RENDERING_MODE_NEITHER_FILL_NOR_STROKE_TEXT = 3; 60 63 public static final int RENDERING_MODE_FILL_TEXT_AND_ADD_TO_PATH_FOR_CLIPPING = 4; 64 67 public static final int RENDERING_MODE_STROKE_TEXT_AND_ADD_TO_PATH_FOR_CLIPPING = 5; 68 71 public static final int RENDERING_MODE_FILL_THEN_STROKE_TEXT_AND_ADD_TO_PATH_FOR_CLIPPING = 6; 72 75 public static final int RENDERING_MODE_ADD_TEXT_TO_PATH_FOR_CLIPPING = 7; 76 77 78 private float characterSpacing = 0; 80 private float wordSpacing = 0; 81 private float horizontalScaling = 100; 82 private float leading = 0; 83 private PDFont font; 84 private float fontSize; 85 private int renderingMode = 0; 86 private float rise = 0; 87 private boolean knockout = true; 88 89 94 public float getCharacterSpacing() 95 { 96 return characterSpacing; 97 } 98 99 104 public void setCharacterSpacing(float value) 105 { 106 characterSpacing = value; 107 } 108 109 114 public float getWordSpacing() 115 { 116 return wordSpacing; 117 } 118 119 124 public void setWordSpacing(float value) 125 { 126 wordSpacing = value; 127 } 128 129 136 public float getHorizontalScalingPercent() 137 { 138 return horizontalScaling; 139 } 140 141 146 public void setHorizontalScalingPercent(float value) 147 { 148 horizontalScaling = value; 149 } 150 151 156 public float getLeading() 157 { 158 return leading; 159 } 160 161 166 public void setLeading(float value) 167 { 168 leading = value; 169 } 170 171 176 public PDFont getFont() 177 { 178 return font; 179 } 180 181 186 public void setFont(PDFont value) 187 { 188 font = value; 189 } 190 191 196 public float getFontSize() 197 { 198 return fontSize; 199 } 200 201 206 public void setFontSize(float value) 207 { 208 fontSize = value; 209 } 210 211 216 public int getRenderingMode() 217 { 218 return renderingMode; 219 } 220 221 226 public void setRenderingMode(int value) 227 { 228 renderingMode = value; 229 } 230 231 236 public float getRise() 237 { 238 return rise; 239 } 240 241 246 public void setRise(float value) 247 { 248 rise = value; 249 } 250 251 256 public boolean getKnockoutFlag() 257 { 258 return knockout; 259 } 260 261 266 public void setKnockoutFlag(boolean value) 267 { 268 knockout = value; 269 } 270 271 274 public Object clone() 275 { 276 try 277 { 278 return super.clone(); 279 } 280 catch (CloneNotSupportedException ignore) 281 { 282 } 284 return null; 285 } 286 } | Popular Tags |