Code to try (FormPaint event):
procedure TForm1.FormPaint(Sender: TObject);
const
RASTAS__TASKELIAI_1_1: TPenPattern = (5, 5);
begin
color := clWhite;
with Canvas do begin
Pen.Cosmetic := TRUE;
Pen.Width := 1;
Pen.Color := clRed;
Brush.Color := clSkyBlue;
FillRect(0, 0, 50, 50); // <----- this
Brush.Style := bsClear; // no effect
Brush.Color := clNone; // no effect
Pen.Style := psPattern;
Pen.SetPattern(RASTAS__TASKELIAI_1_1);
Line(0, 100, 100, 100);
end;
end;
When FillRect is commented out (first attachment) I get only red dashed line as expected.
When FillRect is active then I get dashed line with brush.color dashes in between the red dashes.
In Gtk2 widgetset I always get red dashed line as expected.
Is this a bug or does this only happen on my system?
---------
Lazarus 2.3.0 (rev main-2_3-2889-g1b9d3d4cbf) FPC 3.2.2 x86_64-linux-gtk2
qt5 v5.15.8
yay qt5pas: 1 community/qt5pas 2.6.2.2.4-1 (479.3 KiB 2.3 MiB) (Installed: 2.6.main-1)