Example #1
0
 public int stringHeight(String message) {
   if (LSystem.base() == null) {
     return 0;
   }
   initLayout(message);
   return textLayout.bounds.height;
 }
Example #2
0
 public int charHeight(char ch) {
   if (LSystem.base() == null) {
     return 0;
   }
   initLayout(String.valueOf(ch));
   return textLayout.bounds.height;
 }
Example #3
0
 public int stringWidth(String message) {
   if (LSystem.base() == null) {
     return 0;
   }
   initLayout(message);
   return textLayout.stringWidth(message);
 }
Example #4
0
 public int charWidth(char ch) {
   if (LSystem.base() == null) {
     return 0;
   }
   initLayout(String.valueOf(ch));
   return textLayout.bounds.width;
 }
Example #5
0
 public float getLeading() {
   initLayout(tmp);
   return textLayout.leading();
 }
Example #6
0
 public float getDescent() {
   initLayout(tmp);
   return textLayout.descent();
 }
Example #7
0
 @Override
 public float getAscent() {
   initLayout(tmp);
   return this._ascent == -1 ? textLayout.ascent() : this._ascent;
 }
Example #8
0
 @Override
 public int getHeight() {
   initLayout(tmp);
   return textLayout.bounds.height;
 }