SHARE
TWEET

Untitled

a guest Nov 14th, 2019 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. unit Unit1;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. interface
  6.  
  7. uses
  8.   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
  9.   ExtCtrls;
  10.  
  11. type
  12.  
  13.   { TForm1 }
  14.  
  15.   TForm1 = class(TForm)
  16.     Button1: TButton;
  17.     Button2: TButton;
  18.     Edit1: TEdit;
  19.     Image1: TImage;
  20.     procedure Button1Click(Sender: TObject);
  21.     procedure Button2Click(Sender: TObject);
  22.   private
  23.     { private declarations }
  24.   public
  25.     { public declarations }
  26.   end;
  27.  
  28. var
  29.   Form1: TForm1;
  30.  
  31. implementation
  32.  
  33. {$R *.lfm}
  34.  
  35. { TForm1 }
  36.  
  37. procedure Draw();
  38. var i:integer;
  39. Var R: integer;
  40. begin
  41. i:=10;
  42. with Form1.Image1.Canvas do begin
  43.   brush.Color:=clForm;
  44.   FillRect(0, 0, Form1.Image1.Width, Form1.Image1.Height);
  45.  
  46.   {Pen.Color:=clGreen;
  47.   Pen.Width:=3;
  48.   Brush.Color:=clRed;
  49.   EllipseC(50,75,25,25);}
  50.  
  51.   for i:= 1 to 360 do begin
  52.   R:=Sin(i);
  53.   Pen.Color:=clGreen;
  54.   Pen.Width:=3;
  55.   Brush.Color:=clRed;
  56.   EllipseC(50+R,150+i,25,25);
  57.   end;
  58.  
  59.   {Pen.Color:=clBlack;
  60.   Pen.Width:=50;
  61.   Line(10, 120, Form1.Image1.Width-10, 120);}
  62.  
  63.   {Brush.Color:=clForm;
  64.   Font.Color:=clBlue;
  65.   Font.Name:='Courier';
  66.   Font.Size:=30;
  67.   Font.Style:=[fsBold];
  68.   TextOut(60,150, 'risunok');}
  69.  end;
  70. end;
  71.  
  72. procedure TForm1.Button1Click(Sender: TObject);
  73. begin
  74. Draw();
  75. end;
  76.  
  77. procedure TForm1.Button2Click(Sender: TObject);
  78. begin
  79. close;
  80. end;
  81.  
  82.  
  83.  
  84. end.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top