procedure TForm1.Button1Click(Sender: TObject);
var
ts: TTextStyle;
begin
// With Form1 do // NEVER USE THE FORM INSTANCE IN THE FORM CLASS CODE !!!
begin
canvas.brush.color := clYellow;
canvas.Ellipse(100,100,300,300);
// canvas.MoveTo(100,100); // NOT NEEDED
Canvas.Font.Size:=22;
Canvas.Font.Color:=clRed;
ts := Canvas.TextStyle;
ts.Alignment := taCenter;
ts.Layout := tlCenter;
Canvas.TextRect(Rect(100, 100, 300, 300), 0, 0, 'Hello', ts); // Rect within text is centered, dummy x, dummy y, text, text style
end;
end;