DrawButton

procedure DrawButton(img: TImage32; const pt: TPointD; size: double; color: TColor32 = clNone32; buttonOptions: TButtonOptions = []);



  uses Image32, Image32_PNG,
    Image32_Draw, Image32_Extra;
  ...
  var
    i,j: integer;
    img: TImage32;
    path: TArrayOfPointD;
  begin
    img := TImage32.Create(256, 256);
    
    //draw round uncolored buttons
    j := 15;
    for i := 3 to 12 do
    begin
      DrawButton(img, PointD(j, 100), i*2,
        clNone32, [boDropShadow]);
      inc(j, 10 + i*2);
    end;

    //and draw some colored square buttons
    j := 15;
    for i := 3 to 12 do
    begin
      DrawButton(img, PointD(j, 180), i*2,
        AdjustHue(clRed32, (i- 3) * 10),
        [boSquare, boDropShadow]);
      inc(j, 10 + i*2);
    end;

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

See Also

TButtonOption, TButtonOptions, TLayeredImage32.GetMergedImage