InflatePath

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



      uses Image32, Image32_PNG,
        Image32_vector, Image32_Draw, Image32_Clipper;
      ...
      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, esClosed);
        //draw a dashed outline of the star
        paths := InflatePath(path, 7, jsRound, esPolygon);
        DrawDashedLine(img, paths,
          [4,4], 0, 1, clBlack32, esClosed);

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

See Also

InflatePaths