Теми рефератів
> Реферати > Курсові роботи > Звіти з практики > Курсові проекти > Питання та відповіді > Ессе > Доклади > Учбові матеріали > Контрольні роботи > Методички > Лекції > Твори > Підручники > Статті Контакти
Реферати, твори, дипломи, практика » Курсовые проекты » Завдання про червоних і синіх точках

Реферат Завдання про червоних і синіх точках





;; rColor=2 then (BlueCount) ;. Image1.Canvas.Brush.Color:=clBlue; .Image1.Canvas.Ellipse (X - 4, Y - 4, X + 4, Y + 4) ;. Image1.Canvas.Brush.Color:=clWhite; .Image1.Canvas.TextOut (X - 20, Y - 5, IntToStr (tCount)); (p); ^. X:=X; ^. Y:=Y; ^. rColor:= 2; ^. Linked:=false; ^. num:=tCount; .Add (p) ;;; AddGridPoint (vList: TList); rRect: TRect ;: integer ;: PPnt; rColor=0 then exit;:=50 ;:=15; .Left:=cWidth * vList.Count; .Top:=0; .Right:=cWidth * (vList.Count + 1) ;. Bottom:=cHeight; .Image2.Canvas.FillRect (rRect) ; .Image2.Canvas.Brush.Color:=clInactiveCaption; .Image2.Canvas.FillRect (rRect) ;. Image2.Canvas.Font.Style:=[fsBold] ;. Image2.Canvas.TextOut (vList.Count * cWidth + round (cWidth/2) - 3, 1, IntToStr (vList.Count)); i:=0 to 5 do.Image2.Canvas.MoveTo (cWidth * vList.Count, i * cHeight) ;. Image2.Canvas.LineTo (cWidth * (vList.Count + 1), i * cHeight) ;; i:=pList.Count to pList.Count + 1 do.Image2.Canvas.MoveTo (i * cWidth, 0) ;. Image2.Canvas.LineTo (i * cWidth, cHeight * 5 + 1) ;;. Image2.Canvas.Font.Style:=[] ;. Image2.Canvas.Brush.Color:=clWhite;:=vList.Items [vList.Count - 1] ; .Image2.Canvas.TextOut ((vList.Count + 1) * cWidth - round (cWidth/2) - 8, cHeight + 1, IntToStr (p ^ .X)) ;. Image2.Canvas.TextOut ((vList. Count + 1) * cWidth - round (cWidth/2) - 8, 2 * cHeight + 1, IntToStr (p ^ .Y));

//if p ^ .Linked

//then.Image2.Canvas.TextOut ((vList.Count + 1) * cWidth - round (cWidth/2) - 2, 3 * cHeight + 1, IntToStr (p ^ .num) );

//else

//Form1.Image2.Canvas.TextOut ((vList.Count + 1) * cWidth - round (cWidth/2) - 2, 3 * cHeight + 1, - ); p ^ .rColor=1 then.Left:=cWidth * vList.Count + 1; .Top:=cHeight * 4 + 1; .Right:=cWidth * (vList.Count + 1) ;. Bottom:=cHeight * 5 ; .Image2.Canvas.Brush.Color:=clRed; .Image2.Canvas.FillRect (rRect) ;; p ^ .rColor=2 then.Left:=cWidth * vList.Count + 1; .Top:=cHeight * 4 + 1; .Right:=cWidth * (vList.Count + 1) ;. Bottom:=cHeight * 5; .Image2.Canvas.Brush.Color:=clBlue; .Image2.Canvas.FillRect (rRect) ;;; pointsDraw ; i: integer ;: PPnt; .Image1.Canvas.Brush.Color:=clWhite;.Image1.Canvas.FillRect(Form1.Image1.Canvas.ClipRect);.Image1.Canvas.Rectangle(Form1.Image1.Canvas.ClipRect);i:=0 to pList.Count - 1 do:=pList.Items [i]; p ^ .rColor=1 then.Image1.Canvas.Brush.Color:=clRed; .Image1.Canvas.Ellipse (p ^ .X - 4, p ^ .Y - 4, p ^ .X + 4, p ^ .Y + 4) ;; p ^ .rColor=2 then.Image1.Canvas.Brush.Color:=clBlue; .Image1.Canvas.Ellipse (p ^.X - 4, p ^ .Y - 4, p ^ .X + 4, p ^ .Y + 4) ;;;; TForm1.ToolButton1Click (Sender: TObject) ;. Cursor:=crCross;:=1 ;; TForm1.ToolButton3Click (Sender: TObject);

