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

#include <Canvas.h>

+ Inheritance diagram for UCanvas:

Public Types

enum  ELastCharacterIndexFormat { LastWholeCharacterBeforeOffset , CharacterAtOffset , Unused }
 
- Public Types inherited from UObject
enum class  ENetFields_Private { NETFIELD_REP_START = 0 , NETFIELD_REP_END = -1 }
 
typedef UObject WithinClass
 

Public Member Functions

ENGINE_API void Init (int32 InSizeX, int32 InSizeY, FSceneView *InSceneView, FCanvas *InCanvas)
 
virtual ENGINE_API void BeginDestroy () override
 
ENGINE_API void SetView (FSceneView *InView)
 
ENGINE_API void Update ()
 
ENGINE_API void ApplySafeZoneTransform ()
 
ENGINE_API void PopSafeZoneTransform ()
 
ENGINE_API void UpdateSafeZoneData ()
 
ENGINE_API void DrawTile (UTexture *Tex, float X, float Y, float XL, float YL, float U, float V, float UL, float VL, EBlendMode BlendMode=BLEND_Translucent)
 
ENGINE_API void VARARGS WrappedStrLenf (const UFont *Font, float ScaleX, float ScaleY, int32 &XL, int32 &YL, const TCHAR *Fmt,...)
 
ENGINE_API int32 WrappedPrint (bool Draw, float X, float Y, int32 &out_XL, int32 &out_YL, const UFont *Font, float ScaleX, float ScaleY, bool bCenterTextX, bool bCenterTextY, FStringView Text, const FFontRenderInfo &RenderInfo)
 
ENGINE_API float DrawText (const UFont *InFont, FStringView InText, float X, float Y, float XScale=1.f, float YScale=1.f, const FFontRenderInfo &RenderInfo=FFontRenderInfo())
 
ENGINE_API float DrawText (const UFont *InFont, const FText &InText, float X, float Y, float XScale=1.f, float YScale=1.f, const FFontRenderInfo &RenderInfo=FFontRenderInfo())
 
ENGINE_API float DrawText (const UFont *InFont, FAnsiStringView InText, float X, float Y, float XScale=1.f, float YScale=1.f, const FFontRenderInfo &RenderInfo=FFontRenderInfo())
 
ENGINE_API void WrapString (FTextSizingParameters &Parameters, const float InCurX, FStringView Text, TArray< FWrappedStringElement > &out_Lines, FCanvasWordWrapper::FWrappedLineData *const OutWrappedLineData=nullptr)
 
ENGINE_API FVector Project (FVector Location, bool bClampToZeroPlane=true) const
 
ENGINE_API void Deproject (FVector2D ScreenPos, FVector &WorldOrigin, FVector &WorldDirection) const
 
ENGINE_API void StrLen (const UFont *InFont, FStringView InText, float &XL, float &YL, bool bDPIAware=false)
 
ENGINE_API void StrLen (const UFont *InFont, FStringView InText, double &XL, double &YL, bool bDPIAware=false)
 
ENGINE_API void StrLen (const UFont *InFont, FAnsiStringView InText, float &XL, float &YL, bool bDPIAware=false)
 
ENGINE_API void StrLen (const UFont *InFont, FAnsiStringView InText, double &XL, double &YL, bool bDPIAware=false)
 
ENGINE_API void TextSize (const UFont *InFont, FStringView InText, float &XL, float &YL, float ScaleX=1.f, float ScaleY=1.f)
 
ENGINE_API void TextSize (const UFont *InFont, FStringView InText, double &XL, double &YL, double ScaleX=1.f, double ScaleY=1.f)
 
ENGINE_API void TextSize (const UFont *InFont, FAnsiStringView InText, float &XL, float &YL, float ScaleX=1.f, float ScaleY=1.f)
 
ENGINE_API void TextSize (const UFont *InFont, FAnsiStringView InText, double &XL, double &YL, double ScaleX=1.f, double ScaleY=1.f)
 
ENGINE_API void SetLinearDrawColor (FLinearColor InColor, float OpacityOverride=-1.f)
 
ENGINE_API void SetDrawColor (uint8 R, uint8 G, uint8 B, uint8 A=255)
 
ENGINE_API void SetDrawColor (FColor const &C)
 
ENGINE_API FFontRenderInfo CreateFontRenderInfo (bool bClipText=false, bool bEnableShadow=false, FLinearColor GlowColor=FLinearColor(), FVector2D GlowOuterRadius=FVector2D(), FVector2D GlowInnerRadius=FVector2D())
 
virtual ENGINE_API void Reset (bool bKeepOrigin=false)
 
ENGINE_API void SetClip (float X, float Y)
 
ENGINE_API void GetCenter (float &outX, float &outY) const
 
ENGINE_API void GetCenter (double &outX, double &outY) const
 
ENGINE_API void DrawScaledIcon (FCanvasIcon Icon, float X, float Y, FVector Scale)
 
ENGINE_API void DrawIcon (FCanvasIcon Icon, float X, float Y, float Scale=0.f)
 
virtual ENGINE_API void DrawDebugGraph (const FString &Title, float ValueX, float ValueY, float UL_X, float UL_Y, float W, float H, FVector2D RangeX, FVector2D RangeY)
 
ENGINE_API void DrawItem (FCanvasItem &Item)
 
ENGINE_API void DrawItem (FCanvasItem &Item, const FVector2D &InPosition)
 
ENGINE_API void DrawItem (FCanvasItem &Item, float X, float Y)
 
ENGINE_API TWeakObjectPtr< class UReporterGraphGetReporterGraph ()
 
float GetDPIScale () const
 
ENGINE_API void K2_DrawLine (FVector2D ScreenPositionA=FVector2D::ZeroVector, FVector2D ScreenPositionB=FVector2D::ZeroVector, float Thickness=1.0f, FLinearColor RenderColor=FLinearColor::White)
 
ENGINE_API void K2_DrawTexture (UTexture *RenderTexture, FVector2D ScreenPosition, FVector2D ScreenSize, FVector2D CoordinatePosition, FVector2D CoordinateSize=FVector2D::UnitVector, FLinearColor RenderColor=FLinearColor::White, EBlendMode BlendMode=BLEND_Translucent, float Rotation=0.f, FVector2D PivotPoint=FVector2D(0.5f, 0.5f))
 
ENGINE_API void K2_DrawMaterial (UMaterialInterface *RenderMaterial, FVector2D ScreenPosition, FVector2D ScreenSize, FVector2D CoordinatePosition, FVector2D CoordinateSize=FVector2D::UnitVector, float Rotation=0.f, FVector2D PivotPoint=FVector2D(0.5f, 0.5f))
 
ENGINE_API void K2_DrawText (UFont *RenderFont, const FString &RenderText, FVector2D ScreenPosition, FVector2D Scale=FVector2D(1.0f, 1.0f), FLinearColor RenderColor=FLinearColor::White, float Kerning=0.0f, FLinearColor ShadowColor=FLinearColor::Black, FVector2D ShadowOffset=FVector2D::UnitVector, bool bCentreX=false, bool bCentreY=false, bool bOutlined=false, FLinearColor OutlineColor=FLinearColor::Black)
 
ENGINE_API void K2_DrawBorder (UTexture *BorderTexture, UTexture *BackgroundTexture, UTexture *LeftBorderTexture, UTexture *RightBorderTexture, UTexture *TopBorderTexture, UTexture *BottomBorderTexture, FVector2D ScreenPosition, FVector2D ScreenSize, FVector2D CoordinatePosition, FVector2D CoordinateSize=FVector2D::UnitVector, FLinearColor RenderColor=FLinearColor::White, FVector2D BorderScale=FVector2D(0.1f, 0.1f), FVector2D BackgroundScale=FVector2D(0.1f, 0.1f), float Rotation=0.0f, FVector2D PivotPoint=FVector2D(0.5f, 0.5f), FVector2D CornerSize=FVector2D::ZeroVector)
 
ENGINE_API void K2_DrawBox (FVector2D ScreenPosition, FVector2D ScreenSize, float Thickness=1.0f, FLinearColor RenderColor=FLinearColor::White)
 
ENGINE_API void K2_DrawTriangle (UTexture *RenderTexture, TArray< FCanvasUVTri > Triangles)
 
ENGINE_API void K2_DrawMaterialTriangle (UMaterialInterface *RenderMaterial, TArray< FCanvasUVTri > Triangles)
 
ENGINE_API void K2_DrawPolygon (UTexture *RenderTexture, FVector2D ScreenPosition, FVector2D Radius=FVector2D::UnitVector, int32 NumberOfSides=3, FLinearColor RenderColor=FLinearColor::White)
 
