UCanvas::DrawText

Draws a string of text to the screen.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/Canvas.h

Include

#include "Engine/Canvas.h"

Source

/Engine/Source/Runtime/Engine/Private/UserInterface/Canvas.cpp

Syntax

float DrawText
(
    const UFont * InFont,
    const FString & InText,
    float X,
    float Y,
    float XScale,
    float YScale,
    const FFontRenderInfo & RenderInfo
)

Remarks

Draws a string of text to the screen.

Returns

The Y extent of the rendered text.

Parameters

Parameter

Description

InFont

The font to draw with.

InText

The string to be drawn.

X

Position to draw X.

Y

Position to draw Y.

XScale

  1. The horizontal scaling to apply to the text.

YScale

  1. The vertical scaling to apply to the text.

RenderInfo

  1. The FontRenderInfo to use when drawing the text.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss