Autor Beitrag
anno2007
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 68

Win 7, Ubuntu
Delphi XE
BeitragVerfasst: Sa 21.03.09 19:32 
Hi,
ich hab mir folgende Prozedur geschrieben:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure TForm1.DrawFigure(number: integer ; posx: integer ; posy: integer ; color: string);
begin
  figures[number] := TBitMap.Create;                                 
  figures[number].LoadFromFile(path + '\GFX\figur_' + color + '.bmp'); 
  figures[number].Transparent := true;                                 
  playfield.Canvas.Draw(posx, posy,figures[number]);                   
end;


Kann ich irgendwie noch reinbringen, das ich die Größe des TBitMaps anpassen kann?
Wäre echt verdammt gut, wenn das irgendwie gehen würde.

Thx,
anno2007
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 21.03.09 19:47 
Benutze StretchDraw direkt statt Draw oder StretchBlt als API-Funktion.
anno2007 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 68

Win 7, Ubuntu
Delphi XE
BeitragVerfasst: Sa 21.03.09 20:10 
Perfekt.
Irgendwie komm ich mit der Hilfe nicht zurecht.
Da findet man gar nicht drin.

DANKE
anno2007 ;)
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 21.03.09 20:17 
Ich weiß ja nicht, welche Delphiversion du hast, aber bei Delphi 2006 bzw. dem kostenlosen Turbo Delphi ist die zwar nicht besonders ausführlich, aber recht übersichtlich.

Insbesondere sollte dir aber die Syntaxergänzung helfen, wenn du den Punkt hinter Canvas z.B. setzt. Da siehst du ja was möglich ist.