try the following code, it works for me.
procedure Draw_PannelFrame_Flat_Rounded(Dst : TBitmap32; R: TRect; Sides : TSides;
Color : TColor32; PenStyle: TPenStyle; StrokeWidth : Single = 1; Radius : Integer = 6) ;
var
Points : TArrayOfFloatPoint;
Dashes : TArrayOfFloat;
FRect : TFloatRect;
begin
FRect:= FloatRect(R);
case PenStyle of
psSolid:
begin
Points:= Build_RoundRect(Radius, FRect, StrokeWidth * 1);
PolyPolylineFS(Dst, PolyPolygon(Points), Color, True, StrokeWidth * 1, jsMiter, esSquare);
end;
psDash:
begin
// Dashes := MakeArrayOfFloat([10, 3, 3, 3, 3, 3]);
Dashes := MakeArrayOfFloat([6, 2, 6, 2]);
Points:= Build_RoundRect(Radius, FRect, StrokeWidth * 1);
DashLineFS(Dst, Points, Dashes, Color, True, StrokeWidth * 1);
end;
psDot:
begin
Dashes := MakeArrayOfFloat([2, 2, 2, 2]);
Points:= Build_RoundRect(Radius, FRect, StrokeWidth * 1);
DashLineFS(Dst, Points, Dashes, Color, True, StrokeWidth * 1);
end;
psDashDot:
begin
Dashes := MakeArrayOfFloat([6, 2, 2, 2]);
Points:= Build_RoundRect(Radius, FRect, StrokeWidth * 1);
DashLineFS(Dst, Points, Dashes, Color, True, StrokeWidth * 1);
end;
psDashDotDot:
begin
Dashes := MakeArrayOfFloat([10, 2, 2, 2, 2, 2]);
Points:= Build_RoundRect(Radius, FRect, StrokeWidth * 1);
DashLineFS(Dst, Points, Dashes, Color, True, StrokeWidth * 1);
end;
psClear: ;
psInsideFrame:
begin
Points:= Build_RoundRect(Radius, FRect, StrokeWidth * 1);
PolyPolylineFS(Dst, PolyPolygon(Points), Color, True, StrokeWidth * 1);
end;
psUserStyle: ;
psAlternate: ;
end;
end;