AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Multimedia Delphi Kreis in Vier teile einteilen ?
Thema durchsuchen
Ansicht
Themen-Optionen

Kreis in Vier teile einteilen ?

Ein Thema von mimi · begonnen am 10. Jun 2007 · letzter Beitrag vom 1. Mai 2012
 
Benutzerbild von bitsetter
bitsetter

Registriert seit: 17. Jan 2007
1.169 Beiträge
 
Turbo Delphi für Win32
 
#24

Re: Kreis in Vier teile einteilen ?

  Alt 12. Jun 2007, 00:32
Delphi-Quellcode:
procedure Ellipse4Farben(cav: TCanvas; iLeft, iTop, iW, iH: integer);
var
  iHalbW, iHalbH : integer;
begin
  iHalbW := iW div 2;
  iHalbH := iH div 2;
  with cav do
  begin
    Brush.Color := clSilver;
    Ellipse(iLeft, iTop, iLeft + iW, iTop+ iH);

    Pen.Color := clRed;
    Arc(iLeft, iTop, iLeft + iW, iTop + iH, iLeft + iW, iTop + iHalbH, iLeft + iHalbW, iTop);

    Pen.Color := clYellow;
    Arc(iLeft, iTop, iLeft + iW, iTop + iH, iLeft + iHalbW, iTop, iLeft, iTop + iHalbH);

    Pen.Color := clGreen;
    Arc(iLeft, iTop, iLeft + iW, iTop + iH, iLeft, iTop + iHalbH, iLeft + iHalbW, iTop + iH);

    Pen.Color := clAqua;
    Arc(iLeft, iTop, iLeft + iW, iTop + iH, iLeft + iHalbW, iTop + iH, iLeft + iW, iTop + iHalbH);
  end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  Ellipse4Farben(image1.Canvas, 33, 50, 121, 81);
end;
Das Ganze jetzt mit einer Ellipse.
Gruß bitsetter
"Viele Wege führen nach Rom"
Wolfgang Mocker (geb. 1954), dt. Satiriker und Aphoristiker
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 03:36 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