Thema: Delphi Animation von TImages

Einzelnen Beitrag anzeigen

Benutzerbild von turboPASCAL
turboPASCAL

Registriert seit: 8. Mai 2005
Ort: Sondershausen
4.274 Beiträge
 
Delphi 6 Personal
 
#10

Re: Animation von TImages

  Alt 15. Mär 2006, 10:43
Delphi-Quellcode:
procedure TForm1.MyDrawBitmap;
begin
  if not CheckBox1.Checked then // ist nicht CheckBox1 markiert dann nomal zeichnen
  begin
    BitBlt(
      PaintBox1.Canvas.Handle, // Wohin zeichnen
      0, // X-Pos im Ziel
      0, // Y-Pos im Ziel
      PicWith, // Bildbreite
      PicHight, // Bildhöhe
      MyBitmap.Canvas.Handle, // Von welcher Quelle
      PicWith * AktPic, // Breite eines Bildes mal aktuelles Bild
      0, // Y-Pos der Bildquelle (ist ja immer gleich)
      SRCCOPY // Methode: aus Quellbild nach Ziel kopieren
      );
  end else // ist CheckBox1 markiert dann gedehnt zeichnen
  begin
    StretchBlt(
      PaintBox1.Canvas.Handle, // Wohin zeichnen
      0, // X-Pos im Ziel
      0, // Y-Pos im Ziel
      PaintBox1.Width, // so Breit wie die Paintbox
      PaintBox1.Height, // so Hoch wie die Paintbox
      MyBitmap.Canvas.Handle, // Von welcher Quelle
      PicWith * AktPic, // Breite eines Bildes mal aktuelles Bild
      0, // Y-Pos der Bildquelle (ist ja immer gleich)
      PicWith, // Breite eines Einzelbildes
      PicHight, // Höhe eines Einzelbildes
      SRCCOPY // Methode: aus Quellbild nach Ziel kopieren
      );
  end;
end;
Und was davon nicht ?

Siehe auch: [oh]BitBlt, StretchBlt[/oh]
Matti
Meine Software-Projekte - Homepage - Grüße vom Rüsselmops -Mops Mopser
  Mit Zitat antworten Zitat