program fontdraw_with_BGRABitmap;
{$mode objfpc}{$H+}
uses
  Classes,  Types,
  BGRABitmap,
  BGRAGraphics,
  BGRABitmapTypes;

procedure go;
var
  image: TBGRABitmap;
begin
  image := TBGRABitmap.Create(400,400,BGRAWhite);
  image.FontName:='Arial';
  image.FontHeight := 30;
  image.FontAntialias := true;
  image.FontStyle := [fsBold];
  image.TextOut (5, 5, 'Hello world', BGRABlack);
  image.SaveToFile('HelloWorld.png');
  image.free;
end;

begin
  writeln('go...');
  go;
  writeln('finished.');
  writeln('Press <ENTER> to continue.');
  readln;
end.

