I don't know what you are talking about. The TextRect method of the canvas?
In this case, the usage of the coordinates depends on the settings for Layout and Alignment in the canvas' TextStyle. Please play with the attached code - I wrote it on Windows but it should work also on Mac.
The rectangle Rect passed to
Canvas.TextRect(Rect, x, y, Text, TextStyle) defines the box within which the text is written.
x is used only when TextStyle.Alignment is taLeftJustify, and y is used only when TextStyle.Layout is tlTop. Their origin is the origin of the canvas on which painting occurs. This means that when you want to paint in the top/left corner of the specified Rect you must set x = Rect.Left and y = Rect.Top. So, if you set x=0 and y=0 and have Rect.Left > 0 and Rect.Top > 0 there is probably no output because of clipping (which can be turned off by setting TextRect.Clipping := false).
If you want to paint the text centered at the top of the Rect use TextStyle.Alignment := taCenter, TextStyle.Layout := tlTop, x will be ignored.
If you want to right-align the text within the Rect use TextStyle.Alignment := taRightJustify, TextStyle.Layout := tlTop. x will be ignored.
If you want to right-align the text within the Rect but move it 20 pixels below the top edge use the same TextStyle settings but set y := Rect.Top + 20;
If you want to paint the text centered both vertically and horizontally within Rect use TextStyle.Alignment := taCenter and TextStyle.Layout.tlCenter, both x and y will be ignored. Etc...
Note that TTextStyle is a record which does not have setter procedures; therefore you can assign only a complete record to Canvas.TextStyle. You must use an intermediate variable to change record elements. Do not forget to initialize this record with the current TextStyle settings:
var
ts: TTextStyle;
begin
ts := Canvas.TextStyle;
ts.Alignment := taCenter;
ts.Layout := tlCenter;
Canvas.TextRect(Rect(10, 10, 490, 390), 0, 0, 'My text', ts);
The temporary TextStyle variable can be omitted in the latter call, but then the temp variable must be re-assigned to canvas.TextStyle:
var
ts: TTextStyle;
begin
ts := Canvas.TextStyle;
ts.Alignment := taCenter;
ts.Layout := tlCenter;
Canvas.TextStyle := ts;
Canvas.TextRect(Rect(10, 10, 490, 390), 0, 0, 'My text');