Autor Beitrag
[r2d2]
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 109

WinXP
D5 Enterprise
BeitragVerfasst: Mi 12.11.03 20:22 
Hi
Wenn man mit Canvas.textout einen Text in ein Bild schreibt, wird der Bereich, in dem der Text steht, weiß. Wie kann man das abstellen, damit nur der Text in die Bitmap geschreiben wird?
MSCH
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1448
Erhaltene Danke: 3

W7 64
XE2, SQL, DevExpress, DevArt, Oracle, SQLServer
BeitragVerfasst: Mi 12.11.03 21:05 
mir ist bei der VCL keine Möglichkeit bekannt, allerdings bei Verwendung der API gehts.
statt Cavas.Textout(...)

schreibe
MyRect ist ein TRect wo die Ausgabe erfolgen soll und S ist ein String
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
with Canvas do begin
          SetBkMode(Handle,TRANSPARENT);
          SetTextColor(Handle,clWhite); // Textfarbe !!
          DrawText(Handle,@s1[1],length(s1),MyRect,dt_left);
end


grez
msch

_________________
ist das politisch, wenn ich linksdrehenden Joghurt haben möchte?
obbschtkuche
Gast
Erhaltene Danke: 1



BeitragVerfasst: Mi 12.11.03 21:55 
wie wärs mit

ausblenden Delphi-Quelltext
1:
canvas.brush.style := bsClear;					


?
[r2d2] Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 109

WinXP
D5 Enterprise
BeitragVerfasst: Mi 12.11.03 23:58 
:D Danke