Navigation
API > API/Runtime > API/Runtime/Engine
Inheritance Hierarchy
- FCanvasItem
- FCanvasTextItemBase
- FCanvasSimpleTextItem
- FCanvasTextItem
- FCanvasTextStringViewItem
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Public/CanvasItem.h |
| Include | #include "CanvasItem.h" |
Syntax
class FCanvasSimpleTextItem : public FCanvasTextItemBase
Remarks
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.
Variables
| Type | Name | Description | |
|---|---|---|---|
| const UFont * | Font | Font to draw text with. | |
| TOptional< FSlateFontInfo > | SlateFontInfo | Font info to draw the text with. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FCanvasSimpleTextItem
(
const FVector2D& InPosition, |
Constructor. | ||
FCanvasSimpleTextItem
(
const FVector2D& InPosition, |
Constructor. |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | DrawStringInternal
(
FCanvas* InCanvas, |
||
| void | DrawStringInternal_OfflineCache
(
FCanvas* InCanvas, |
Internal string drawIn a method to make it simpler to do effects like shadow, outline | |
| void | DrawStringInternal_RuntimeCache
(
FCanvas* InCanvas, |
||
| EFontCacheType | Get the type of font cache the UFont is using | ||
| FVector2D | GetTextSizeInternal
(
FStringView Text, |
Overridden from FCanvasTextItemBase
| Type | Name | Description | |
|---|---|---|---|
| void | DrawStringInternal
(
FCanvas* InCanvas, |
Internal string drawIn a method to make it simpler to do effects like shadow, outline | |
| ESimpleElementBlendMode | GetTextBlendMode
(
const bool bHasShadow |
Get the blend mode we should use to draw this text | |
| FVector2D | GetTextSize
(
float DPIScale |
Get the measured size of the text to draw | |
| bool | HasValidText () |
Does this text item have valid text to draw? |