Draw3D

procedure Draw3D(img: TImage32; const polygon: TArrayOfPointD; fillRule: TFillRule; height, blurRadius: double; colorLt: TColor32 = $DDFFFFFF; colorDk: TColor32 = $80000000; angleRads: double = angle45); overload;

procedure Draw3D(img: TImage32; const polygons: TArrayOfArrayOfPointD; fillRule: TFillRule; height, blurRadius: double; colorLt: TColor32 = $DDFFFFFF; colorDk: TColor32 = $80000000; angleRads: double = angle45); overload;


Creates a 3D effect over polygons using light and dark shading. The amount of shading is determined by the height and blurRadius parameters. (The colors of the light and dark shading and the shading angle can all be customized.)

  uses Image32, Image32_PNG, Image32_Text, 
    Image32_Draw, Image32_Extra;
  ...
  var
    img: TImage32;
    startPt, endPt: TPointD;
    paths: TArrayOfArrayOfPointD;
    lf: TLogFont;
    fi: TFontInfo;
  begin
    lf := DefaultLogfont;
    lf.lfFaceName := 'Impact';
    lf.lfHeight := -96;
    fi := GetFontInfo(lf);

    startPt := PointD(20, 130);
    img := TImage32.Create(400,150);
    paths := GetTextOutline(startPt.X, startPt.Y, 
      'Image32', fi, taLeft, endPt);
    DrawShadow(img, paths, frNonZero, 4);
    
    DrawPolygon(img, paths, frNonZero, $FF00DD00);
    Draw3D(img, paths, frNonZero, 3, 4);
    DrawLine(img, paths, 1, clBlack32, esClosed);

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

Draw3D


shadow, polygon and line


shadow, polygon, line and Draw3D