Navigation
API > API/Runtime > API/Runtime/Engine
Base item used for drawing simple text strings with misc optional items such as shadow, centering etc. Provides functions which operate on FStringView, which derived classes can use.
| Name | FCanvasSimpleTextItem |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Public/CanvasItem.h |
| Include Path | #include "CanvasItem.h" |
Syntax
class FCanvasSimpleTextItem : public FCanvasTextItemBase
Inheritance Hierarchy
- FCanvasItem → FCanvasTextItemBase → FCanvasSimpleTextItem
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FCanvasSimpleTextItem
(
const FVector2D& InPosition, |
Constructor. | CanvasItem.h | |
FCanvasSimpleTextItem
(
const FVector2D& InPosition, |
Constructor. | CanvasItem.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FCanvasSimpleTextItem() |
CanvasItem.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Font | const UFont * | Font to draw text with. | CanvasItem.h | |
| SlateFontInfo | TOptional< FSlateFontInfo > | Font info to draw the text with. | CanvasItem.h |
Functions
Public
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void DrawStringInternal
(
FCanvas* InCanvas, |
CanvasItem.h | ||
void DrawStringInternal_OfflineCache
(
FCanvas* InCanvas, |
Internal string drawIn a method to make it simpler to do effects like shadow, outline | CanvasItem.h | |
void DrawStringInternal_RuntimeCache
(
FCanvas* InCanvas, |
CanvasItem.h | ||
EFontCacheType GetFontCacheType() |
Get the type of font cache the UFont is using | CanvasItem.h | |
FVector2D GetTextSizeInternal
(
FStringView Text, |
CanvasItem.h |
Overridden from FCanvasTextItemBase
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void DrawStringInternal
(
FCanvas* InCanvas, |
Internal string drawIn a method to make it simpler to do effects like shadow, outline | CanvasItem.h | |
virtual ESimpleElementBlendMode GetTextBlendMode
(
const bool bHasShadow |
Get the blend mode we should use to draw this text | CanvasItem.h | |
FVector2D GetTextSize
(
float DPIScale |
Get the measured size of the text to draw | CanvasItem.h | |
bool HasValidText() |
Does this text item have valid text to draw? | CanvasItem.h |