Autor Beitrag
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Mo 20.12.04 07:03 
ich versuche gerade ein kartenspiel zu programmieren.

dabei sollen die einzelnen karten aus Bitmaps geladen werden, nebeneinander dargestellt und bei Klick auf die jeweils dem bild zugeordneten fläche, die karte geworfen werden.
als erstes soll aber der gesamte hintergrund der komponente mit der Hintergrundsfarbe gefärbt werden

Welches ist hierzu die optimale Komponente ?

mein code sieht bislang so aus:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
  for i := 0 to amemo.lines.count - 1 do
  begin

  bmp.LoadFromResourceName(HInstance,amemo.lines[i]);
  with shape1 do
  begin
     canvas.Draw (left+5 + i * 52,top + 10,bmp);
  end;
  // das problem das ich bei SHAPE sehe ist dass der Canvas nicht direkt dem Shape zugeordnet ist, 
  // Shape1.Canvas.Draw funktioniert nämlich nicht
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Mo 20.12.04 12:12 
Die besten Erfolg wirst du mit TImage erreichen ODER, wenn du dir eine eigene Komponent von TGraphicControl ableitest.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.