Студопедия
Случайная страница | ТОМ-1 | ТОМ-2 | ТОМ-3
АвтомобилиАстрономияБиологияГеографияДом и садДругие языкиДругоеИнформатика
ИсторияКультураЛитератураЛогикаМатематикаМедицинаМеталлургияМеханика
ОбразованиеОхрана трудаПедагогикаПолитикаПравоПсихологияРелигияРиторика
СоциологияСпортСтроительствоТехнологияТуризмФизикаФилософияФинансы
ХимияЧерчениеЭкологияЭкономикаЭлектроника

Procedure DrawAxesD;

Читайте также:
  1. ADMISSION PROCEDURES
  2. Authorities, following the procedure established in the law of the requested
  3. Establishing data and information management procedures
  4. HOLDING PROCEDURES
  5. Hygienic bath or shower procedures
  6. Look through the court procedure and fill in the missing information.
  7. Modern Hairdressing Procedures

Var DADi:integer;

Begin

Form1.Image1.Canvas.Pen.Color:=colAx;

Form1.Image1.Canvas.MoveTo(0,Trunc(Form1.Image1.Height/2));

Form1.Image1.Canvas.LineTo(Form1.Image1.Width,Trunc(Form1.Image1.Height/2));

Form1.Image1.Canvas.MoveTo(Trunc(Form1.Image1.Width/2),0);

Form1.Image1.Canvas.LineTo(Trunc(Form1.Image1.Width/2),Form1.Image1.Height);

 

Form1.Image1.Canvas.MoveTo(Form1.Image1.Width,Trunc(Form1.Image1.Height/2));

Form1.Image1.Canvas.LineTo(Form1.Image1.Width-10,Trunc(Form1.Image1.Height/2)-6);

Form1.Image1.Canvas.MoveTo(Form1.Image1.Width,Trunc(Form1.Image1.Height/2));

Form1.Image1.Canvas.LineTo(Form1.Image1.Width-10,Trunc(Form1.Image1.Height/2)+6);

Form1.Image1.Canvas.MoveTo(Trunc(Form1.Image1.Width/2),0);

Form1.Image1.Canvas.LineTo(Trunc(Form1.Image1.Width/2)-6,10);

Form1.Image1.Canvas.MoveTo(Trunc(Form1.Image1.Width/2),0);

Form1.Image1.Canvas.LineTo(Trunc(Form1.Image1.Width/2)+6,10);

 

Form1.Image1.Canvas.Pen.Color:=clSilver;

x:=Trunc(Form1.Image1.Width/2);

DADi:=0;

Form1.Image1.Canvas.TextOut(Trunc(Form1.Image1.Width/2)+3,Trunc(Form1.Image1.Height/2)+3,IntToStr(DADi));

while x<Form1.Image1.Width do

Begin

x:=x+kd*10;

Form1.Image1.Canvas.MoveTo(x,0);

Form1.Image1.Canvas.LineTo(x,Form1.Image1.Height);

DADi:=DADi+1;

Form1.Image1.Canvas.TextOut(x+3,Trunc(Form1.Image1.Height/2)+3,IntToStr(DADi));

End;

x:=Trunc(Form1.Image1.Width/2);

DADi:=0;

while x>0 do

Begin

x:=x-kd*10;

Form1.Image1.Canvas.MoveTo(x,0);

Form1.Image1.Canvas.LineTo(x,Form1.Image1.Height);

DADi:=DADi-1;

Form1.Image1.Canvas.TextOut(x+1,Trunc(Form1.Image1.Height/2)+3,IntToStr(DADi));

End;

y:=Trunc(Form1.Image1.Height/2);

DADi:=0;

while y<Form1.Image1.Height do

Begin

y:=y+kd*10;

Form1.Image1.Canvas.MoveTo(0,y);

Form1.Image1.Canvas.LineTo(Form1.Image1.Width,y);

DADi:=DADi-1;

Form1.Image1.Canvas.TextOut(Trunc(Form1.Image1.Width/2)+2,y+2,IntToStr(DADi));

End;

y:=Trunc(Form1.Image1.Width/2);

DADi:=0;

while y>0 do

Begin

y:=y-kd*10;

Form1.Image1.Canvas.MoveTo(0,y);

Form1.Image1.Canvas.LineTo(Form1.Image1.Width,y);

DADi:=DADi+1;

Form1.Image1.Canvas.TextOut(Trunc(Form1.Image1.Width/2)+2,y+2,IntToStr(DADi));

End

End;

Procedure funcD;

Begin

if Form1.RadioButton1.Checked then fd:=1

else if Form1.RadioButton2.Checked then fd:=2

