unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls;

type Tfrmsinyal = class(TForm) imgtampil: TImage; procedure imgtampilClick(Sender: TObject); private { Private declarations } public { Public declarations } end; var frmsinyal: Tfrmsinyal; implementation procedure sumbu(ax,ay,b,c:integer); begin frmsinyal.imgtampil.Canvas.MoveTo(ax,ay); frmsinyal.imgtampil.Canvas.LineTo(ax+b,ay); frmsinyal.imgtampil.Canvas.MoveTo(ax,ay); frmsinyal.imgtampil.Canvas.LineTo(ax,ay-c); frmsinyal.imgtampil.Canvas.MoveTo(ax,ay); frmsinyal.imgtampil.Canvas.LineTo(ax,ay+c); end; procedure satu(ax,ay,a,b,i:integer); begin frmsinyal.imgtampil.Canvas.Pen.Color:=clRed; frmsinyal.imgtampil.Canvas.MoveTo(ax+(i-1)*b*3,ay); frmsinyal.imgtampil.Canvas.LineTo(ax+(i-1)*b*3,ay-2*a); frmsinyal.imgtampil.Canvas.MoveTo(ax+(i-1)*b*3,ay-2*a); frmsinyal.imgtampil.Canvas.LineTo(ax+b+(i-1)*b*3,ay-2*a); frmsinyal.imgtampil.Canvas.MoveTo(ax+b+(i-1)*b*3,ay-2*a); frmsinyal.imgtampil.Canvas.LineTo(ax+b+(i-1)*b*3,ay-a); frmsinyal.imgtampil.Canvas.MoveTo(ax+b+(i-1)*b*3,ay-a); frmsinyal.imgtampil.Canvas.LineTo(ax+2*b+(i-1)*b*3,ay-a); frmsinyal.imgtampil.Canvas.MoveTo(ax+2*b+(i-1)*b*3,ay-a); frmsinyal.imgtampil.Canvas.LineTo(ax+2*b+(i-1)*b*3,ay); frmsinyal.imgtampil.Canvas.MoveTo(ax+2*b+(i-1)*b*3,ay); frmsinyal.imgtampil.Canvas.LineTo(ax+3*b+(i-1)*b*3,ay); end; procedure nol(ax,ay,a,b,i:integer); begin frmsinyal.imgtampil.Canvas.Pen.Color:=clred; frmsinyal.imgtampil.Canvas.MoveTo(ax+(i-1)*b*3,ay); frmsinyal.imgtampil.Canvas.LineTo(ax+3*b+(i-1)*b*3,ay); end; procedure reset; var x,y:integer; begin

240. // biner:string.y).tinggi.x. satu(20.y).240. // for i:=1 to length(biner) do // if biner[i]='1' then // begin // tinggi:=60.edb. // sumbu(20.Refresh.Text).imgtampilClick(Sender: TObject). // x:=1000.i) end. //y:=strtoint(frmsinyal. frmsinyal. // y:=400.tinggi.i).lebar.y. y:=400.x.y). biner:string.tinggi.btprosesClick(Sender: TObject).imgtampil. sumbu(20.Text. biner:=IntToStr(111111111111111). {$R *.dfm} //procedure Tfrmsinyal.tinggi.Picture:=nil.240.240. x:=1000.tinggi. end.240.tinggi. procedure Tfrmsinyal.i) //end. //begin //reset. . var i.240.eda. // satu(20.x. // end // else nol(20.frmsinyal. end.x.240.lebar:integer.lebar. lebar:=40.y. //x:=strtoint(frmsinyal. end else nol(20. //var // i.Text). begin //reset. for i:=1 to length(biner) do if biner[i]='1' then begin tinggi:=60.lebar.i).lebar.imgtampil. // lebar:=40. // biner:=edbiner.x.lebar:integer. sumbu(20.

Sign up to vote on this title
UsefulNot useful