var i: Integer; (fl=false) then//кнопка натиснута перший раз. включено ручне креслення

begin:=0; _col:=0;:=true; .Cursor:=crCross;:=0; .Enabled:=false; .Enabled:=false;:=1; .RowCount :=2;// отрисовка таблиці виведення результата.ColCount:=round (pList.Count/2) +2; .Cells [StringGrid1.ColCount - 1,0]:= Сума raquo ;;

end//вихід з режиму креслення//повернення зв'язків в початковий стан

for i:=0 to pList.Count - 1 do (pList.Items [i]) ^. Linked:=false;:=0; .Cursor:=crDefault;:=false ;. Enabled:=true; .Enabled:=true ;;; TForm1.FormCreate (Sender: TObject) ;: TRect ;: integer;

begin//пераоночальное присвоювання змінних:=false;

start:=0; _1:=start_sh; _1:=0; _2:=0; _2:=0;:=0;:=0;:=0;:=50 ;: =15; .Left:=0; .Top:=0; .Right:=Image1.Width; .Bottom:=Image1.Height; .Canvas.FillRect (rRect) ;. Canvas.Rectangle (rREct) ;. Left: =0; .Top:=0; .Right:=Image2.Width; .Bottom:=Image2.Height; .Canvas.FillRect (rRect) ;. Right:=cWidth; .Bottom:=cHeight * 5; .Canvas. Brush.Color:=clInactiveCaption; .Canvas.FillRect (rRect) ;. Canvas.Font.Style:=[fsBold]; i:=0 to 5 do.Canvas.MoveTo (0, i * cHeight) ;. Canvas.LineTo (cWidth, i * cHeight) ;; i:=0 to 1 do.Canvas.MoveTo (i * cWidth, 0) ;. Canvas.LineTo (i * cWidth, cHeight * 5 + 1) ;;. Canvas.TextOut ( round (cWidth/2) - 2, cHeight + 1, X ) ;. Canvas.TextOut (round (cWidth/2) - 2, 2 * cHeight + 1, Y ) ;. Canvas.TextOut ( round (cWidth/2) - 14, 3 * cHeight + 1, Зв'язок ) ;. Canvas.TextOut (round (cWidth/2) - 14, 4 * cHeight + 1, Колір );:=0 ;:=TList.Create;:=TList.Create;:=TList.Create;:=TList.Create ;; TForm1.Image1MouseUp (Sender: TObject; Button: TMouseButton ;: TShiftState; X, Y: Integer); p: PPnt ;, p2: PPnt;: Integer;, mint: Real;

beginfl then:=- 1;// змінна відстані між точками.- 1 означає що ще не обчислювалася (i_col=1) then//пошук другої точки, максимально близькій до місця натискання

begini:=0 to pList.Count - 1 do//перебір всіх точок:=pList.Items [i];// дані i-й точки (p ^ .Linked=false) and (p ^ .rColor lt; gt; PPnt (pList.Items [ip1]) ^. rColor)//якщо точка не пов'язана і протилежного кольору тоді:=sqrt (s...


Назад | сторінка 6 з 7 | Наступна сторінка





Схожі реферати:

  • Реферат на тему: Програмний комплекс для управління і формування керуючих команд мобільним р ...
  • Реферат на тему: Peculiarities of prose style
  • Реферат на тему: Style of popular scientific prose
  • Реферат на тему: Створення Windows 8-style ui застосунку
  • Реферат на тему: Маркетингове дослідження ринку комп'ютерної техніки на прикладі ТОВ &qu ...