Autor Beitrag
Borlox
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 191

Win XP
Delphi 6 Enterprise
BeitragVerfasst: Do 12.12.02 16:45 
Hi Leute,

wie kann man am besten Text mit DelphiX darstellen lassen??
Ich möchte aber den Text verändern können, also andere Schriftart und Schriftgröße!!! Besonders die Größe ist wichtig!

Danke
fcg
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 360

WinXP
D3 Prof, D6 Pers
BeitragVerfasst: Do 12.12.02 17:08 
indem du die DXDraw fläche als canvas benutzt und daraufs den text darstellen läßt.

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
with DXDraw1.surface.canvas do
 begin
 font.color:=clred;
 font.size:=14;
 texout(10,10,'halooooooo'); // zahlen sind x und y koordinaten
 end;

_________________
.: Wer für alles offen ist, kann nicht ganz dicht sein! :.
Borlox Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 191

Win XP
Delphi 6 Enterprise
BeitragVerfasst: Do 12.12.02 17:37 
Titel: Leider
Bisher sah mein Programm so aus, dass ich auf den gesamten Hintergrund ein Bild gelegt habe und nun eigentlich da etwas raufschreiben wollte,aber wenn ich jetzt den oben genannten Code eingebe, dann zeigt er nicht einmal mein Bild mehr an, sondern macht einfach alles schwarz!!

????

Borlox

p.s. Was ist eigentlich ein Canvas?
Sephiroth
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 102



BeitragVerfasst: Fr 13.12.02 17:13 
Malst du zuerst das Bild oder den Text?
Borlox Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 191

Win XP
Delphi 6 Enterprise
BeitragVerfasst: Fr 13.12.02 23:23 
Titel: Bild
Ich male erst das Bild und dann den Text!
Aber es ist trotzdem alles schwarz!!!!!!!!!!!!
fcg
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 360

WinXP
D3 Prof, D6 Pers
BeitragVerfasst: Fr 13.12.02 23:39 
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
DXImageList1.items[0].draw(DXDraw1.surface,0,0,0);
with DXDraw1.Surface.Canvas do
  begin
   Brush.Style := bsClear;
   Font.Color := clgray;
   Font.Size := 10;
   Textout(230, 256, grins');
   Release;
  end;


müßte funzen :roll:

_________________
.: Wer für alles offen ist, kann nicht ganz dicht sein! :.
mimi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Do 26.12.02 18:29 
so mache ich das auch immer ;)

MFG
mimi