Bitmapfont resizen
Übersicht

![]() |
maboxBetreff: Bitmapfont resizen |
![]() Antworten mit Zitat ![]() |
---|---|---|
Hallo, hab ein kleines Problem mit dem ändern der Größe bei einer Bitmapfont. Ich hab ein Spiel welches auf verschiedenen Auflösungen laufen soll, dafür muss ich auch die Schriftgröße ändern. Ich hab das bis jetzt so gelöst, dass bei dem Bild mit der Schrift die Größe verändert wird.
Dann stimmt natürlich die breite der Buchstaben nciht mehr. Deshalb hab ich die auch noch verändert, aber jetzt gibt es immer (je nach Auflösung) horizontale oder vertikale Linien in der Schrift. wie kann ich das ändern? hier das Bild das ich verwende und der Code: Bild: Code: [AUSKLAPPEN] graph_x = 1280
graph_y = 960 Graphics graph_x,graph_y,0,2 ;---------------------------------------------Bitmap Font Wizard Code - *START* Global bmpfile=LoadAnimImage("1280,960.png",59,126,0,10) ResizeImage bmpfile, graph_y/16.27118,.13125*graph_y MaskImage bmpfile,255,255,255 Global bmpfile_frames=9 Dim bmpfile_c(bmpfile_frames) bmpfile_c(0)=48 bmpfile_c(1)=49 bmpfile_c(2)=50 bmpfile_c(3)=51 bmpfile_c(4)=52 bmpfile_c(5)=53 bmpfile_c(6)=54 bmpfile_c(7)=55 bmpfile_c(8)=56 bmpfile_c(9)=57 Dim bmpfile_w(bmpfile_frames) bmpfile_w(0)=graph_y/27.428 bmpfile_w(1)=graph_y/45.714 bmpfile_w(2)=graph_y/25.263 bmpfile_w(3)=graph_y/21.818 bmpfile_w(4)=graph_y/18.113 bmpfile_w(5)=graph_y/25.263 bmpfile_w(6)=graph_y/27.428 bmpfile_w(7)=graph_y/27.428 bmpfile_w(8)=graph_y/38.4 bmpfile_w(9)=graph_y/27.428 Function bmpfile_txt(x,y,txt$) charcount1=Len(txt$) For i=1 To charcount1 char=Asc(Mid(txt$,i,1)) If char=32 x=x+39 Else For j=0 To bmpfile_frames If bmpfile_c(j)=char Then DrawImage bmpfile,x,y,j x=x+bmpfile_w(j) Exit EndIf Next EndIf Next End Function ;---------------------------------------------Bitmap Font Wizard Code - *END* ClsColor 0,255,0 Cls bmpfile_txt (10,10,"10 20 30 40 50 60 70 80 90 100") bmpfile_txt (10,100,"134567890") Flip WaitKey() |
||
Fujitsu-Siemens Laptop, 2Ghz Intel Core2Duo Prozessor, 2GB Ram, 120GB Festplatte, ATI Mobility Radeon X1400, Windows Vista Ultimate
www.mausoft.de.tl Dönerfresser Homepage |
![]() |
Shogo |
![]() Antworten mit Zitat ![]() |
---|---|---|
Nur so nee Idee.
Vielleicht liegt es daran das du noch TFormFilter ![]() Mfg Shogo |
||
![]() |
mabox |
![]() Antworten mit Zitat ![]() |
---|---|---|
nein das ändert nichts, die linien sind immernoch da.
Ich habe die Vermutung, das es an den Kommastellen liegt die bei der teilung der Buchstabenbreite berechnet werden. |
||
Fujitsu-Siemens Laptop, 2Ghz Intel Core2Duo Prozessor, 2GB Ram, 120GB Festplatte, ATI Mobility Radeon X1400, Windows Vista Ultimate
www.mausoft.de.tl Dönerfresser Homepage |
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group