ENGINE_API FVector K2_Project (FVector WorldLocation)
 
ENGINE_API void K2_Deproject (FVector2D ScreenPosition, FVector &WorldOrigin, FVector &WorldDirection)
 
ENGINE_API FVector2D K2_StrLen (UFont *RenderFont, const FString &RenderText)
 
ENGINE_API FVector2D K2_TextSize (UFont *RenderFont, const FString &RenderText, FVector2D Scale=FVector2D::UnitVector)
 
- Public Member Functions inherited from UObject
COREUOBJECT_API UObject ()
 
COREUOBJECT_API UObject (const FObjectInitializer &ObjectInitializer)
 
COREUOBJECT_API UObject (EStaticConstructor, EObjectFlags InFlags)
 
COREUOBJECT_API UObject (FVTableHelper &Helper)
 
COREUOBJECT_API UObjectCreateDefaultSubobject (FName SubobjectFName, UClass *ReturnType, UClass *ClassToCreateByDefault, bool bIsRequired, bool bIsTransient)
 
template<class TReturnType >
TReturnTypeCreateEditorOnlyDefaultSubobject (FName SubobjectName, bool bTransient=false)
 
template<class TReturnType >
TReturnTypeCreateDefaultSubobject (FName SubobjectName, bool bTransient=false)
 
template<class TReturnType , class TClassToConstructByDefault >
TReturnTypeCreateDefaultSubobject (FName SubobjectName, bool bTransient=false)
 
template<class TReturnType >
TReturnTypeCreateOptionalDefaultSubobject (FName SubobjectName, bool bTransient=false)
 
template<class TReturnType , class TClassToConstructByDefault >
TReturnTypeCreateOptionalDefaultSubobject (FName SubobjectName, bool bTransient=false)
 
COREUOBJECT_API void GetDefaultSubobjects (TArray< UObject * > &OutDefaultSubobjects)
 
COREUOBJECT_API UObjectGetDefaultSubobjectByName (FName ToFind)
 
virtual COREUOBJECT_API void PostInitProperties ()
 
virtual COREUOBJECT_API void PostReinitProperties ()
 
virtual void PostCDOContruct ()
 
virtual COREUOBJECT_API void PreSaveRoot (FObjectPreSaveRootContext ObjectSaveContext)
 
virtual COREUOBJECT_API void PostSaveRoot (FObjectPostSaveRootContext ObjectSaveContext)
 
virtual COREUOBJECT_API void PreSave (FObjectPreSaveContext SaveContext)
 
virtual COREUOBJECT_API void CollectSaveOverrides (FObjectCollectSaveOverridesContext SaveContext)
 
UE_FORCEINLINE_HINT bool Modify (bool bAlwaysMarkDirty=true)
 
UE_FORCEINLINE_HINT bool IsCapturingAsRootObjectForTransaction () const
 
virtual bool ResolveSubobject (const TCHAR *SubObjectPath, UObject *&OutObject, bool bLoadIfExists)
 
virtual bool IsReadyForAsyncPostLoad () const
 
virtual COREUOBJECT_API void PostLoad ()
 
virtual COREUOBJECT_API void PostLoadSubobjects (FObjectInstancingGraph *OuterInstanceGraph)
 
virtual bool IsReadyForFinishDestroy ()
 
virtual COREUOBJECT_API void FinishDestroy ()
 
virtual COREUOBJECT_API void Serialize (FArchive &Ar)
 
virtual COREUOBJECT_API void Serialize (FStructuredArchive::FRecord Record)
 
virtual void ShutdownAfterError ()
 
virtual void PostInterpChange (FProperty *PropertyThatChanged)
 
virtual COREUOBJECT_API void PostRename (UObject *OldOuter, const FName OldName)
 
virtual void PreDuplicate (FObjectDuplicationParameters &DupParams)
 
virtual void PostDuplicate (bool bDuplicateForPIE)
 
virtual void PostDuplicate (EDuplicateMode::Type DuplicateMode)
 
virtual COREUOBJECT_API bool NeedsLoadForClient () const
 
virtual COREUOBJECT_API bool NeedsLoadForServer () const
 
virtual COREUOBJECT_API bool NeedsLoadForTargetPlatform (const class ITargetPlatform *TargetPlatform) const
 
virtual bool NeedsLoadForEditorGame () const
 
virtual bool IsEditorOnly () const
 
virtual bool HasNonEditorOnlyReferences () const
 
virtual bool IsPostLoadThreadSafe () const
 
virtual COREUOBJECT_API bool IsDestructionThreadSafe () const
 
virtual COREUOBJECT_API void GetPreloadDependencies (TArray< UObject * > &OutDeps)
 
virtual void GetPrestreamPackages (TArray< UObject * > &OutPrestream)
 
virtual void ExportCustomProperties (FOutputDevice &Out, uint32 Indent)
 
virtual void ImportCustomProperties (const TCHAR *SourceText, FFeedbackContext *Warn)
 
virtual void PostEditImport ()
 
virtual void PostReloadConfig (class FProperty *PropertyThatWasLoaded)
 
virtual COREUOBJECT_API bool Rename (const TCHAR *NewName=nullptr, UObject *NewOuter=nullptr, ERenameFlags Flags=REN_None)
 
virtual FString GetDesc ()
 
COREUOBJECT_API UScriptStructGetSparseClassDataStruct () const
 
virtual bool GetNativePropertyValues (TMap< FString, FString > &out_PropertyValues, uint32 ExportFlags=0) const
 
virtual COREUOBJECT_API void GetResourceSizeEx (FResourceSizeEx &CumulativeResourceSize)
 
SIZE_T GetResourceSizeBytes (EResourceSizeMode::Type Mode)
 
virtual FName GetExporterName (void)
 
COREUOBJECT_API void CallAddReferencedObjects (FReferenceCollector &Collector)
 
virtual FRestoreForUObjectOverwriteGetRestoreForUObjectOverwrite ()
 
virtual bool AreNativePropertiesIdenticalTo (UObject *Other) const
 
virtual COREUOBJECT_API void GetAssetRegistryTags (FAssetRegistryTagsContext Context) const
 
virtual COREUOBJECT_API void GetAssetRegistryTags (TArray< FAssetRegistryTag > &OutTags) const
 
COREUOBJECT_API void GetAssetRegistryTags (FAssetData &Out) const
 
COREUOBJECT_API void GetAssetRegistryTags (FAssetRegistryTagsContext Context, FAssetData &Out) const
 
virtual COREUOBJECT_API bool IsAsset () const
 
virtual COREUOBJECT_API FPrimaryAssetId GetPrimaryAssetId () const
 
virtual COREUOBJECT_API bool IsLocalizedResource () const
 
virtual COREUOBJECT_API bool IsSafeForRootSet () const
 
virtual COREUOBJECT_API void TagSubobjects (EObjectFlags NewFlags)
 
virtual COREUOBJECT_API void GetLifetimeReplicatedProps (TArray< class FLifetimeProperty > &OutLifetimeProps) const
 
virtual COREUOBJECT_API void GetReplicatedCustomConditionState (FCustomPropertyConditionState &OutActiveState) const
 
virtual COREUOBJECT_API void RegisterReplicationFragments (UE::Net::FFragmentRegistrationContext &Context, UE::Net::EFragmentRegistrationFlags RegistrationFlags)
 
virtual COREUOBJECT_API bool IsNameStableForNetworking () const
 
virtual COREUOBJECT_API bool IsFullNameStableForNetworking () const
 
virtual COREUOBJECT_API bool IsSupportedForNetworking () const
 
virtual void GetSubobjectsWithStableNamesForNetworking (TArray< UObject * > &ObjList)
 
virtual COREUOBJECT_API void PreNetReceive ()
 
virtual COREUOBJECT_API void PostNetReceive ()
 
virtual void PostRepNotifies ()
 
virtual COREUOBJECT_API void PreDestroyFromReplication ()
 
COREUOBJECT_API bool IsSelected () const
 
COREUOBJECT_API void SerializeScriptProperties (FArchive &Ar) const
 
COREUOBJECT_API void SerializeScriptProperties (FStructuredArchive::FSlot Slot) const
 
COREUOBJECT_API void ReinitializeProperties (UObject *SourceObject=NULL, struct FObjectInstancingGraph *InstanceGraph=NULL)
 
COREUOBJECT_API FString GetDetailedInfo () const
 
COREUOBJECT_API bool ConditionalBeginDestroy ()
 
COREUOBJECT_API bool ConditionalFinishDestroy ()
 
COREUOBJECT_API void ConditionalPostLoad ()
 
COREUOBJECT_API void ConditionalPreload ()
 
