Membuat Huruf "H" Balok
unit Waode;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
txtx1: TEdit;
txty1: TEdit;
txttebal: TEdit;
txttinggi: TEdit;
txttx: TEdit;
txtty: TEdit;
txtsx: TEdit;
txtsy: TEdit;
cmdgambar: TButton;
procedure cmdgambarClick(Sender: TObject);
procedure FormPaint(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, y0, y1, y2, y3, y4, y5, y6, y7, y8, y9, y10, y11, y12, tx, ty, sx, sy : Integer;
tx1, tx2, tx3, tx4, tx5, tx6, tx7, tx8, tx9, tx10, tx11, tx12, ty1, ty2, ty3, ty4, ty5, ty6, ty7, ty8, ty9, ty10, ty11, ty12 : Integer;
sx1, sx2, sx3, sx4, sx5, sx6, sx7, sx8, sx9, sx10, sx11, sx12, syo, sy1, sy2, sy3, sy4, sy5, sy6, sy7, sy8, sy9, sy10, sy11, sy12 : Integer;
implementation
{$R *.dfm}
procedure TForm1.cmdgambarClick(Sender: TObject);
begin
x1 := StrToInt(txtx1.Text);
y1 := StrToInt(txty1.Text);
end;
procedure TForm1.FormPaint(Sender: TObject);
begin
with Form1 do
begin
Canvas.MoveTo(0, round(Height div 2));
Canvas.LineTo(round(Width), round(Height div 2));
Canvas.MoveTo(round(Width div 2), 0);
Canvas.LineTo(round(Width div 2), round(Height));
x0 := Width div 2;
y0 := Height div 2;
end;
end;
end.
Tidak ada komentar:
Posting Komentar