Autor Beitrag
Luzzifus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 200

Win2K
D6 Prof
BeitragVerfasst: So 11.06.06 15:58 
Hallo,

ich arbeite mit graphics32 und möchte auf einen transparenten Layer etwas mit TextOut schreiben.

Der Layer wird initialisiert:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
  with L2.Bitmap do begin
    DrawMode := dmBlend;
    width := mapW;
    height := mapH;
    ResetAlpha(0);
    Font.Color := clBlue;
  end;


Wenn ich jetzt allerdings mit TextOut etwas drauf schreibe..

ausblenden Delphi-Quelltext
1:
L2.Bitmap.Textout(x-disx, y-disy-15, 'hallo');					


.. dann macht er das zwar, malt den Text aber transparent. Logisch, denn der Alpha-Kanal des gesamten Bitmaps ist auf 0 gesetzt und TBitmap32.Font.Color hat keinen Alpha Kanal. Ich hätte den Text aber schon gern gesehen. Ich müsste also für den Text noch irgendwie den Alpha Kanal setzen. Wie kann ich das anstellen?

(Ich kann auch nicht direkt auf den Hintergrund zeichnen, da sich auf dem Layer noch andere Dinge befinden, die sich auch dynamisch ändern.)

so long,
luzzi.
Luzzifus Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 200

Win2K
D6 Prof
BeitragVerfasst: So 11.06.06 16:38 
Hm ja, es geht mit TBitmap32.RenderText. ^^