Advertisement
SVXX

CharacterBean

Mar 14th, 2014
404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.92 KB | None | 0 0
  1. public class CharBean
  2. {
  3.     double textAdjXPos; //Text adjusted X-position of character
  4.     double textAdjYPos; //Text adjusted Y-position
  5.     double fontSize; //Font size
  6.     double xScale; //x-scale
  7.     double textHeight; //Maximum height of all characters in the string
  8.     double textSpace; //Width of the whitespace character
  9.     double textWidth; //Text direction adjusted string width
  10.     String character; //The character itself
  11.    
  12.     public CharBean(String container)
  13.     {
  14.         String[] values = container.split(",");
  15.        
  16.         int i = 0;
  17.         this.textAdjXPos = Double.parseDouble(values[i++]);
  18.         this.textAdjYPos = Double.parseDouble(values[i++]);
  19.         this.fontSize = Double.parseDouble(values[i++]);
  20.         this.xScale = Double.parseDouble(values[i++]);
  21.         this.textHeight = Double.parseDouble(values[i++]);
  22.         this.textSpace = Double.parseDouble(values[i++]);
  23.         this.textWidth = Double.parseDouble(values[i++]);
  24.         this.character = values[i];
  25.     }
  26.    
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement