Autor Beitrag
Dragonclaw
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 196

Windows Vista
Delphi 7 Prof.
BeitragVerfasst: Sa 01.09.07 21:07 
Hallo!

Ist es möglich mehrere bmps in ein TImage zu packen?

z.b. bei (5,5) soll '4.bmp' geladen werden, und an (20,20) soll '1.bmp' geladen werden.

Vielen Dank für die Hilfe.
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Sa 01.09.07 21:16 
Mach dich mal mit den diversen Methoden von TCanvas vertraut. Mit Canvas.Draw(x,y,graphic) kann man z.B. an die Koordinaten x,y eine Graphik zeichnen lassen. Gibt auch noch einiges mehr, wie z.B. Copyrect und ähnliches.

_________________
We are, we were and will not be.
Dragonclaw Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 196

Windows Vista
Delphi 7 Prof.
BeitragVerfasst: Di 04.09.07 18:17 
Ich habs jetzt so gelöst:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TfrMain.ChangePic(X,Y: Integer; name: String);
Var
  help: TBitmap;
  I: Integer;
begin
  help := TBitmap.Create();
  if trystrtoint(name,I) then ImageList1.GetBitmap(GetMinesSourrounding_Button(X,Y),help);
  Image1.Canvas.Draw((X - 1) * 17+1,(Y - 1) * 17+1,TGraphic(help));
end;


Danke Gausi
turboPASCAL
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 193
Erhaltene Danke: 1

Win XP / Vischda
D6 PE / D2005 PE
BeitragVerfasst: Di 04.09.07 21:19 
Vergiss nicht dein Hilfsbitmap frei zu geben !
ausblenden Delphi-Quelltext
1:
help.free					


;)