Autor Beitrag
Nagelbrett
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 75



BeitragVerfasst: Fr 09.05.03 14:17 
irgendwie werd ich daraus nicht schlau...
wenn ich eine TBitmap erstell und dann mit Canvas.Draw versuche, etwas reinzuschreiben, bleibt sie leer...
die einzige möglichkeit, eine TBitmap zu füllen, ist LoadFromFile oder meinetwegen auch GetBitmap aus einer bilderliste, doch WIE kann ich einfach eine schon vorhandene bitmap in eine andere schreiben und WIE kann ich in eine TBitmap mit z.b. Canvas.Rectangle etwas hineinmalen?
ase
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 203

Gentoo, Windows 9X, ME, 2k, NT, XP
Delphi 7 Prof., PHP 5 (Eclipse 3 SDK)
BeitragVerfasst: Fr 09.05.03 21:32 
hi

welche delphi version hast du?

normalerweise geht des so:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
Var Quelle, Ziel: TBitmap;
Begin
  Quelle := TBitmap.Create;
  Ziel := TBitmap.Create;

  Quelle.LoadFromFile('...');

  // jetzt entweder so:
  Ziel.Width := Quelle.Width;
  Ziel.Height := Quelle.Height;
  Ziel.Canvas.Draw(0, 0, Ziel);

  // oder so:
  Ziel.Assign(Quelle);
End;


so sollte des funktionieren denke ich.


ase

_________________
-EN
Nagelbrett Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 75



BeitragVerfasst: Sa 10.05.03 00:54 
umm, ja mit assign gehts, das ist mir auch schon aufgefallen
ich brauchte aber unbedingt draw, da ich eine kleinere bitmap in eine größere malen lassen will, mit koordinaten und so

naja jedenfalls... hab ich vergessen height und width anzugeben *peinlich*
ok danke, damit funktionierts jetzt :)