sekarang akan saya bagikan sedikit ilmu mengenai tugas membuat sebuah gambar sepeda dengan delphi
LISTING PROGRAM
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Canvas.Ellipse(200,80,250,140);
Canvas.Ellipse(300,80,350,140);
Canvas.Polyline([point(225,110),point(250,40)]);
Canvas.Polyline([point(225,30),point(275,55)]);
Canvas.Polyline([point(240,60),point(275,110),point(300,60),point(325,110)]);
Canvas.Ellipse(290,55,310,60);
Canvas.Polyline([point(245,50),point(280,100)]);
end;
end.
dan hasilnya seperti ini :
0 comments:
Post a Comment