Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
Delphi 10.2 Tokyo Professional
|
Re: Bitmapgröße an Textgröße anpassen?
5. Aug 2006, 12:56
du machst für jede zeile ein Bitmap.
Am besten so etwa:
Delphi-Quellcode:
var Bmps: Array of TBitmap;
procedure Ka;
begin
SetLength(Bmps,Memo1.Lines.Count);
for i:= 0 to Memo1.Lines.Count-1 do begin
Bmps[i] := TBitmap.Create;
with Bmps[i] do begin
Canvas.Font := Memo1.Font;
Height := Canvas.TextHeight(Memo1.Lines[i]);
Width := Canvas.TextHeight(Memo1.Lines[i]);
transparentcolor := clWhite;
transparent := true;
// canvas.TextOut(0,0,edt_text.Text); ka irgenwo halt wieder malen
end;
end;
end;
Gruß
Neutral General
Michael "Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
|