COREUOBJECT_API void ConditionalPostLoadSubobjects (struct FObjectInstancingGraph *OuterInstanceGraph=NULL)
 
bool IsBasedOnArchetype (const UObject *const SomeObject) const
 
COREUOBJECT_API UFunctionFindFunction (FName InName) const
 
COREUOBJECT_API UFunctionFindFunctionChecked (FName InName) const
 
virtual COREUOBJECT_API void BuildSubobjectMapping (UObject *OtherObject, TMap< UObject *, UObject * > &ObjectMapping) const
 
COREUOBJECT_API void CollectDefaultSubobjects (TArray< UObject * > &OutDefaultSubobjects, bool bIncludeNestedSubobjects=false) const
 
COREUOBJECT_API bool CheckDefaultSubobjects (bool bForceCheck=false) const
 
COREUOBJECT_API void SaveConfig (uint64 RequiredPropertyFlags=CPF_Config, const TCHAR *Filename=nullptr, FConfigCacheIni *Config=GConfig, bool bAllowCopyToDefaultObject=true)
 
COREUOBJECT_API void SaveConfig (const FSaveConfigContext &Context)
 
COREUOBJECT_API void UpdateDefaultConfigFile (const FString &SpecificFileLocation="")
 
COREUOBJECT_API bool TryUpdateDefaultConfigFile (const FString &SpecificFileLocation="", bool bWarnIfFail=true)
 
COREUOBJECT_API void UpdateGlobalUserConfigFile ()
 
COREUOBJECT_API void UpdateProjectUserConfigFile ()
 
COREUOBJECT_API void UpdateSinglePropertyInConfigFile (const FProperty *InProperty, const FString &InConfigIniName)
 
COREUOBJECT_API FString GetDefaultConfigFilename () const
 
COREUOBJECT_API FString GetGlobalUserConfigFilename () const
 
COREUOBJECT_API FString GetProjectUserConfigFilename () const
 
virtual const TCHARGetConfigOverridePlatform () const
 
virtual void OverrideConfigSection (FString &SectionName)
 
virtual void OverridePerObjectConfigSection (FString &SectionName)
 
COREUOBJECT_API void LoadConfig (UClass *ConfigClass=nullptr, const TCHAR *Filename=nullptr, uint32 PropagationFlags=UE::LCPF_None, class FProperty *PropertyToLoad=nullptr, TArray< UE::ConfigAccessTracking::FConfigAccessData > *OutAccessedKeys=nullptr)
 
COREUOBJECT_API void ReloadConfig (UClass *ConfigClass=NULL, const TCHAR *Filename=NULL, uint32 PropagationFlags=UE::LCPF_None, class FProperty *PropertyToLoad=NULL)
 
COREUOBJECT_API void ParseParms (const TCHAR *Parms)
 
COREUOBJECT_API void OutputReferencers (FOutputDevice &Ar, FReferencerInformationList *Referencers=NULL)
 
COREUOBJECT_API void RetrieveReferencers (TArray< FReferencerInformation > *OutInternalReferencers, TArray< FReferencerInformation > *OutExternalReferencers)
 
COREUOBJECT_API void SetLinker (FLinkerLoad *LinkerLoad, int32 LinkerIndex, bool bShouldDetachExisting=true, bool bSilenceLogs=false)
 
COREUOBJECT_API UObjectGetArchetype () const
 
COREUOBJECT_API void GetArchetypeInstances (TArray< UObject * > &Instances)
 
COREUOBJECT_API void InstanceSubobjectTemplates (struct FObjectInstancingGraph *InstanceGraph=NULL)
 
template<class T >
bool Implements () const
 
virtual COREUOBJECT_API void ProcessEvent (UFunction *Function, void *Parms)
 
virtual int32 GetFunctionCallspace (UFunction *Function, FFrame *Stack)
 
virtual bool CallRemoteFunction (UFunction *Function, void *Parms, struct FOutParmRec *OutParms, FFrame *Stack)
 
COREUOBJECT_API bool CallFunctionByNameWithArguments (const TCHAR *Cmd, FOutputDevice &Ar, UObject *Executor, bool bForceCallWithNonExec=false)
 
COREUOBJECT_API void CallFunction (FFrame &Stack, RESULT_DECL, UFunction *Function)
 
 DECLARE_FUNCTION (ProcessInternal)
 
virtual bool ProcessConsoleExec (const TCHAR *Cmd, FOutputDevice &Ar, UObject *Executor)
 
COREUOBJECT_API void SkipFunction (FFrame &Stack, RESULT_DECL, UFunction *Function)
 
virtual UClassRegenerateClass (UClass *ClassToRegenerate, UObject *PreviousCDO)
 
COREUOBJECT_API bool IsInBlueprint () const
 
COREUOBJECT_API void DestroyNonNativeProperties ()
 
virtual void MarkAsEditorOnlySubobject ()
 
