com.golden.gamedev.object.font
Class AdvanceBitmapFont
java.lang.Object
|
+--com.golden.gamedev.object.font.BitmapFont
|
+--com.golden.gamedev.object.font.AdvanceBitmapFont
- All Implemented Interfaces:
- GameFont
- public class AdvanceBitmapFont
- extends BitmapFont
Method Summary |
int |
getWidth(char c)
Returns width of char c using this font. |
int |
getWidth(String st)
Returns width of String st using this font. |
AdvanceBitmapFont
public AdvanceBitmapFont(BufferedImage[] imagefont)
- Constructs new
AdvanceBitmapFont
with specified images.
Use this if the bitmap font have different size.
If the bitmap have equal size use standard
BitmapFont
.
The right image font sequence:
! " # $ % & ' ( ) * + , - . / 0 1 2 3
4 5 6 7 8 9 : ; < = > ? @ A B C D E F G
H I J K L M N O P Q R S T U V W X Y Z [
\ ] ^ _ ' a b c d e f g h i j k l m n o
p q r s t u v w x y z { | } ~
- Parameters:
imagefont
- font images in sequence, all font height must same- See Also:
BitmapFont
getWidth
public int getWidth(char c)
- Description copied from interface:
GameFont
- Returns width of
char c
using this font.
- Specified by:
getWidth
in interface GameFont
- Overrides:
getWidth
in class BitmapFont
- Returns:
- char width, in pixel
getWidth
public int getWidth(String st)
- Description copied from interface:
GameFont
- Returns width of
String st
using this font.
- Specified by:
getWidth
in interface GameFont
- Overrides:
getWidth
in class BitmapFont
- Returns:
- String width, in pixel