Jump to content

Recommended Posts

Posted
    xx_1 := 0;
    yy_1 := 0;
    xx := 0;
    i := 0;
    APoints:=nil;
    while xx <  pCanvas.Width do
    begin
      xx := i * (1 / 100);
      yy := (pCanvas.Height / 2) - 100 * sin(2 * pi * 0.05 * i / 100);

      pCanvas.DrawLine(pointf(xx_1, yy_1), pointf(xx, yy));

      SetLength(APoints, Length(APoints) + 1);
      APoints[Length(APoints) - 1] := pointf(xx, yy - 50);

      xx_1 := xx;
      yy_1 := yy;
      inc(i);
    end;

    if Length(APoints) > 0 then
      pCanvas.DrawLines(APoints);

рисуется функция двумя способами:

через DrawLine - нормально

через DrawLines -нет

Project_TestBM.zip

×
×
  • Create New...