Navigation
API > API/Runtime > API/Runtime/Engine
Base item used for drawing text
| Name | FCanvasTextItemBase |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Public/CanvasItem.h |
| Include Path | #include "CanvasItem.h" |
Syntax
class FCanvasTextItemBase : public FCanvasItem
Inheritance Hierarchy
- FCanvasItem → FCanvasTextItemBase
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FCanvasTextItemBase
(
const FVector2D& InPosition, |
CanvasItem.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FCanvasTextItemBase() |
CanvasItem.h |
Structs
| Name | Remarks |
|---|---|
| FTextEffect |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bCentreX | bool | Centre the text in the viewport on horizontally. | CanvasItem.h | |
| bCentreY | bool | Centre the text in the viewport on vertically. | CanvasItem.h | |
| bDontCorrectStereoscopic | bool | Disables correction of font render issue when using stereoscopic display. | CanvasItem.h | |
| bOutlined | bool | Draw an outline on the text. | CanvasItem.h | |
| Depth | float | Depth sort key. | CanvasItem.h | |
| DrawnSize | FVector2D | The size of the drawn text after the draw call. | CanvasItem.h | |
| FontRenderInfo | FFontRenderInfo | Custom font render information. | CanvasItem.h | |
| HorizSpacingAdjust | float | Horizontal spacing adjustment. | CanvasItem.h | |
| OutlineColor | FLinearColor | The color of the outline. | CanvasItem.h | |
| Scale | FVector2D | The scale of the text | CanvasItem.h | |
| ShadowColor | FLinearColor | The color of the shadow | CanvasItem.h | |
| ShadowOffset | FVector2D | The offset of the shadow. | CanvasItem.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void DisableShadow() |
Disable the shadow | CanvasItem.h | |
void EnableShadow
(
const FLinearColor& InColor, |
Set the shadow offset and color. | CanvasItem.h |
Overridden from FCanvasItem
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Draw the item at the given coordinates. | CanvasItem.h | ||
| Expose the functions defined in the base class. | CanvasItem.h | ||
| Expose the functions defined in the base class. | CanvasItem.h | ||
virtual void SetColor
(
const FLinearColor& InColor |
Set the Color of the item. | CanvasItem.h |
Protected
| 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 | |
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 |