else if Form1.RadioButton3.Checked then fd:=3

else if Form1.RadioButton4.Checked then fd:=4;

Case fd of

GraficD(1);

GraficD(2);

GraficD(3);

Begin

GraficD(2);

GraficD(3)

End

End;

End;

 

procedure TForm1.BitBtn2Click(Sender: TObject);

Begin

FonDraw;

if Form1.CheckBox2.Checked=False then DrawAxes else DrawAxesD

End;

 

procedure TForm1.FormActivate(Sender: TObject);

Begin

colGr1:=clBlue;

colGr2:=clDefault;

colAx:=clRed;

FonDraw;

if Form1.CheckBox2.Checked=False then DrawAxes else DrawAxesD;

kd:=Form1.TrackBar2.Position;

End;

 

procedure TForm1.TrackBar1Change(Sender: TObject);

Begin

if Form1.CheckBox2.Checked=False then

Begin

FonDraw;

DrawAxes;

Func

End

End;

 

procedure TForm1.BitBtn1Click(Sender: TObject);

Begin

FonDraw;

if Form1.CheckBox2.Checked=False then

Begin

DrawAxes;

Func

End

Else

Begin

DrawAxesD;

FuncD

End

End;

 

procedure TForm1.Label4Click(Sender: TObject);

Begin

ShowMessage

End;

 

procedure TForm1.TrackBar2Change(Sender: TObject);

Begin

kd:=Form1.TrackBar2.Position;

If Form1.CheckBox2.Checked then

Begin

FonDraw;

DrawAxesD;

FuncD

End

End;

 

procedure TForm1.ComboBox1Change(Sender: TObject);

Begin

if Form1.ComboBox1.Text='Red' then colGr1:=clRed

else if Form1.ComboBox1.Text='Lime' then colGr1:=clLime

else if Form1.ComboBox1.Text='Yellow' then colGr1:=clYellow

else if Form1.ComboBox1.Text='Blue' then colGr1:=clBlue

else if Form1.ComboBox1.Text='Fuchsia' then colGr1:=clFuchsia

else if Form1.ComboBox1.Text='Aqua' then colGr1:=clAqua

else if Form1.ComboBox1.Text='White' then colGr1:=clWhite

else if Form1.ComboBox1.Text='Default' then colGr1:=clDefault;

End;

 

procedure TForm1.ComboBox2Change(Sender: TObject);

Begin

if Form1.ComboBox2.Text='Red' then colGr2:=clRed

else if Form1.ComboBox2.Text='Lime' then colGr2:=clLime

else if Form1.ComboBox2.Text='Yellow' then colGr2:=clYellow

else if Form1.ComboBox2.Text='Blue' then colGr2:=clBlue

else if Form1.ComboBox2.Text='Fuchsia' then colGr2:=clFuchsia

else if Form1.ComboBox2.Text='Aqua' then colGr2:=clAqua

else if Form1.ComboBox2.Text='White' then colGr2:=clWhite

else if Form1.ComboBox2.Text='Default' then colGr2:=clDefault;

End;

 

procedure TForm1.ComboBox3Change(Sender: TObject);

Begin

if Form1.ComboBox3.Text='Red' then colAx:=clRed

else if Form1.ComboBox3.Text='Lime' then colAx:=clLime

else if Form1.ComboBox3.Text='Yellow' then colAx:=clYellow

else if Form1.ComboBox3.Text='Blue' then colAx:=clBlue

else if Form1.ComboBox3.Text='Fuchsia' then colAx:=clFuchsia

else if Form1.ComboBox3.Text='Aqua' then colAx:=clAqua

else if Form1.ComboBox3.Text='White' then colAx:=clWhite

else if Form1.ComboBox3.Text='Default' then colAx:=clDefault;

End;

 

procedure TForm1.Label5Click(Sender: TObject);

Begin

ShowMessage(:)')

End;

End.

 

 

 

5.3.2 Віконні інтерфейси

 

Рис. 5.2.1 Програма реалізації

Рис. 5.2.2 Програма реалізації

 

Рис. 5.2.3 Програма реалізації

 

 

 

5.4. Програмна реалізація афінних перетворень та анімації

 


Дата добавления: 2015-10-30; просмотров: 74 | Нарушение авторских прав


Читайте в этой же книге: СПИСОК СКОРОЧЕНЬ | Private void trackBar1_Scroll(object sender, EventArgs e) | Implementation | Form1.Image1.Canvas.LineTo(x,y); |
<== предыдущая страница | следующая страница ==>
Form1.Image1.Canvas.MoveTo(x,0);| Namespace openGL_1

mybiblioteka.su - 2015-2024 год. (0.015 сек.)