COREUOBJECT_API void AbortInsideMemberFunction () const
 
 DECLARE_FUNCTION (execUndefined)
 
 DECLARE_FUNCTION (execLocalVariable)
 
 DECLARE_FUNCTION (execInstanceVariable)
 
 DECLARE_FUNCTION (execDefaultVariable)
 
 DECLARE_FUNCTION (execLocalOutVariable)
 
 DECLARE_FUNCTION (execInterfaceVariable)
 
 DECLARE_FUNCTION (execClassSparseDataVariable)
 
 DECLARE_FUNCTION (execInterfaceContext)
 
 DECLARE_FUNCTION (execArrayElement)
 
 DECLARE_FUNCTION (execBoolVariable)
 
 DECLARE_FUNCTION (execClassDefaultVariable)
 
 DECLARE_FUNCTION (execEndFunctionParms)
 
 DECLARE_FUNCTION (execNothing)
 
 DECLARE_FUNCTION (execNothingInt32)
 
 DECLARE_FUNCTION (execNothingOp4a)
 
 DECLARE_FUNCTION (execBreakpoint)
 
 DECLARE_FUNCTION (execTracepoint)
 
 DECLARE_FUNCTION (execWireTracepoint)
 
 DECLARE_FUNCTION (execInstrumentation)
 
 DECLARE_FUNCTION (execEndOfScript)
 
 DECLARE_FUNCTION (execReturnNothing)
 
 DECLARE_FUNCTION (execEmptyParmValue)
 
 DECLARE_FUNCTION (execJump)
 
 DECLARE_FUNCTION (execJumpIfNot)
 
 DECLARE_FUNCTION (execAssert)
 
 DECLARE_FUNCTION (execPushExecutionFlow)
 
 DECLARE_FUNCTION (execPopExecutionFlow)
 
 DECLARE_FUNCTION (execComputedJump)
 
 DECLARE_FUNCTION (execPopExecutionFlowIfNot)
 
 DECLARE_FUNCTION (execLet)
 
 DECLARE_FUNCTION (execLetObj)
 
 DECLARE_FUNCTION (execLetWeakObjPtr)
 
 DECLARE_FUNCTION (execLetBool)
 
 DECLARE_FUNCTION (execLetDelegate)
 
 DECLARE_FUNCTION (execLetMulticastDelegate)
 
 DECLARE_FUNCTION (execAddMulticastDelegate)
 
 DECLARE_FUNCTION (execClearMulticastDelegate)
 
 DECLARE_FUNCTION (execEatReturnValue)
 
 DECLARE_FUNCTION (execRemoveMulticastDelegate)
 
 DECLARE_FUNCTION (execSelf)
 
 DECLARE_FUNCTION (execContext)
 
 DECLARE_FUNCTION (execContext_FailSilent)
 
 DECLARE_FUNCTION (execStructMemberContext)
 
 DECLARE_FUNCTION (execVirtualFunction)
 
 DECLARE_FUNCTION (execFinalFunction)
 
 DECLARE_FUNCTION (execLocalVirtualFunction)
 
 DECLARE_FUNCTION (execLocalFinalFunction)
 
 DECLARE_FUNCTION (execStructCmpEq)
 
 DECLARE_FUNCTION (execStructCmpNe)
 
 DECLARE_FUNCTION (execStructMember)
 
 DECLARE_FUNCTION (execEqualEqual_DelegateDelegate)
 
 DECLARE_FUNCTION (execNotEqual_DelegateDelegate)
 
 DECLARE_FUNCTION (execEqualEqual_DelegateFunction)
 
 DECLARE_FUNCTION (execNotEqual_DelegateFunction)
 
 DECLARE_FUNCTION (execIntConst)
 
 DECLARE_FUNCTION (execInt64Const)
 
 DECLARE_FUNCTION (execUInt64Const)
 
 DECLARE_FUNCTION (execSkipOffsetConst)
 
 DECLARE_FUNCTION (execFloatConst)
 
 DECLARE_FUNCTION (execDoubleConst)
 
 DECLARE_FUNCTION (execStringConst)
 
 DECLARE_FUNCTION (execUnicodeStringConst)
 
 DECLARE_FUNCTION (execTextConst)
 
 DECLARE_FUNCTION (execPropertyConst)
 
 DECLARE_FUNCTION (execObjectConst)
 
 DECLARE_FUNCTION (execSoftObjectConst)
 
 DECLARE_FUNCTION (execFieldPathConst)
 
 DECLARE_FUNCTION (execInstanceDelegate)
 
 DECLARE_FUNCTION (execNameConst)
 
 DECLARE_FUNCTION (execByteConst)
 
 DECLARE_FUNCTION (execIntZero)
 
 DECLARE_FUNCTION (execIntOne)
 
 DECLARE_FUNCTION (execTrue)
 
 DECLARE_FUNCTION (execFalse)
 
 DECLARE_FUNCTION (execNoObject)
 
 DECLARE_FUNCTION (execNullInterface)
 
 DECLARE_FUNCTION (execIntConstByte)
 
 DECLARE_FUNCTION (execRotationConst)
 
 DECLARE_FUNCTION (execVectorConst)
 
 DECLARE_FUNCTION (execVector3fConst)
 
 DECLARE_FUNCTION (execTransformConst)
 
 DECLARE_FUNCTION (execStructConst)
 
 DECLARE_FUNCTION (execSetArray)
 
 DECLARE_FUNCTION (execSetSet)
 
 DECLARE_FUNCTION (execSetMap)
 
 DECLARE_FUNCTION (execArrayConst)
 
 DECLARE_FUNCTION (execSetConst)
 
 DECLARE_FUNCTION (execMapConst)
 
 DECLARE_FUNCTION (execBitFieldConst)
 
 DECLARE_FUNCTION (execNew)
 
 DECLARE_FUNCTION (execClassContext)
 
 DECLARE_FUNCTION (execNativeParm)
 
 DECLARE_FUNCTION (execCast)
 
 DECLARE_FUNCTION (execDynamicCast)
 
 DECLARE_FUNCTION (execMetaCast)
 
 DECLARE_FUNCTION (execInterfaceCast)
 
 DECLARE_FUNCTION (execDoubleToFloatCast)
 
 DECLARE_FUNCTION (execFloatToDoubleCast)
 
 DECLARE_FUNCTION (execObjectToBool)
 
 DECLARE_FUNCTION (execInterfaceToBool)
 
 DECLARE_FUNCTION (execObjectToInterface)
 
 DECLARE_FUNCTION (execInterfaceToInterface)
 
 DECLARE_FUNCTION (execInterfaceToObject)
 
 DECLARE_FUNCTION (execGetDynArrayElement)
 
 DECLARE_FUNCTION (execSetDynArrayElement)
 
 DECLARE_FUNCTION (execGetDynArrayLength)
 
 DECLARE_FUNCTION (execSetDynArrayLength)
 
 DECLARE_FUNCTION (execDynArrayInsert)
 
 DECLARE_FUNCTION (execDynArrayRemove)
 
 DECLARE_FUNCTION (execDynArrayFind)
 
 DECLARE_FUNCTION (execDynArrayFindStruct)
 
 DECLARE_FUNCTION (execDynArrayAdd)
 
 DECLARE_FUNCTION (execDynArrayAddItem)
 
 DECLARE_FUNCTION (execDynArrayInsertItem)
 
 DECLARE_FUNCTION (execDynArrayRemoveItem)
 
 DECLARE_FUNCTION (execDynArraySort)
 
 DECLARE_FUNCTION (execBindDelegate)
 
 DECLARE_FUNCTION (execCallMulticastDelegate)
 
 DECLARE_FUNCTION (execLetValueOnPersistentFrame)
 
 DECLARE_FUNCTION (execCallMathFunction)
 
 DECLARE_FUNCTION (execSwitchValue)
 
 DECLARE_FUNCTION (execArrayGetByRef)
 
 DECLARE_FUNCTION (execAutoRtfmTransact)
 
 DECLARE_FUNCTION (execAutoRtfmStopTransact)
 
 DECLARE_FUNCTION (execAutoRtfmAbortIfNot)
 
void ExecuteUbergraph (int32 EntryPoint)
 
virtual void ValidateGeneratedRepEnums (const TArray< struct FRepRecord > &ClassReps) const
 
virtual uint64 GetNetPushIdDynamic () const
 
- Public Member Functions inherited from UObjectBaseUtility
 UObjectBaseUtility ()
 
 UObjectBaseUtility (EObjectFlags InFlags)
 
void SetFlags (EObjectFlags NewFlags)
 
void ClearFlags (EObjectFlags FlagsToClear)
 
bool HasAnyFlags (EObjectFlags FlagsToCheck) const
 
bool HasAllFlags (EObjectFlags FlagsToCheck) const
 
UE_FORCEINLINE_HINT EObjectFlags GetMaskedFlags (EObjectFlags Mask=RF_AllFlags) const
 
UE_FORCEINLINE_HINT void Mark (EObjectMark Marks) const
 
UE_FORCEINLINE_HINT void UnMark (EObjectMark Marks) const
 
UE_FORCEINLINE_HINT bool HasAnyMarks (EObjectMark Marks) const
 
UE_FORCEINLINE_HINT bool HasAllMarks (EObjectMark Marks) const
 
UE_FORCEINLINE_HINT EObjectMark GetAllMarks () const
 
void MarkAsGarbage ()
 
void ClearGarbage ()
 
UE_FORCEINLINE_HINT void AddToRoot ()
 
UE_FORCEINLINE_HINT void RemoveFromRoot ()
 
UE_FORCEINLINE_HINT bool IsRooted () const
 
UE_FORCEINLINE_HINT int32 GetRefCount () const
 
bool ThisThreadAtomicallyClearedRFUnreachable ()
 
UE_FORCEINLINE_HINT bool IsUnreachable () const
 
UE_FORCEINLINE_HINT bool IsNative () const
 
void SetInternalFlags (EInternalObjectFlags FlagsToSet) const
 
UE_FORCEINLINE_HINT EInternalObjectFlags GetInternalFlags () const
 
UE_FORCEINLINE_HINT bool HasAnyInternalFlags (EInternalObjectFlags FlagsToCheck) const
 
void ClearInternalFlags (EInternalObjectFlags FlagsToClear) const
 
bool AtomicallyClearInternalFlags (EInternalObjectFlags FlagsToClear) const
 
COREUOBJECT_API FString GetFullName (const UObject *StopOuter=NULL, EObjectFullNameFlags Flags=EObjectFullNameFlags::None) const
 
COREUOBJECT_API void GetFullName (const UObject *StopOuter, FString &ResultString, EObjectFullNameFlags Flags=EObjectFullNameFlags::None) const
 
COREUOBJECT_API void GetFullName (FStringBuilderBase &ResultString, const UObject *StopOuter=NULL, EObjectFullNameFlags Flags=EObjectFullNameFlags::None) const
 
COREUOBJECT_API FString GetPathName (const UObject *StopOuter=NULL) const
 
COREUOBJECT_API void GetPathName (const UObject *StopOuter, FString &ResultString) const
 
COREUOBJECT_API void GetPathName (const UObject *StopOuter, FStringBuilderBase &ResultString) const
 
virtual bool CanBeClusterRoot () const
 
virtual COREUOBJECT_API bool CanBeInCluster () const
 
virtual COREUOBJECT_API void CreateCluster ()
 
virtual void OnClusterMarkedAsPendingKill ()
 
COREUOBJECT_API void AddToCluster (UObjectBaseUtility *ClusterRootOrObjectFromCluster, bool bAddAsMutableObject=false)
 
COREUOBJECT_API FString GetFullGroupName (bool bStartWithOuter) const
 
UE_FORCEINLINE_HINT FString GetName () const
 
UE_FORCEINLINE_HINT void GetName (FString &ResultString) const
 
UE_FORCEINLINE_HINT void AppendName (FString &ResultString) const
 
COREUOBJECT_API bool IsPackageExternal () const
 
COREUOBJECT_API void DetachExternalPackage ()
 
COREUOBJECT_API void ReattachExternalPackage ()
 
COREUOBJECT_API UObjectGetOutermostObject () const
 
COREUOBJECT_API UPackageGetPackage () const
 
UE_INTERNAL virtual COREUOBJECT_API UE::Core::FVersePath GetVersePath () const
 
COREUOBJECT_API UPackageGetOutermost () const
 
