UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FCanvasShapedTextItem Class Reference

#include <CanvasItem.h>

+ Inheritance diagram for FCanvasShapedTextItem:

Public Member Functions

 FCanvasShapedTextItem (const FVector2D &InPosition, FShapedGlyphSequenceRef InShapedGlyphSequence, const FLinearColor &InColor)
 
- Public Member Functions inherited from FCanvasTextItemBase
ENGINE_API FCanvasTextItemBase (const FVector2D &InPosition, const FLinearColor &InColor)
 
virtual ENGINE_API ~FCanvasTextItemBase ()
 
void EnableShadow (const FLinearColor &InColor, const FVector2D &InOffset=FVector2D(1.0f, 1.0f))
 
void DisableShadow ()
 
virtual ENGINE_API void Draw (FCanvas *InCanvas) override
 
virtual void SetColor (const FLinearColor &InColor) override final
 
virtual void Draw (FCanvas *InCanvas)=0
 
virtual void Draw (FCanvas *InCanvas, const FVector2D &InPosition)
 
virtual void Draw (FCanvas *InCanvas, float X, float Y)
 
- Public Member Functions inherited from FCanvasItem
 FCanvasItem (const FVector2D &InPosition)
 
virtual ~FCanvasItem ()
 

Public Attributes

FShapedGlyphSequencePtr ShapedGlyphSequence
 
- Public Attributes inherited from FCanvasTextItemBase
float HorizSpacingAdjust
 
float Depth
 
FFontRenderInfo FontRenderInfo
 
FLinearColor ShadowColor
 
FVector2D ShadowOffset
 
FVector2D DrawnSize
 
bool bCentreX
 
bool bCentreY
 
bool bOutlined
 
FLinearColor OutlineColor
 
bool bDontCorrectStereoscopic
 
FVector2D Scale
 
- Public Attributes inherited from FCanvasItem
FVector2D Position
 
uint32 StereoDepth
 
ESimpleElementBlendMode BlendMode
 
bool bFreezeTime
 
FBatchedElementParametersBatchedElementParameters
 

Protected Member Functions

virtual ENGINE_API bool HasValidText () const override
 
virtual ENGINE_API ESimpleElementBlendMode GetTextBlendMode (const bool bHasShadow) const override
 
virtual ENGINE_API FVector2D GetTextSize (float DPIScale) const override
 
virtual ENGINE_API void DrawStringInternal (FCanvas *InCanvas, const FVector2D &DrawPos, const FLinearColor &DrawColor, TArrayView< FTextEffect > TextEffects) override
 

Additional Inherited Members

- Protected Attributes inherited from FCanvasTextItemBase
FCanvasTileItem TileItem
 
FBatchedElementsBatchedElements
 
- Protected Attributes inherited from FCanvasItem
FLinearColor Color
 

Constructor & Destructor Documentation

◆ FCanvasShapedTextItem()

FCanvasShapedTextItem::FCanvasShapedTextItem ( const FVector2D InPosition,
FShapedGlyphSequenceRef  InShapedGlyphSequence,
const FLinearColor InColor 
)
inline

Shaped text item for complex script rendering.

Parameters
InPositionDraw position
InShapedGlyphSequenceShaped text information to draw
InColorColor to draw the text with

Member Function Documentation

◆ DrawStringInternal()

void FCanvasShapedTextItem::DrawStringInternal ( FCanvas InCanvas,
const FVector2D DrawPos,
const FLinearColor DrawColor,
TArrayView< FTextEffect Offsets 
)
overrideprotectedvirtual

Internal string draw

In a method to make it simpler to do effects like shadow, outline

Implements FCanvasTextItemBase.

◆ GetTextBlendMode()

ESimpleElementBlendMode FCanvasShapedTextItem::GetTextBlendMode ( const bool  bHasShadow) const
overrideprotectedvirtual

Get the blend mode we should use to draw this text

Implements FCanvasTextItemBase.

◆ GetTextSize()

FVector2D FCanvasShapedTextItem::GetTextSize ( float  DPIScale) const
overrideprotectedvirtual

Get the measured size of the text to draw

Implements FCanvasTextItemBase.

◆ HasValidText()

bool FCanvasShapedTextItem::HasValidText ( ) const
overrideprotectedvirtual

Does this text item have valid text to draw?

Implements FCanvasTextItemBase.

Member Data Documentation

◆ ShapedGlyphSequence

FShapedGlyphSequencePtr FCanvasShapedTextItem::ShapedGlyphSequence

The shaped text sequence to draw


The documentation for this class was generated from the following files: