Table of Contents

Method DrawHelloText

Namespace
Alternet.Drawing
Assembly
Alternet.UI.Common.dll

DrawHelloText(SKCanvas, string?, PointD?, Font?, Color?, Color?)

Draws the specified test message on the canvas at the given location, using default styling if no parameters are provided.

public static void DrawHelloText(this SKCanvas canvas, string? text = null, PointD? location = null, Font? font = null, Color? foreColor = null, Color? backColor = null)

Parameters

canvas SKCanvas

The SKCanvas on which the text will be drawn. Cannot be null.

text string

The text to draw. If null, the default text "Hello from SkiaSharp" will be used.

location PointD?

The location where the text will be drawn, specified as a PointD. If null, the default location (10, 10) will be used.

font Font

The Font to use for drawing the text. Can be null if the default font is desired.

foreColor Color

The Color to use for the text foreground. Can be null if the default color is desired.

backColor Color

The Color to use for the text background. Can be null if the default color is desired.

Remarks

This method uses default font and color settings to render the text. The text is drawn with a green foreground and a yellow background.