COREUOBJECT_API bool MarkPackageDirty () const
 
COREUOBJECT_API bool IsTemplate (EObjectFlags TemplateTypes=RF_ArchetypeObject|RF_ClassDefaultObject) const
 
COREUOBJECT_API UObjectGetTypedOuter (UClass *Target) const
 
template<typename T >
T * GetTypedOuter () const
 
template<typename InterfaceClassType >
InterfaceClassTypeGetImplementingOuter () const
 
COREUOBJECT_API UObjectBaseUtilityGetImplementingOuterObject (const UClass *InInterfaceClass) const
 
COREUOBJECT_API bool IsIn (const UObject *SomeOuter) const
 
COREUOBJECT_API bool IsIn (const UPackage *SomePackage) const
 
COREUOBJECT_API bool IsInOuter (const UObject *SomeOuter) const
 
COREUOBJECT_API bool IsInPackage (const UPackage *SomePackage) const
 
COREUOBJECT_API bool IsInA (const UClass *SomeBaseClass) const
 
COREUOBJECT_API bool RootPackageHasAnyFlags (uint32 CheckFlagMask) const
 
template<typename OtherClassType >
bool IsA (OtherClassType SomeBase) const
 
template<class T >
bool IsA () const
 
COREUOBJECT_API const UClassFindNearestCommonBaseClass (const UClass *TestClass) const
 
COREUOBJECT_API voidGetInterfaceAddress (UClass *InterfaceClass)
 
COREUOBJECT_API voidGetNativeInterfaceAddress (UClass *InterfaceClass)
 
const voidGetNativeInterfaceAddress (UClass *InterfaceClass) const
 
COREUOBJECT_API bool IsTemplateForSubobjects (EObjectFlags TemplateTypes=RF_ClassDefaultObject|RF_DefaultSubObject|RF_InheritableComponentTemplate) const
 
COREUOBJECT_API bool IsDefaultSubobject () const
 
COREUOBJECT_API class FLinkerLoadGetLinker () const
 
COREUOBJECT_API int32 GetLinkerIndex () const
 
COREUOBJECT_API FPackageFileVersion GetLinkerUEVersion () const
 
int32 GetLinkerUE4Version () const
 
COREUOBJECT_API int32 GetLinkerLicenseeUEVersion () const
 
int32 GetLinkerLicenseeUE4Version () const
 
COREUOBJECT_API int32 GetLinkerCustomVersion (FGuid CustomVersionKey) const
 
UE_FORCEINLINE_HINT bool operator< (const UObjectBaseUtility &Other) const
 
TStatId GetStatID (bool bForDeferredUse=false) const
 
- Public Member Functions inherited from UObjectBase
COREUOBJECT_API UObjectBase (UClass *InClass, EObjectFlags InFlags, EInternalObjectFlags InInternalFlags, UObject *InOuter, FName InName, int32 InInternalIndex=-1, int32 InSerialNumber=0, FRemoteObjectId InRemoteId=FRemoteObjectId())
 
virtual COREUOBJECT_API ~UObjectBase ()
 
COREUOBJECT_API bool IsValidLowLevel () const
 
COREUOBJECT_API bool IsValidLowLevelFast (bool bRecursive=true) const
 
FORCEINLINE uint32 GetUniqueID () const
 
FORCEINLINE UClassGetClass () const
 
FORCEINLINE UObjectGetOuter () const
 
FORCEINLINE FName GetFName () const
 
virtual COREUOBJECT_API FName GetFNameForStatID () const
 
COREUOBJECT_API UPackageGetExternalPackage () const
 
COREUOBJECT_API void SetExternalPackage (UPackage *InPackage)
 
COREUOBJECT_API UPackageGetExternalPackageInternal () const
 
COREUOBJECT_API void MarkAsReachable () const
 
COREUOBJECT_API void AddRef () const
 
COREUOBJECT_API void ReleaseRef () const
 
FORCEINLINE EObjectFlags GetFlags () const
 
FORCENOINLINE void AtomicallySetFlags (EObjectFlags FlagsToAdd)
 
FORCENOINLINE void AtomicallyClearFlags (EObjectFlags FlagsToClear)
 

Static Public Member Functions

static ENGINE_API void UpdateAllCanvasSafeZoneData ()
 
static ENGINE_API void ClippedStrLen (const UFont *Font, float ScaleX, float ScaleY, int32 &XL, int32 &YL, FStringView Text)
 
static ENGINE_API void MeasureStringInternal (FTextSizingParameters &Parameters, FStringView Text, const int32 StopAfterHorizontalOffset, const ELastCharacterIndexFormat CharIndexFormat, int32 &OutLastCharacterIndex)
 
static ENGINE_API void MeasureStringInternal (FTextSizingParameters &Parameters, const TCHAR *const Text, const int32 TextLength, const int32 StopAfterHorizontalOffset, const ELastCharacterIndexFormat CharIndexFormat, int32 &OutLastCharacterIndex)
 
static ENGINE_API void CanvasStringSize (FTextSizingParameters &Parameters, FStringView Text)
 
static ENGINE_API void WrapString (FCanvasWordWrapper &Wrapper, FTextSizingParameters &Parameters, const float InCurX, FStringView Text, TArray< FWrappedStringElement > &out_Lines, FCanvasWordWrapper::FWrappedLineData *const OutWrappedLineData=nullptr)
 
static ENGINE_API void StrLen (const UFont *InFont, FStringView InText, float &XL, float &YL, bool bDPIAware, FCanvas *InCanvas)
 
static ENGINE_API void StrLen (const UFont *InFont, FStringView InText, double &XL, double &YL, bool bDPIAware, FCanvas *InCanvas)
 
static ENGINE_API void StrLen (const UFont *InFont, FAnsiStringView InText, float &XL, float &YL, bool bDPIAware, FCanvas *InCanvas)
 
static ENGINE_API void StrLen (const UFont *InFont, FAnsiStringView InText, double &XL, double &YL, bool bDPIAware, FCanvas *InCanvas)
 
static ENGINE_API FCanvasIcon MakeIcon (class UTexture *Texture, float U=0.f, float V=0.f, float UL=0.f, float VL=0.f)
 
- Static Public Member Functions inherited from UObject
static COREUOBJECT_API void UpdateClassesExcludedFromDedicatedServer (const TArray< FString > &InClassNames, const TArray< FString > &InModulesNames)
 
static COREUOBJECT_API void UpdateClassesExcludedFromDedicatedClient (const TArray< FString > &InClassNames, const TArray< FString > &InModulesNames)
 
static COREUOBJECT_API bool CanCreateInCurrentContext (UObject *Template)
 
static COREUOBJECT_API void AddReferencedObjects (UObject *InThis, FReferenceCollector &Collector)
 
static COREUOBJECT_API const FNameSourceFileTagName ()
 
static COREUOBJECT_API UObjectGetArchetypeFromRequiredInfo (const UClass *Class, const UObject *Outer, FName Name, EObjectFlags ObjectFlags)
 
- Static Public Member Functions inherited from UObjectBaseUtility
static bool IsGarbageEliminationEnabled ()
 
static bool IsPendingKillEnabled ()
 
static void SetGarbageEliminationEnabled (bool bEnabled)
 
static COREUOBJECT_API void ReloadObjectsFromModifiedConfigSections (const class FConfigModificationTracker *ChangeTracker)
 
- Static Public Member Functions inherited from UObjectBase
static COREUOBJECT_API FString RemoveClassPrefix (const TCHAR *ClassName)
 
static void PrefetchClass (UObject *Object)
 
static void PrefetchOuter (UObject *Object)
 

Public Attributes

FCanvasCanvas
 
FSceneViewSceneView
 
FMatrix ViewProjectionMatrix
 
FQuat HmdOrientation
 

Additional Inherited Members

- Protected Member Functions inherited from UObject
virtual FString GetDetailedInfoInternal () const
 
COREUOBJECT_API bool CanCheckDefaultSubObjects (bool bForceCheck, bool &bResult) const
 
virtual COREUOBJECT_API bool CheckDefaultSubobjectsInternal () const
 
- Protected Member Functions inherited from UObjectBase
 UObjectBase ()
 
COREUOBJECT_API UObjectBase (EObjectFlags InFlags)
 
COREUOBJECT_API void LowLevelRename (FName NewName, UObject *NewOuter=NULL)
 
virtual void RegisterDependencies ()
 
COREUOBJECT_API void Register (class UClass *(*StaticClassFn)(), const TCHAR *PackageName, const TCHAR *Name)
 
COREUOBJECT_API void Register (const TCHAR *PackageName, const TCHAR *Name)
 
