Autor Beitrag
LonghornUser
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 796



BeitragVerfasst: Sa 18.08.07 14:42 
Hallo,

ich habe hier 3 Zeilen Text. Damit ich diesen nicht immer von Hand in eine Bitmap Datei schreiben muss, gibt es eine Möglichkeit, wie ich den Text in ein Bitmap "übersetzen" kann ? Es soll dann auch fixe Maße haben, was Breite und Höhe angeht.

Danke vielmals für alle Hinweise.

Ciao LHUSer
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Sa 18.08.07 14:47 
Ich versteh nicht ganz, du willst einen Text im Bitmapformat speichern? Einfach auf ein TBitmap per Textout schreiben und per SaveToFile speichern, denke ich.

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
LonghornUser Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 796



BeitragVerfasst: Sa 18.08.07 15:37 
Ja, so in etwa.
Nur muss die Schrift Tahoma, 8pt sein. Geht das ?
Ich habe das jetzt mal so gemacht, aber das Image bleibt leer:
ausblenden Delphi-Quelltext
1:
2:
3:
  Bmp := TBitmap.Create;
  Bmp.Canvas.TextOut(0,0,'Dennis Patzer');
  Bmp.SaveToFile('C:\bmp.bmp');
arj
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 378

Win XP/Vista, Debian, (K)Ubuntu
Delphi 5 Prof, Delphi 7 Prof, C# (#Develop, VS 2005), Java (Eclipse), C++, QT, PHP, Python
BeitragVerfasst: Sa 18.08.07 15:46 
Du musst vorher noch eine Größe setzen:
ausblenden Delphi-Quelltext
1:
2:
bmp.Width:=100;
bmp.height:=100;


und später nicht vergessen das Bitmap freizugeben!
ausblenden Delphi-Quelltext
1:
FreeAndNil(bmp);					
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Sa 18.08.07 16:01 
Was hindert dich daran, mit BMP.Canvas.Font die Schrift zu ändern???

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
LonghornUser Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 796



BeitragVerfasst: Sa 18.08.07 16:06 
@ BenBE: Mich hinderte die Unkenntnis dieser Funktion ...

So klappt es ! Danke !
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Sa 18.08.07 18:07 
Dafür besitzt Delphi ja eine Hilfe, die einen Suchindex hat ;-)

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.