function RoundRect(const rec: TRect; radius: integer): TPathD; overload;
function RoundRect(const rec: TRectD; radius: double): TPathD; overload;
function RoundRect(const rec: TRect; radius: TPoint): TPathD; overload;
function RoundRect(const rec: TRectD; radius: TPointD): TPathD; overload;
uses Img32, Img32.Fmt.PNG, Img32.vector, Img32.Extra;
...
var
path: TPathD;
rec: TRect;
begin
img := TImage32.Create(256,256);
rec := Rect(10,30, 256-10, 256-30);
path := RoundRect(rec, 30);
DrawPolygon(img, path, frNonZero, $FFCCEEFF);
DrawLine(img, path, 20, $FF0099FF, esPolygon);
img.SaveToFile('round_rect.png');
img.Free;
end;
Copyright ©2010-2023 Angus Johnson - Image32 4.8 - Help file built on 16 Apr 2025