virtual COREUOBJECT_API void DeferredRegister (UClass *UClassStaticClass, const TCHAR *PackageName, const TCHAR *Name)
 
FORCEINLINE void SetFlagsTo (EObjectFlags NewFlags)
 

Detailed Description

A drawing canvas.

Member Enumeration Documentation

◆ ELastCharacterIndexFormat

Enumerator
LastWholeCharacterBeforeOffset 
CharacterAtOffset 
Unused 

Member Function Documentation

◆ ApplySafeZoneTransform()

void UCanvas::ApplySafeZoneTransform ( )

◆ BeginDestroy()

void UCanvas::BeginDestroy ( )
overridevirtual

Called before destroying the object. This is called immediately upon deciding to destroy the object, to allow the object to begin an asynchronous cleanup process.

Reimplemented from UObject.

◆ CanvasStringSize()

void UCanvas::CanvasStringSize ( FTextSizingParameters Parameters,
FStringView  Text 
)
static

Calculates the size of the specified string.

Parameters
ParametersUsed for various purposes DrawXL: [out] will be set to the width of the string DrawYL: [out] will be set to the height of the string DrawFont: [in] specifies the font to use for retrieving the size of the characters in the string Scale: [in] specifies the amount of scaling to apply to the string
Textthe string to calculate the size for

◆ ClippedStrLen()

void UCanvas::ClippedStrLen ( const UFont Font,
float  ScaleX,
float  ScaleY,
int32 XL,
int32 YL,
FStringView  Text 
)
static

Calculate the length of a string.

Parameters
FontThe font used.
ScaleXScale in X axis.
ScaleYScale in Y axis.
XLout Horizontal length of string.
YLout Vertical length of string.
TextString to calculate for.

◆ CreateFontRenderInfo()

FFontRenderInfo UCanvas::CreateFontRenderInfo ( bool  bClipText = false,
bool  bEnableShadow = false,
FLinearColor  GlowColor = FLinearColor(),
FVector2D  GlowOuterRadius = FVector2D(),
FVector2D  GlowInnerRadius = FVector2D() 
)

constructor for FontRenderInfo

◆ Deproject()

void UCanvas::Deproject ( FVector2D  ScreenPos,
FVector WorldOrigin,
FVector WorldDirection 
) const

Transforms 2D screen coordinates into a 3D world-space origin and direction.

Parameters
ScreenPosScreen coordinates in pixels.
WorldOrigin(out) World-space origin vector.
WorldDirection(out) World-space direction vector.

◆ DrawDebugGraph()

void UCanvas::DrawDebugGraph ( const FString &  Title,
float  ValueX,
float  ValueY,
float  UL_X,
float  UL_Y,
float  W,
float  H,
FVector2D  RangeX,
FVector2D  RangeY 
)
virtual

Draws a graph comparing 2 variables. Useful for visual debugging and tweaking.

Parameters
TitleLabel to draw on the graph, or "" for none
ValueXX-axis value of the point to plot
ValueYY-axis value of the point to plot
UL_XX screen coord of the upper-left corner of the graph
UL_YY screen coord of the upper-left corner of the graph
WWidth of the graph, in pixels
HHeight of the graph, in pixels
RangeXRange of values expressed by the X axis of the graph
RangeYRange of values expressed by the Y axis of the graph

◆ DrawIcon()

void UCanvas::DrawIcon ( FCanvasIcon  Icon,
float  X,
float  Y,
float  Scale = 0.f 
)

Draw a CanvasIcon at the desired canvas position.

◆ DrawItem() [1/3]

void UCanvas::DrawItem ( FCanvasItem Item)

Draw a CanvasItem

Parameters
ItemItem to draw

◆ DrawItem() [2/3]

void UCanvas::DrawItem ( FCanvasItem Item,
const FVector2D InPosition 
)

Draw a CanvasItem at the given coordinates

Parameters
ItemItem to draw
InPositionPosition to draw item

◆ DrawItem() [3/3]

void UCanvas::DrawItem ( FCanvasItem Item,
float  X,
float  Y 
)

Draw a CanvasItem at the given coordinates

Parameters
ItemItem to draw
XX Position to draw item
YY Position to draw item

◆ DrawScaledIcon()

void UCanvas::DrawScaledIcon ( FCanvasIcon  Icon,
float  X,
float  Y,
FVector  Scale 
)

Draw a scaled CanvasIcon at the desired canvas position.

◆ DrawText() [1/3]

float UCanvas::DrawText ( const UFont InFont,
const FText InText,
float  X,
float  Y,
float  XScale = 1.f,
float  YScale = 1.f,
const FFontRenderInfo RenderInfo = FFontRenderInfo() 
)

◆ DrawText() [2/3]

float UCanvas::DrawText ( const UFont InFont,
FAnsiStringView  InText,
float  X,
float  Y,
float  XScale = 1.f,
float  YScale = 1.f,
const FFontRenderInfo RenderInfo = FFontRenderInfo() 
)

◆ DrawText() [3/3]

float UCanvas::DrawText ( const UFont InFont,
FStringView  InText,
float  X,
float  Y,
float  XScale = 1.f,
float  YScale = 1.f,
const FFontRenderInfo RenderInfo = FFontRenderInfo() 
)

Draws a string of text to the screen.

Parameters
InFontThe font to draw with.
InTextThe string to be drawn.
XPosition to draw X.
YPosition to draw Y.
XScaleOptional. The horizontal scaling to apply to the text.
YScaleOptional. The vertical scaling to apply to the text.
RenderInfoOptional. The FontRenderInfo to use when drawing the text.
Returns
The Y extent of the rendered text.

◆ DrawTile()

void UCanvas::DrawTile ( UTexture Tex,
float  X,
float  Y,
float  XL,
float  YL,
float  U,
float  V,
float  UL,
float  VL,
EBlendMode  BlendMode = BLEND_Translucent 
)

Draw arbitrary aligned rectangle.

Parameters
TexTexture to draw.
XPosition to draw X.
YPosition to draw Y.
XLWidth of tile.
YLHeight of tile.
UHorizontal position of the upper left corner of the portion of the texture to be shown(texels).
VVertical position of the upper left corner of the portion of the texture to be shown(texels).
ULThe width of the portion of the texture to be drawn(texels).
VLThe height of the portion of the texture to be drawn(texels).
BlendModeBlending mode of texture.

◆ GetCenter() [1/2]

void UCanvas::GetCenter ( double outX,
double outY 
) const

◆ GetCenter() [2/2]

void UCanvas::GetCenter ( float outX,
float outY 
) const

Return X,Y for center of the draw region.

◆ GetDPIScale()

float UCanvas::GetDPIScale ( ) const
inline
Returns
the current DPI scale being applied to all canvas draw elements

◆ GetReporterGraph()

TWeakObjectPtr< class UReporterGraph > UCanvas::GetReporterGraph ( )

Creates if necessary and returns ReporterGraph instance for 2d graph canvas drawing

◆ Init()

void UCanvas::Init ( int32  InSizeX,
int32  InSizeY,
FSceneView InSceneView,
FCanvas InCanvas 
)

Initializes the canvas.

◆ K2_Deproject()

void UCanvas::K2_Deproject ( FVector2D  ScreenPosition,
FVector WorldOrigin,
FVector WorldDirection 
)

Performs a deprojection of a screen space coordinate using the projection matrix set up for the Canvas.

Parameters
ScreenPositionScreen space position to deproject to the World.
WorldOriginVector which is the world position of the screen space position.
WorldDirectionVector which can be used in a trace to determine what is "behind" the screen space position. Useful for object picking.

◆ K2_DrawBorder()

void UCanvas::K2_DrawBorder ( UTexture BorderTexture,
UTexture BackgroundTexture,
UTexture LeftBorderTexture,
UTexture RightBorderTexture,
UTexture TopBorderTexture,
UTexture BottomBorderTexture,
FVector2D  ScreenPosition,
FVector2D  ScreenSize,
FVector2D  CoordinatePosition,
FVector2D  CoordinateSize = FVector2D::UnitVector,
FLinearColor  RenderColor = FLinearColor::White,
FVector2D  BorderScale = FVector2D(0.1f,0.1f),
FVector2D  BackgroundScale = FVector2D(0.1f,0.1f),
float  Rotation = 0.0f,
FVector2D  PivotPoint = FVector2D(0.5f,0.5f),
FVector2D  CornerSize = FVector2D::ZeroVector 
)

Draws a 3x3 grid border with tiled frame and tiled interior on the Canvas.

