Hi,
das mit der Schrift zweimal ausgeben funktioniert nicht (zumindest nicht bei mir), da er die Schrift in einem Rechteck ausgibt und dieses Rechteck füllt. Somit würde der Schatten dann übermalt.
Ich hab es (etwas aufwendiger) so gemacht:
Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28:
| var schrift,schatten:tbitmap; begin
schatten:=tbitmap.create; with schatten do begin Transparent:=true; canvas.Brush.color:=clwhite; canvas.Rectangle(0,0,100,20); Width:=100; Height:=50; Canvas.Font.Color := clblue; Canvas.TextOut(10, 10, 'Hallo Welt !!!'); end; form1.Canvas.Draw(10,10,Schatten);
schrift:=tbitmap.create; with schrift do begin Transparent:=true; canvas.Brush.color:=clwhite; canvas.Rectangle(0,0,100,20); Width:=100; Height:=50; Canvas.Font.Color := clblack; Canvas.TextOut(10, 10, 'Hallo Welt !!!'); end; form1.Canvas.Draw(8,8,Schrift); |
über Sinn und Unsinn dieser Lösung bin ich mir nicht so sicher, auch sieht es leider nicht sonderlich aus.
Visum