Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Multimedia (https://www.delphipraxis.net/16-multimedia/)
-   -   Delphi Image spiegeln (https://www.delphipraxis.net/29841-image-spiegeln.html)

Alex_ITA01 15. Sep 2004 11:35


Image spiegeln
 
Hallo erstmal...
ich habe mal ne Frage zum spiegeln eines TImages.Lässt sich das irgendwie realisieren das ich alles was sich darauf befindet (mit Canvas gezeichnet) spiegeln lässt?
Ich poste nachher auch den Source zu der Windrose denn die ist bald fertig...
MFG Alex

himitsu 15. Sep 2004 11:49

Re: Image spiegeln
 
Liste der Anhänge anzeigen (Anzahl: 1)
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;

Alex_ITA01 15. Sep 2004 12:16

Re: Image spiegeln
 
hey danke
dein Programm ist echt genial und gut das die Funktionen darüber geschrieben sind.
Danke nochmals
Alex


Alle Zeitangaben in WEZ +1. Es ist jetzt 13:26 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz