WebGraphics.DrawText
From Xojo Documentation
Method
WebGraphics.DrawText(text As String, x As Integer, y As Integer [,width As Integer ])
New in 2020r1
Supported for all project types and targets.
New in 2020r1
Supported for all project types and targets.
Draws the text at the specified location and in the DrawingColor.
Notes
The x parameter specifies the distance from the left of the WebGraphics object in pixels. The y parameter specifies the baseline for the text. The optional width parameter specifies the width (in pixels) at which text should wrap. If width is omitted, then text will print on one line, even if the drawing area is too narrow to contain the text.
Sample Code
This example draws text in red Helvetica 16-point.
g.DrawingColor = Color.Red
g.FontName = "Helvetica"
g.FontSize = 16
g.DrawText("Hello world!", 10, 130)
g.FontName = "Helvetica"
g.FontSize = 16
g.DrawText("Hello world!", 10, 130)