Parameters
BorderTextureTexture to use for border.
BackgroundTextureTexture to use for border background.
LeftBorderTextureTexture to use for the tiling left border.
RightBorderTextureTexture to use for the tiling right border.
TopBorderTextureTexture to use for the tiling top border.
BottomBorderTextureTexture to use for the tiling bottom border.
ScreenPositionScreen space position to render the texture.
ScreenSizeScreen space size to render the texture.
CoordinatePositionNormalized UV starting coordinate to use when rendering the border texture.
CoordinateSizeNormalized UV size coordinate to use when rendering the border texture.
RenderColorColor to tint the border.
BorderScaleScale of the border.
BackgroundScaleScale of the background.
RotationRotation, in degrees, to render the texture.
PivotPointNormalized pivot point to use when rotating the texture.
CornerSizeFrame corner size in percent of frame texture (should be < 0.5f).

◆ K2_DrawBox()

void UCanvas::K2_DrawBox ( FVector2D  ScreenPosition,
FVector2D  ScreenSize,
float  Thickness = 1.0f,
FLinearColor  RenderColor = FLinearColor::White 
)

Draws an unfilled box on the Canvas.

Parameters
ScreenPositionScreen space position to render the text.
ScreenSizeScreen space size to render the texture.
ThicknessHow many pixels thick the box lines should be.
RenderColorColor to tint the box.

◆ K2_DrawLine()

void UCanvas::K2_DrawLine ( FVector2D  ScreenPositionA = FVector2D::ZeroVector,
FVector2D  ScreenPositionB = FVector2D::ZeroVector,
float  Thickness = 1.0f,
FLinearColor  RenderColor = FLinearColor::White 
)

Draws a line on the Canvas.

Parameters
ScreenPositionAStarting position of the line in screen space.
ScreenPositionBEnding position of the line in screen space.
ThicknessHow many pixels thick this line should be.
RenderColorColor to render the line.

◆ K2_DrawMaterial()

void UCanvas::K2_DrawMaterial ( UMaterialInterface RenderMaterial,
FVector2D  ScreenPosition,
FVector2D  ScreenSize,
FVector2D  CoordinatePosition,
FVector2D  CoordinateSize = FVector2D::UnitVector,
float  Rotation = 0.f,
FVector2D  PivotPoint = FVector2D(0.5f,0.5f) 
)

Draws a material on the Canvas.

Parameters
RenderMaterialMaterial to use when rendering. Remember that only the emissive channel is able to be rendered as no lighting is performed when rendering to the Canvas.
ScreenPositionScreen space position to render the texture.
ScreenSizeScreen space size to render the texture.
CoordinatePositionNormalized UV starting coordinate to use when rendering the texture.
CoordinateSizeNormalized UV size coordinate to use when rendering the texture.
RotationRotation, in degrees, to render the texture.
PivotPointNormalized pivot point to use when rotating the texture.

◆ K2_DrawMaterialTriangle()

void UCanvas::K2_DrawMaterialTriangle ( UMaterialInterface RenderMaterial,
TArray< FCanvasUVTri Triangles 
)

Draws a set of triangles on the Canvas.

Parameters
RenderMaterialMaterial to use when rendering. Remember that only the emissive channel is able to be rendered as no lighting is performed when rendering to the Canvas.
TrianglesTriangles to render.

◆ K2_DrawPolygon()

void UCanvas::K2_DrawPolygon ( UTexture RenderTexture,
FVector2D  ScreenPosition,
FVector2D  Radius = FVector2D::UnitVector,
int32  NumberOfSides = 3,
FLinearColor  RenderColor = FLinearColor::White 
)

Draws a polygon on the Canvas.

Parameters
RenderTextureTexture to use when rendering the triangles. If no texture is set, then the default white texture is used.
ScreenPositionScreen space position to render the text.
RadiusHow large in pixels this polygon should be.
NumberOfSidesHow many sides this polygon should have. This should be above or equal to three.
RenderColorColor to tint the polygon.

◆ K2_DrawText()

void UCanvas::K2_DrawText ( UFont RenderFont,
const FString &  RenderText,
FVector2D  ScreenPosition,
FVector2D  Scale = FVector2D(1.0f,1.0f),
FLinearColor  RenderColor = FLinearColor::White,
float  Kerning = 0.0f,
FLinearColor  ShadowColor = FLinearColor::Black,
FVector2D  ShadowOffset = FVector2D::UnitVector,
bool  bCentreX = false,
bool  bCentreY = false,
bool  bOutlined = false,
FLinearColor  OutlineColor = FLinearColor::Black 
)

Draws text on the Canvas.

Parameters
RenderFontFont to use when rendering the text. If this is null, then a default engine font is used.
RenderTextText to render on the Canvas.
ScreenPositionScreen space position to render the text.
RenderColorColor to render the text.
KerningHorizontal spacing adjustment to modify the spacing between each letter.
ShadowColorColor to render the shadow of the text.
ShadowOffsetPixel offset relative to the screen space position to render the shadow of the text.
bCentreXIf true, then interpret the screen space position X coordinate as the center of the rendered text.
bCentreYIf true, then interpret the screen space position Y coordinate as the center of the rendered text.
bOutlinedIf true, then the text should be rendered with an outline.
OutlineColorColor to render the outline for the text.

◆ K2_DrawTexture()

void UCanvas::K2_DrawTexture ( UTexture RenderTexture,
FVector2D  ScreenPosition,
FVector2D  ScreenSize,
FVector2D  CoordinatePosition,
FVector2D  CoordinateSize = FVector2D::UnitVector,
FLinearColor  RenderColor = FLinearColor::White,
EBlendMode  BlendMode = BLEND_Translucent,
float  Rotation = 0.f,
FVector2D  PivotPoint = FVector2D(0.5f,0.5f) 
)

Draws a texture on the Canvas.

Parameters
RenderTextureTexture to use when rendering. If no texture is set then this will use the default white texture.
ScreenPositionScreen space position to render the texture.
ScreenSizeScreen space size to render the texture.
CoordinatePositionNormalized UV starting coordinate to use when rendering the texture.
CoordinateSizeNormalized UV size coordinate to use when rendering the texture.
RenderColorColor to use when rendering the texture.
BlendModeBlending mode to use when rendering the texture.
RotationRotation, in degrees, to render the texture.
PivotPointNormalized pivot point to use when rotating the texture.

◆ K2_DrawTriangle()

void UCanvas::K2_DrawTriangle ( UTexture RenderTexture,
TArray< FCanvasUVTri Triangles 
)

Draws a set of triangles on the Canvas.

Parameters
RenderTextureTexture to use when rendering the triangles. If no texture is set, then the default white texture is used.
TrianglesTriangles to render.

◆ K2_Project()

FVector UCanvas::K2_Project ( FVector  WorldLocation)

Performs a projection of a world space coordinates using the projection matrix set up for the Canvas.

Parameters
WorldLocationWorld space location to project onto the Canvas rendering plane.
Returns
Returns a vector where X, Y defines a screen space position representing the world space location.

◆ K2_StrLen()

FVector2D UCanvas::K2_StrLen ( UFont RenderFont,
const FString &  RenderText 
)

Returns the wrapped text size in screen space coordinates.

Parameters
RenderFontFont to use when determining the size of the text. If this is null, then a default engine font is used.
RenderTextText to determine the size of.
Returns
Returns the screen space size of the text.

◆ K2_TextSize()

FVector2D UCanvas::K2_TextSize ( UFont RenderFont,
const FString &  RenderText,
FVector2D  Scale = FVector2D::UnitVector 
)

Returns the clipped text size in screen space coordinates.

Parameters
RenderFontFont to use when determining the size of the text. If this is null, then a default engine font is used.
RenderTextText to determine the size of.
ScaleScale of the font to use when determining the size of the text.
Returns
Returns the screen space size of the text.

◆ MakeIcon()

FCanvasIcon UCanvas::MakeIcon ( class UTexture Texture,
float  U = 0.f,
float  V = 0.f,
float  UL = 0.f,
float  VL = 0.f 
)
static

Fake CanvasIcon constructor.

◆ MeasureStringInternal() [1/2]

void UCanvas::MeasureStringInternal ( FTextSizingParameters Parameters,
const TCHAR *const  Text,
const int32  TextLength,
const int32  StopAfterHorizontalOffset,
const ELastCharacterIndexFormat  CharIndexFormat,
int32 OutLastCharacterIndex 
)
static

◆ MeasureStringInternal() [2/2]

void UCanvas::MeasureStringInternal ( FTextSizingParameters Parameters,
FStringView  Text,
const int32  StopAfterHorizontalOffset,
const ELastCharacterIndexFormat  CharIndexFormat,
int32 OutLastCharacterIndex 
)
static

Measures a string, optionally stopped after the specified horizontal offset in pixels is reached.

