1

When drawing a list of connected lines using TCanvas.DrawLine they are not drawn connected on iOS, but they are on Windows. Here are the results of a simple test app connecting 40 points:

Targeting iPad 2 on simulator (non-retina, but it also happens on retina) I get this:

enter image description here

Targeting 32-bit Windows I get this:

enter image description here

The code in the test app (to reproduce the problem I have in a much more complex app):

var
  LineList: array[0..39] = (
    (X:8.00; Y:45.00),
    (X:14.00; Y:43.00),
    (X:21.00; Y:43.00),
    (X:27.00; Y:44.00),
    (X:31.00; Y:45.00),
    (X:37.00; Y:45.00),
    (X:40.00; Y:43.00),
    etc.
    );

procedure TForm24.PaintBox1Paint(Sender: TObject; Canvas: TCanvas);
var i: integer;
begin
  Canvas.BeginScene;
  Canvas.StrokeThickness := 6;
  Canvas.Stroke.Kind := TBrushKind.Solid;
  Canvas.Stroke.Color := $FF000000;
  for i := 1 to 39 do
    Canvas.DrawLine(LineList[i-1], LineList[i], 1.0);
  Canvas.EndScene;
end;

Note: problem increases the higher value of StrokeThickness. If set to 1 the problem is gone. I am using Delphi 10 Seattle update 1.

What can I do to solve this?

Edit:

Reported as a bug here: https://quality.embarcadero.com/browse/RSP-13129

Hans
  • 2,220
  • 13
  • 33

0 Answers0