DrawShadow

procedure DrawShadow(img: TImage32; const polygon: TPathD; fillRule: TFillRule; depth: double; angleRads: double = angle225; color: TColor32 = $80000000; cutoutInsideShadow: Boolean = false); overload;

procedure DrawShadow(img: TImage32; const polygons: TPathsD; fillRule: TFillRule; depth: double; angleRads: double = angle225; color: TColor32 = $80000000; cutoutInsideShadow: Boolean = false); overload;


  uses Img32, Img32.Fmt.PNG, Img32.vector, Img32.Extra;
  ...
  var
    img: TImage32;
    path: TPathD;
  begin
    img := TImage32.Create(150,150);
    path :=  Star(PointD(128, 128), 50, 100, 7);
    DrawShadow(img, path, frNonZero, 8,
      angle225, $AA000000);
    DrawPolygon(img, path, frNonZero, clAqua32);
    img.SaveToFile('shadowed_star.png');
    img.Free;
  end;
    

See Also

DrawShadow