Parameters
ParametersUsed for various purposes DrawXL: [out] will be set to the width of the string DrawYL: [out] will be set to the height of the string DrawFont: [in] specifies the font to use for retrieving the size of the characters in the string Scale: [in] specifies the amount of scaling to apply to the string
TextThe string to calculate the size for
StopAfterHorizontalOffsetOffset horizontally into the string to stop measuring characters after, in pixels (or INDEX_NONE)
CharIndexFormatBehavior to use for StopAfterHorizontalOffset
OutLastCharacterIndexThe index of the last character processed (used with StopAfterHorizontalOffset)

◆ PopSafeZoneTransform()

void UCanvas::PopSafeZoneTransform ( )

◆ Project()

FVector UCanvas::Project ( FVector  Location,
bool  bClampToZeroPlane = true 
) const

Transforms a 3D world-space vector into 2D screen coordinates.

Parameters
LocationThe vector to transform.
bClampToZeroPlaneIf true, 2D screen coordinates behind the viewing plane (-Z) will have Z set to 0 (leaving X and Y alone)
Returns
The transformed vector.

◆ Reset()

void UCanvas::Reset ( bool  bKeepOrigin = false)
virtual

reset canvas parameters, optionally do not change the origin

◆ SetClip()

void UCanvas::SetClip ( float  X,
float  Y 
)

Sets the position of the lower-left corner of the clipping region of the Canvas

◆ SetDrawColor() [1/2]

void UCanvas::SetDrawColor ( FColor const &  C)

Set draw color. (FColor)

◆ SetDrawColor() [2/2]

void UCanvas::SetDrawColor ( uint8  R,
uint8  G,
uint8  B,
uint8  A = 255 
)

Set draw color. (R,G,B,A)

◆ SetLinearDrawColor()

void UCanvas::SetLinearDrawColor ( FLinearColor  InColor,
float  OpacityOverride = -1.f 
)

Set DrawColor with a FLinearColor and optional opacity override

◆ SetView()

void UCanvas::SetView ( FSceneView InView)

Changes the view for the canvas.

◆ StrLen() [1/8]

void UCanvas::StrLen ( const UFont InFont,
FAnsiStringView  InText,
double XL,
double YL,
bool  bDPIAware,
FCanvas InCanvas 
)
static

◆ StrLen() [2/8]

void UCanvas::StrLen ( const UFont InFont,
FAnsiStringView  InText,
double XL,
double YL,
bool  bDPIAware = false 
)

◆ StrLen() [3/8]

void UCanvas::StrLen ( const UFont InFont,
FAnsiStringView  InText,
float XL,
float YL,
bool  bDPIAware,
FCanvas InCanvas 
)
static

◆ StrLen() [4/8]

void UCanvas::StrLen ( const UFont InFont,
FAnsiStringView  InText,
float XL,
float YL,
bool  bDPIAware = false 
)

◆ StrLen() [5/8]

void UCanvas::StrLen ( const UFont InFont,
FStringView  InText,
double XL,
double YL,
bool  bDPIAware,
FCanvas InCanvas 
)
static

◆ StrLen() [6/8]

void UCanvas::StrLen ( const UFont InFont,
FStringView  InText,
double XL,
double YL,
bool  bDPIAware = false 
)

◆ StrLen() [7/8]

void UCanvas::StrLen ( const UFont InFont,
FStringView  InText,
float XL,
float YL,
bool  bDPIAware,
FCanvas InCanvas 
)
static

Calculate the length of a string, taking text wrapping into account.

Parameters
InFontThe Font use.
InTextThe string to calculate for.
XLout Horizontal length of string.
YLout Vertical length of string.
bDPIAwareIf true measures text considering the current DPI scale factor of the canvas. Defaults to false for backwards compatibility
InCanvasCanvas state object

◆ StrLen() [8/8]

void UCanvas::StrLen ( const UFont InFont,
FStringView  InText,
float XL,
float YL,
bool  bDPIAware = false 
)

Calculate the length of a string, taking text wrapping into account.

Parameters
InFontThe Font use.
InTextThe string to calculate for.
XLout Horizontal length of string.
YLout Vertical length of string.
bDPIAwareIf true measures text considering the current DPI scale factor of the canvas. Defaults to false for backwards compatibility

◆ TextSize() [1/4]

void UCanvas::TextSize ( const UFont InFont,
FAnsiStringView  InText,
double XL,
double YL,
double  ScaleX = 1.f,
double  ScaleY = 1.f 
)

◆ TextSize() [2/4]

void UCanvas::TextSize ( const UFont InFont,
FAnsiStringView  InText,
float XL,
float YL,
float  ScaleX = 1.f,
float  ScaleY = 1.f 
)

◆ TextSize() [3/4]

void UCanvas::TextSize ( const UFont InFont,
FStringView  InText,
double XL,
double YL,
double  ScaleX = 1.f,
double  ScaleY = 1.f 
)

◆ TextSize() [4/4]

void UCanvas::TextSize ( const UFont InFont,
FStringView  InText,
float XL,
float YL,
float  ScaleX = 1.f,
float  ScaleY = 1.f 
)

Calculates the horizontal and vertical size of a given string. This is used for clipped text as it does not take wrapping into account.

Parameters
InFontThe font to use.
InTextString to calculate for.
XLout Horizontal length of string.
YLout Vertical length of string.
ScaleXScale that the string is expected to draw at horizontally.
ScaleYScale that the string is expected to draw at vertically.

◆ Update()

void UCanvas::Update ( )

Updates the canvas.

◆ UpdateAllCanvasSafeZoneData()

void UCanvas::UpdateAllCanvasSafeZoneData ( )
static

◆ UpdateSafeZoneData()

void UCanvas::UpdateSafeZoneData ( )

◆ WrappedPrint()

int32 UCanvas::WrappedPrint ( bool  Draw,
float  X,
float  Y,
int32 out_XL,
int32 out_YL,
const UFont Font,
float  ScaleX,
float  ScaleY,
bool  bCenterTextX,
bool  bCenterTextY,
FStringView  Text,
const FFontRenderInfo RenderInfo 
)

Compute size and optionally print text with word wrap.

◆ WrappedStrLenf()

void VARARGS UCanvas::WrappedStrLenf ( const UFont Font,
float  ScaleX,
float  ScaleY,
int32 XL,
int32 YL,
const TCHAR Fmt,
  ... 
)

Calculate the size of a string built from a font, word wrapped to a specified region.

◆ WrapString() [1/2]

void UCanvas::WrapString ( FCanvasWordWrapper Wrapper,
FTextSizingParameters Parameters,
const float  InCurX,
FStringView  Text,
TArray< FWrappedStringElement > &  out_Lines,
FCanvasWordWrapper::FWrappedLineData *const  OutWrappedLineData = nullptr 
)
static

Parses a single string into an array of strings that will fit inside the specified bounding region.

Parameters
ParametersUsed for various purposes: DrawX: [in] specifies the pixel location of the start of the horizontal bounding region that should be used for wrapping. DrawY: [in] specifies the Y origin of the bounding region. This should normally be set to 0, as this will be used as the base value for DrawYL. [out] Will be set to the Y position (+YL) of the last line, i.e. the total height of all wrapped lines relative to the start of the bounding region DrawXL: [in] specifies the pixel location of the end of the horizontal bounding region that should be used for wrapping DrawYL: [in] specifies the height of the bounding region, in pixels. A input value of 0 indicates that the bounding region height should not be considered. Once the total height of lines reaches this value, the function returns and no further processing occurs. DrawFont: [in] specifies the font to use for retrieving the size of the characters in the string Scale: [in] specifies the amount of scaling to apply to the string
CurXspecifies the pixel location to begin the wrapping; usually equal to the X pos of the bounding region, unless wrapping is initiated in the middle of the bounding region (i.e. indentation)
Textthe text that should be wrapped
out_Lines[out] will contain an array of strings which fit inside the bounding region specified. Does not clear the array first.
OutWrappedLineDataAn optional array to fill with the indices from the source string marking the begin and end points of the wrapped lines

◆ WrapString() [2/2]

void UCanvas::WrapString ( FTextSizingParameters Parameters,
const float  InCurX,
FStringView  Text,
TArray< FWrappedStringElement > &  out_Lines,
FCanvasWordWrapper::FWrappedLineData *const  OutWrappedLineData = nullptr 
)

Member Data Documentation

◆ Canvas

FCanvas* UCanvas::Canvas

◆ HmdOrientation

FQuat UCanvas::HmdOrientation

◆ SceneView

FSceneView* UCanvas::SceneView

◆ ViewProjectionMatrix

FMatrix UCanvas::ViewProjectionMatrix

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