Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Figur auf TImage zeichnen. (https://www.delphipraxis.net/96375-figur-auf-timage-zeichnen.html)

smart 23. Jul 2007 13:53


Figur auf TImage zeichnen.
 
Liste der Anhänge anzeigen (Anzahl: 1)
Hallo Alle!

Wie kann ich mit Delphi so eine Figur auf einem Image zeichnen. Muss ich da jeden Pixel einzeln zeichnen, oder gibt es da Hilfen?

Gruß
Heike

SirThornberry 23. Jul 2007 13:55

Re: Figur auf TImage zeichnen.
 
einfach die Methoden LineTo und MoveTo von Canvas nutzen

bitsetter 23. Jul 2007 14:22

Re: Figur auf TImage zeichnen.
 
Polygon und Rectangle könnte man dazu auch noch verwenden.

Delphi-Quellcode:
 with Image1.Canvas do
  begin
    Brush.Style:= bsClear;
    Polygon([Point(50,20), Point(300,20),Point(270,70),Point(20,70)]);

    Brush.Style:= bsSolid;
    Polygon([Point(50,10), Point(300,10),Point(270,60),Point(20,60)]);

    MoveTo(300,10);
    LineTo(300,20);
    MoveTo(270,60);
    LineTo(270,70);
    MoveTo(20,60);
    LineTo(20,70);
  end;


Alle Zeitangaben in WEZ +1. Es ist jetzt 03:29 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