Page 1 of 1

TFastLine segments

Posted: Thu Dec 08, 2016 4:28 am
by 9236183
Hi,

Is it possible to draw line segments which aren't connected.

For example connect 1,1 to 2,2 then have another segment 3,3 to 4,4 with no connection between 2,2 to 3,3 ?

Regards, Brett.

Re: TFastLine segments

Posted: Mon Dec 12, 2016 9:35 am
by yeray
Hello,

You could play with Null Points. Note a line segment is not drawn if the origin or the destination points are null.
So, in the case you described, you could add a null point at x=2.5 and the segments from x=2 to 2.5 and from x=2.5 to 3 won't be drawn:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
begin
  Series1.AddXY(1,1);
  Series1.AddXY(2,2);
  Series1.AddXY(3,3);
  Series1.AddXY(4,4);
  Series1.AddNullXY(2.5,0);
end;

Re: TFastLine segments

Posted: Mon Dec 19, 2016 11:27 pm
by 9236183
As always thanks Yeray, worked like a charm once I figured the DoNotPaint flag was also required when doing it manually.