Draw_line

Internφ programovacφ jazykC/C++Pascal

procedure Draw_line(hView : window_id; x1, y1, x2, y2 : short; color : short);
void Draw_line(window_id hView, int x1, int y1, int x2, int y2, int color);
procedure Draw_line(hView : window_id; x1, y1, x2, y2 : integer; color : integer);

Parametry

hView identifikace (handle) formulß°e
x1, y1 sou°adnice zaΦßtku ·seΦky
x2, y2 sou°adnice konce ·seΦky
color oznaΦenφ barvy

Popis

Procedura nakreslφ v okn∞ formulß°e hView ·seΦku v barv∞ color od mφsta se sou°adnicemi (x1, y1) do (x2, y2).

Tato procedura je do rozhranφ WinBase602 zahrnuta z d∙vodu kompatibility se starÜφmi verzemi. V nov²ch aplikacφch doporuΦujeme pro kreslenφ vyu₧φvat funkcφ z DLL knihovny Windows GDI.EXE.

P°φklad

var
  id,i,j : short;
begin
  Open_view("a DBDIALOG 20 20 400 300 begin end",no_redir,0,0,0,id);
  Draw_line(id, 50,50,100,50,0);
  Draw_line(id, 100,50,100,100,0);
  Draw_line(id, 100,100,50,100,0);
  Draw_line(id, 50,100,50,50,0);
  for i := 51 to 99 do
    for j := 51 to 99 do
      Put_pixel(id,i,j,i*j mod 255);
  repeat  Peek_message until id=0;
end.

Viz