TWebPaintBox.canvas ... SetTextAlign equivalent

In the Winapi.Windows there is SetTextAlign(Handle, TA_BASELINE or TA_Left), which can be used to determine where the reference point for the text output via TextOut should be on a canvas. Is there a similar function for web development?

Sorry, unfortunately at this time there is not an equivalent of SetTextAlign().

We'd need to look if there is a possible underlying web API for this and if so, map it. We'll put this on the list to research.

To draw text on a TWebPaintBox use the following call which includes the alignment.

{$IFDEF WEBLIB}
WebPaintBox.Canvas.TextRect(PtsR, FText, True, False, FTextAlignment, taAlignTop);
{$ENDIF}

You can also control the tranparency.

{$IFDEF WEBLIB}
WebPaintBox.Canvas.Context.globalAlpha := FTransparency / 100;
{$ENDIF}