InflatePath

function InflatePath(const path: TPathD; delta: Double; joinStyle: TJoinStyle = jsAuto; endStyle: TEndStyle = esPolygon; miterLimit: double = 2.0): TPathsD;


      uses Img32, Img32.Fmt.PNG,
        Img32.vector, Img32.Draw, Img32.Clipper2;
      ...
      var
        img: TImage32;
        path: TPathD;
        paths: TPathsD;
      begin
        img.SetSize(256,256);
        rec := img.Bounds;
        Windows.InflateRect(rec, -50,-50);

        //draw a gradient filled star
        path := Star(PointD(128, 128), 50, 100, 7);
        radGradRend := TRadialGradientRenderer.Create;
        radGradRend.SetParameters(rec, clFuchsia32, clYellow32);
        DrawPolygon(img, path, frNonZero, radGradRend);
        radGradRend.Free;
        DrawLine(img, path, 1, clBlack32, esPolygon);
        //draw a dashed outline of the star
        paths := InflatePath(path, 7, jsRound, esPolygon);
        DrawDashedLine(img, paths,
          [4,4], 0, 1, clBlack32, esPolygon);

        img.SaveToFile('star.png');
        img.Free;
      end;
    

See Also

InflatePaths