diff options
Diffstat (limited to 'bitmapfont.mod/bitmapfont.bmx')
-rw-r--r-- | bitmapfont.mod/bitmapfont.bmx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bitmapfont.mod/bitmapfont.bmx b/bitmapfont.mod/bitmapfont.bmx index bcb98c5..35feb10 100644 --- a/bitmapfont.mod/bitmapfont.bmx +++ b/bitmapfont.mod/bitmapfont.bmx @@ -21,6 +21,8 @@ Type TBitmapFont Field height:Int[NOCHR] Field width:Int[NOCHR] Field is_fixed:Int + Field max_width:Int + Field max_height:Int Function Load:TBitmapFont(path:String, image_flags:Int) Local fnt:TBitmapFont @@ -41,11 +43,17 @@ Type TBitmapFont Return Null EndIf + fnt.max_width=-1 + fnt.max_height=-1 + fnt.is_fixed=Readint(str) For f=0 Until NOCHR fnt.width[f]=Readint(str) fnt.height[f]=Readint(str) + + fnt.max_width=Max(fnt.max_width,fnt.width[f]) + fnt.max_height=Max(fnt.max_height,fnt.height[f]) fnt.img[f]=CreateImage(fnt.width[f],fnt.height[f],1,image_flags) @@ -127,5 +135,13 @@ Type TBitmapFont Return h End Method + + Method MaxWidth:Int() + Return max_width + End Method + + Method MaxHeight:Int() + Return max_height + End Method End Type |