Thema: Delphi Image spiegeln

Einzelnen Beitrag anzeigen

Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
43.168 Beiträge
 
Delphi 12 Athens
 
#2

Re: Image spiegeln

  Alt 15. Sep 2004, 11:49
Sowas ist mit StretchBlt möglich

Delphi-Quellcode:
{horizontal spiegeln}
  Procedure TForm1.Button1Click(Sender: TObject);
    Begin
      StretchBlt(BitMapPaintBox5.Canvas.Handle, 0, 0, BitMapPaintBox5.Width,
        BitMapPaintBox5.Height, BitMapPaintBox5.Canvas.Handle,
        BitMapPaintBox5.Width - 1, 0, -BitMapPaintBox5.Width,
        BitMapPaintBox5.Height, SRCCopy);
      PaintBox5Paint(Sender);
    End;

{vertikal spiegeln}
  Procedure TForm1.Button2Click(Sender: TObject);
    Begin
      StretchBlt(BitMapPaintBox5.Canvas.Handle, 0, 0, BitMapPaintBox5.Width,
        BitMapPaintBox5.Height, BitMapPaintBox5.Canvas.Handle, 0,
        BitMapPaintBox5.Height - 1, BitMapPaintBox5.Width,
        -BitMapPaintBox5.Height, SRCCopy);
      PaintBox5Paint(Sender);
    End;
Angehängte Dateien
Dateityp: exe zeichnen_bitmapundclipping_sfx.exe (268,4 KB, 41x aufgerufen)
Garbage Collector ... Delphianer erzeugen keinen Müll, also brauchen sie auch keinen Müllsucher.
my Delphi wish list : BugReports/FeatureRequests
  Mit Zitat antworten Zitat