UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Canvas.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
7#include "UObject/Object.h"
9#include "CanvasItem.h"
10#include "CanvasTypes.h"
11#include "Canvas.generated.h"
12
14class UReporterGraph;
15class UTexture;
16class FSceneView;
17
21USTRUCT(BlueprintType)
23{
25
26
27 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=CanvasIcon)
29
31 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=CanvasIcon)
32 float U;
33
34 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=CanvasIcon)
35 float V;
36
37 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=CanvasIcon)
38 float UL;
39
40 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=CanvasIcon)
41 float VL;
42
44 : Texture(nullptr)
45 , U(0)
46 , V(0)
47 , UL(0)
48 , VL(0)
49 { }
50
51};
52
54{
55private:
56 FCanvasTextItem DebugTextItem;
57 FVector2f CurrentPos;
58 float NextColumXPos;
59 float MaxCharHeight;
60 FVector2f InitialPos;
61 class UCanvas* Canvas;
62 int32 ColumnCount;
63public:
65 : DebugTextItem(FCanvasTextItem(FVector2D(0, 0), FText::GetEmpty(), nullptr, FLinearColor::White))
66 , CurrentPos(FVector2f::ZeroVector)
67 , NextColumXPos(0.f)
68 , MaxCharHeight(0.f)
69 , InitialPos(FVector2f::ZeroVector)
70 , Canvas(nullptr)
71 , ColumnCount(0)
72 {
73 DebugTextItem.EnableShadow(FLinearColor::Black);
74 }
75
77 {
79 Canvas = InCanvas;
80 InitialPos = (FVector2f)InInitialPosition;
81 CurrentPos = InitialPos;
82 NextColumXPos = 0.f;
83 ColumnCount = 0;
84 }
85
86 void SetFont(const UFont* NewFont)
87 {
88 if (NewFont && (NewFont != DebugTextItem.Font))
89 {
90 DebugTextItem.Font = NewFont;
91 MaxCharHeight = DebugTextItem.Font->GetMaxCharHeight();
92 }
93 }
94
95 void SetDrawColor(const FColor& NewColor)
96 {
97 DebugTextItem.SetColor(NewColor.ReinterpretAsLinear());
98 }
99
100 void SetLinearDrawColor(const FLinearColor& NewColor)
101 {
102 DebugTextItem.SetColor(NewColor);
103 }
104
105 void ENGINE_API DrawString(const FString& InDebugString, const float& OptionalXOffset = 0.f);
106
107 void AddColumnIfNeeded();
108
109 float GetTextScale() const;
110
111 float GetYStep() const
112 {
113 return MaxCharHeight * 1.15f * GetTextScale();
114 }
115
116 float GetXPos() const
117 {
118 return CurrentPos.X;
119 }
120
121 float GetYPos() const
122 {
123 return CurrentPos.Y;
124 }
125
126 float& GetYPosRef()
127 {
128 return CurrentPos.Y;
129 }
130
131 void SetYPos(const float NewYPos)
132 {
133 CurrentPos.Y = NewYPos;
134 }
135
136 float GetMaxCharHeight() const
137 {
138 return MaxCharHeight;
139 }
140
142 {
143 return MaxCharHeight;
144 }
145
146 void ShiftYDrawPosition(const float& YOffset)
147 {
148 CurrentPos.Y += YOffset;
150 }
151};
152
156UCLASS(transient, BlueprintType, MinimalAPI)
159{
161
162 // Modifiable properties.
163 UPROPERTY()
164 float OrgX; // Origin for drawing in X.
165
166 UPROPERTY()
167 float OrgY; // Origin for drawing in Y.
168
169 UPROPERTY()
170 float ClipX; // Bottom right clipping region.
171
172 UPROPERTY()
173 float ClipY; // Bottom right clipping region.
174
175 UPROPERTY()
176 FColor DrawColor; // Color for drawing.
177
178 UPROPERTY()
179 uint32 bCenterX:1; // Whether to center the text horizontally (about CurX)
180
181 UPROPERTY()
182 uint32 bCenterY:1; // Whether to center the text vertically (about CurY)
183
184 UPROPERTY()
185 uint32 bNoSmooth:1; // Don't bilinear filter.
186
187 UPROPERTY()
188 int32 SizeX; // Zero-based actual dimensions X.
189
190 UPROPERTY()
191 int32 SizeY; // Zero-based actual dimensions Y.
192
193 // Internal.
194 UPROPERTY()
195 FPlane ColorModulate;
196
197 UPROPERTY()
198 TObjectPtr<class UTexture2D> DefaultTexture; //Default texture to use
199
200 UPROPERTY()
201 TObjectPtr<class UTexture2D> GradientTexture0; //Default texture to use
202
204 UPROPERTY()
206
207 int32 UnsafeSizeX; // Canvas size before safe frame adjustment
208 int32 UnsafeSizeY; // Canvas size before safe frame adjustment
209
210 //cached data for safe zone calculation. Some platforms have very expensive functions
211 //to grab display metrics
212 int32 SafeZonePadX;
213 int32 SafeZonePadY;
214 int32 SafeZonePadEX;
215 int32 SafeZonePadEY;
216 int32 CachedDisplayWidth;
217 int32 CachedDisplayHeight;
218
219 FDisplayDebugManager DisplayDebugManager;
220public:
225
226 // UCanvas interface.
227
230
231 ENGINE_API virtual void BeginDestroy() override;
232
235
237 ENGINE_API void Update();
238
239 /* Applies the current Platform's safe zone to the current Canvas position. Automatically called by Update. */
242
243 /* Updates cached SafeZone data from the device. Call when main device is resized. */
245
246 /* Function to go through all constructed canvas items and update their safe zone data. */
248
263 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);
264
275 static ENGINE_API void ClippedStrLen(const UFont* Font, float ScaleX, float ScaleY, int32& XL, int32& YL, FStringView Text);
276
280 ENGINE_API void VARARGS WrappedStrLenf(const UFont* Font, float ScaleX, float ScaleY, int32& XL, int32& YL, const TCHAR* Fmt, ...);
281
285 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) ;
286
299 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());
300 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());
301
302#if !PLATFORM_TCHAR_IS_UTF8CHAR
303
304 UE_DEPRECATED(5.5, "Passing an ANSI string to DrawText has been deprecated outside of UTF-8 mode. Please use the overload that takes a TCHAR string.")
305 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());
306
307#endif // !PLATFORM_TCHAR_IS_UTF8CHAR
308
310 {
311 // The last whole character before the horizontal offset
313 // The character directly at the offset
315 // Not used
317 };
318
334
335 UE_DEPRECATED(5.4, "Use MeasureStringInternal with FStringView instead.")
337
349
372
374
382 ENGINE_API FVector Project(FVector Location, bool bClampToZeroPlane = true) const;
383
391 ENGINE_API void Deproject(FVector2D ScreenPos, /*out*/ FVector& WorldOrigin, /*out*/ FVector& WorldDirection) const;
392
403 static ENGINE_API void StrLen(const UFont* InFont, FStringView InText, float& XL, float& YL, bool bDPIAware, FCanvas* InCanvas);
404 static ENGINE_API void StrLen(const UFont* InFont, FStringView InText, double& XL, double& YL, bool bDPIAware, FCanvas* InCanvas);
405
406#if !PLATFORM_TCHAR_IS_UTF8CHAR
407
408 UE_DEPRECATED(5.5, "Passing an ANSI string to StrLen has been deprecated outside of UTF-8 mode. Please use the overload that takes a TCHAR string.")
409 static ENGINE_API void StrLen(const UFont* InFont, FAnsiStringView InText, float& XL, float& YL, bool bDPIAware, FCanvas* InCanvas);
410 UE_DEPRECATED(5.5, "Passing an ANSI string to StrLen has been deprecated outside of UTF-8 mode. Please use the overload that takes a TCHAR string.")
411 static ENGINE_API void StrLen(const UFont* InFont, FAnsiStringView InText, double& XL, double& YL, bool bDPIAware, FCanvas* InCanvas);
412
413#endif // !PLATFORM_TCHAR_IS_UTF8CHAR
414
424 ENGINE_API void StrLen(const UFont* InFont, FStringView InText, float& XL, float& YL, bool bDPIAware = false);
425 ENGINE_API void StrLen(const UFont* InFont, FStringView InText, double& XL, double& YL, bool bDPIAware = false);
426
427#if !PLATFORM_TCHAR_IS_UTF8CHAR
428
429 UE_DEPRECATED(5.5, "Passing an ANSI string to StrLen has been deprecated outside of UTF-8 mode. Please use the overload that takes a TCHAR string.")
430 ENGINE_API void StrLen(const UFont* InFont, FAnsiStringView InText, float& XL, float& YL, bool bDPIAware = false);
431 UE_DEPRECATED(5.5, "Passing an ANSI string to StrLen has been deprecated outside of UTF-8 mode. Please use the overload that takes a TCHAR string.")
432 ENGINE_API void StrLen(const UFont* InFont, FAnsiStringView InText, double& XL, double& YL, bool bDPIAware = false);
433
434#endif // !PLATFORM_TCHAR_IS_UTF8CHAR
435
446 ENGINE_API void TextSize( const UFont* InFont, FStringView InText, float& XL, float& YL, float ScaleX=1.f, float ScaleY=1.f);
447 ENGINE_API void TextSize( const UFont* InFont, FStringView InText, double& XL, double& YL, double ScaleX=1.f, double ScaleY=1.f);
448
449#if !PLATFORM_TCHAR_IS_UTF8CHAR
450
451 UE_DEPRECATED(5.5, "Passing an ANSI string to TextSize has been deprecated outside of UTF-8 mode. Please use the overload that takes a TCHAR string.")
452 ENGINE_API void TextSize( const UFont* InFont, FAnsiStringView InText, float& XL, float& YL, float ScaleX=1.f, float ScaleY=1.f);
453 UE_DEPRECATED(5.5, "Passing an ANSI string to TextSize has been deprecated outside of UTF-8 mode. Please use the overload that takes a TCHAR string.")
454 ENGINE_API void TextSize( const UFont* InFont, FAnsiStringView InText, double& XL, double& YL, double ScaleX=1.f, double ScaleY=1.f);
455
456#endif // !PLATFORM_TCHAR_IS_UTF8CHAR
457
460
463
465 ENGINE_API void SetDrawColor(FColor const& C);
466
468 ENGINE_API FFontRenderInfo CreateFontRenderInfo(bool bClipText = false, bool bEnableShadow = false, FLinearColor GlowColor = FLinearColor(), FVector2D GlowOuterRadius = FVector2D(), FVector2D GlowInnerRadius = FVector2D());
469
471 ENGINE_API virtual void Reset(bool bKeepOrigin = false);
472
474 ENGINE_API void SetClip(float X, float Y);
475
477 ENGINE_API void GetCenter(float& outX, float& outY) const;
478 ENGINE_API void GetCenter(double& outX, double& outY) const;
479
481 static ENGINE_API FCanvasIcon MakeIcon(class UTexture* Texture, float U = 0.f, float V = 0.f, float UL = 0.f, float VL = 0.f);
482
485
487 ENGINE_API void DrawIcon(FCanvasIcon Icon, float X, float Y, float Scale = 0.f);
488
502 ENGINE_API virtual void DrawDebugGraph(const FString& Title, float ValueX, float ValueY, float UL_X, float UL_Y, float W, float H, FVector2D RangeX, FVector2D RangeY);
503
509 ENGINE_API void DrawItem( FCanvasItem& Item );
510
517 ENGINE_API void DrawItem( FCanvasItem& Item, const FVector2D& InPosition );
518
526 ENGINE_API void DrawItem( FCanvasItem& Item, float X, float Y );
527
530
532 float GetDPIScale() const { return Canvas->GetDPIScale(); }
533
542 UFUNCTION(BlueprintCallable, Category=Canvas, meta=(DisplayName="Draw Line", ScriptName="DrawLine"))
544
558 UFUNCTION(BlueprintCallable, Category=Canvas, meta=(DisplayName="Draw Texture", ScriptName="DrawTexture"))
560
572 UFUNCTION(BlueprintCallable, Category=Canvas, meta=(DisplayName="Draw Material", ScriptName="DrawMaterial"))
574
590 UFUNCTION(BlueprintCallable, Category=Canvas, meta=(DisplayName="Draw Text", ScriptName="DrawText"))
591 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);
592
613 UFUNCTION(BlueprintCallable, Category=Canvas, meta=(DisplayName="Draw Border", ScriptName="DrawBorder"))
615
624 UFUNCTION(BlueprintCallable, Category=Canvas, meta=(DisplayName="Draw Box", ScriptName="DrawBox"))
626
633 UFUNCTION(BlueprintCallable, Category=Canvas, meta=(DisplayName="Draw Triangles", ScriptName="DrawTriangles"))
635
642 UFUNCTION(BlueprintCallable, Category = Canvas, meta = (DisplayName = "Draw Material Triangles", ScriptName = "DrawMaterialTriangles"))
653 UFUNCTION(BlueprintCallable, Category=Canvas, meta=(DisplayName="Draw Polygon", ScriptName="DrawPolygon"))
655
662 UFUNCTION(BlueprintCallable, Category=Canvas, meta=(DisplayName="Project", ScriptName="Project"))
663 ENGINE_API FVector K2_Project(FVector WorldLocation);
664
672 UFUNCTION(BlueprintCallable, Category=Canvas, meta=(DisplayName="Deproject", ScriptName="Deproject"))
674
682 UFUNCTION(BlueprintCallable, Category=Canvas, meta=(DisplayName="Wrapped Text Size", ScriptName="WrappedTextSize"))
684
693 UFUNCTION(BlueprintCallable, Category=Canvas, meta=(DisplayName="Clipped Text Size", ScriptName="ClippedTextSize"))
695};
#define VARARGS
Definition AndroidPlatform.h:134
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
EBlendMode
Definition EngineTypes.h:245
return true
Definition ExternalRpcRegistry.cpp:601
#define X(Name, Desc)
Definition FormatStringSan.h:47
void Init()
Definition LockFreeList.h:4
UE::Math::TVector2< float > FVector2f
Definition MathFwd.h:74
UE::Math::TVector2< double > FVector2D
Definition MathFwd.h:48
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define UFUNCTION(...)
Definition ObjectMacros.h:745
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
#define USTRUCT(...)
Definition ObjectMacros.h:746
#define GENERATED_USTRUCT_BODY(...)
Definition ObjectMacros.h:767
void DrawBox(FPrimitiveDrawInterface *PDI, const FMatrix &BoxToWorld, const FVector &Radii, const FMaterialRenderProxy *MaterialRenderProxy, uint8 DepthPriorityGroup)
Definition PrimitiveDrawingUtils.cpp:148
uint32 Size
Definition VulkanMemory.cpp:4034
uint8_t uint8
Definition binka_ue_file_header.h:8
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition CanvasItem.h:25
const UFont * Font
Definition CanvasItem.h:461
virtual void SetColor(const FLinearColor &InColor) override final
Definition CanvasItem.h:340
void EnableShadow(const FLinearColor &InColor, const FVector2D &InOffset=FVector2D(1.0f, 1.0f))
Definition CanvasItem.h:317
Definition CanvasItem.h:495
Definition CanvasTypes.h:132
Definition CanvasTypes.h:211
float GetDPIScale() const
Definition CanvasTypes.h:605
Definition SceneView.h:1425
Definition Text.h:385
Definition Array.h:670
Definition Canvas.h:159
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)
Definition Canvas.cpp:2024
static ENGINE_API void CanvasStringSize(FTextSizingParameters &Parameters, FStringView Text)
Definition Canvas.cpp:1301
ENGINE_API void SetLinearDrawColor(FLinearColor InColor, float OpacityOverride=-1.f)
Definition Canvas.cpp:1571
FSceneView * SceneView
Definition Canvas.h:222
ENGINE_API void K2_DrawTriangle(UTexture *RenderTexture, TArray< FCanvasUVTri > Triangles)
Definition Canvas.cpp:2257
FQuat HmdOrientation
Definition Canvas.h:224
ENGINE_API FFontRenderInfo CreateFontRenderInfo(bool bClipText=false, bool bEnableShadow=false, FLinearColor GlowColor=FLinearColor(), FVector2D GlowOuterRadius=FVector2D(), FVector2D GlowInnerRadius=FVector2D())
Definition Canvas.cpp:1926
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))
Definition Canvas.cpp:2171
ENGINE_API void K2_DrawLine(FVector2D ScreenPositionA=FVector2D::ZeroVector, FVector2D ScreenPositionB=FVector2D::ZeroVector, float Thickness=1.0f, FLinearColor RenderColor=FLinearColor::White)
Definition Canvas.cpp:2160
ENGINE_API FVector2D K2_TextSize(UFont *RenderFont, const FString &RenderText, FVector2D Scale=FVector2D::UnitVector)
Definition Canvas.cpp:2312
FMatrix ViewProjectionMatrix
Definition Canvas.h:223
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))
Definition Canvas.cpp:2183
ENGINE_API void ApplySafeZoneTransform()
Definition Canvas.cpp:1396
ELastCharacterIndexFormat
Definition Canvas.h:310
@ LastWholeCharacterBeforeOffset
Definition Canvas.h:312
@ CharacterAtOffset
Definition Canvas.h:314
@ Unused
Definition Canvas.h:316
ENGINE_API TWeakObjectPtr< class UReporterGraph > GetReporterGraph()
Definition Canvas.cpp:2150
ENGINE_API void DrawScaledIcon(FCanvasIcon Icon, float X, float Y, FVector Scale)
Definition Canvas.cpp:1975
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())
Definition Canvas.cpp:1683
static ENGINE_API void WrapString(FCanvasWordWrapper &Wrapper, FTextSizingParameters &Parameters, const float InCurX, FStringView Text, TArray< FWrappedStringElement > &out_Lines, FCanvasWordWrapper::FWrappedLineData *const OutWrappedLineData=nullptr)
Definition Canvas.cpp:1307
ENGINE_API void DrawItem(FCanvasItem &Item)
Definition Canvas.cpp:2073
static ENGINE_API void MeasureStringInternal(FTextSizingParameters &Parameters, FStringView Text, const int32 StopAfterHorizontalOffset, const ELastCharacterIndexFormat CharIndexFormat, int32 &OutLastCharacterIndex)
Definition Canvas.cpp:1209
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)
Definition Canvas.cpp:1712
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)
Definition Canvas.cpp:1624
ENGINE_API void SetClip(float X, float Y)
Definition Canvas.cpp:1954
ENGINE_API void UpdateSafeZoneData()
Definition Canvas.cpp:1492
FCanvas * Canvas
Definition Canvas.h:221
ENGINE_API FVector K2_Project(FVector WorldLocation)
Definition Canvas.cpp:2290
ENGINE_API FVector2D K2_StrLen(UFont *RenderFont, const FString &RenderText)
Definition Canvas.cpp:2300
static ENGINE_API FCanvasIcon MakeIcon(class UTexture *Texture, float U=0.f, float V=0.f, float UL=0.f, float VL=0.f)
Definition Canvas.cpp:1960
static ENGINE_API void UpdateAllCanvasSafeZoneData()
Definition Canvas.cpp:1540
ENGINE_API void K2_DrawMaterialTriangle(UMaterialInterface *RenderMaterial, TArray< FCanvasUVTri > Triangles)
Definition Canvas.cpp:2267
virtual ENGINE_API void BeginDestroy() override
Definition Canvas.cpp:1389
ENGINE_API void SetDrawColor(uint8 R, uint8 G, uint8 B, uint8 A=255)
Definition Canvas.cpp:1581
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)
Definition Canvas.cpp:2213
static ENGINE_API void ClippedStrLen(const UFont *Font, float ScaleX, float ScaleY, int32 &XL, int32 &YL, FStringView Text)
Definition Canvas.cpp:1655
ENGINE_API void K2_DrawPolygon(UTexture *RenderTexture, FVector2D ScreenPosition, FVector2D Radius=FVector2D::UnitVector, int32 NumberOfSides=3, FLinearColor RenderColor=FLinearColor::White)
Definition Canvas.cpp:2281
ENGINE_API void DrawIcon(FCanvasIcon Icon, float X, float Y, float Scale=0.f)
Definition Canvas.cpp:2000
ENGINE_API void GetCenter(float &outX, float &outY) const
Definition Canvas.cpp:2060
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)
Definition Canvas.cpp:2230
static ENGINE_API void StrLen(const UFont *InFont, FStringView InText, float &XL, float &YL, bool bDPIAware, FCanvas *InCanvas)
Definition Canvas.cpp:1807
ENGINE_API void TextSize(const UFont *InFont, FStringView InText, float &XL, float &YL, float ScaleX=1.f, float ScaleY=1.f)
Definition Canvas.cpp:1856
ENGINE_API void VARARGS WrappedStrLenf(const UFont *Font, float ScaleX, float ScaleY, int32 &XL, int32 &YL, const TCHAR *Fmt,...)
Definition Canvas.cpp:1669
ENGINE_API void K2_DrawBox(FVector2D ScreenPosition, FVector2D ScreenSize, float Thickness=1.0f, FLinearColor RenderColor=FLinearColor::White)
Definition Canvas.cpp:2246
ENGINE_API void K2_Deproject(FVector2D ScreenPosition, FVector &WorldOrigin, FVector &WorldDirection)
Definition Canvas.cpp:2295
ENGINE_API void SetView(FSceneView *InView)
Definition Canvas.cpp:2130
float GetDPIScale() const
Definition Canvas.h:532
ENGINE_API void Deproject(FVector2D ScreenPos, FVector &WorldOrigin, FVector &WorldDirection) const
Definition Canvas.cpp:1917
ENGINE_API void PopSafeZoneTransform()
Definition Canvas.cpp:1469
Definition Font.h:111
ENGINE_API float GetMaxCharHeight() const
Definition Font.cpp:286
Definition MaterialInterface.h:296
Definition Object.h:95
Definition ReporterGraph.h:102
Definition Texture.h:1219
@ false
Definition radaudio_common.h:23
Definition Canvas.h:23
Definition EngineTypes.h:4113
Definition Color.h:486
FLinearColor ReinterpretAsLinear() const
Definition Color.h:683
Definition Canvas.h:54
float GetMaxCharHeight() const
Definition Canvas.h:136
float GetYPos() const
Definition Canvas.h:121
void ENGINE_API DrawString(const FString &InDebugString, const float &OptionalXOffset=0.f)
Definition Canvas.cpp:2324
void SetFont(const UFont *NewFont)
Definition Canvas.h:86
void ShiftYDrawPosition(const float &YOffset)
Definition Canvas.h:146
float GetXPos() const
Definition Canvas.h:116
float GetTextScale() const
Definition Canvas.cpp:2342
void SetLinearDrawColor(const FLinearColor &NewColor)
Definition Canvas.h:100
float & GetMaxCharHeightRef()
Definition Canvas.h:141
float & GetYPosRef()
Definition Canvas.h:126
void Initialize(class UCanvas *InCanvas, const UFont *NewFont, FVector2D InInitialPosition)
Definition Canvas.h:76
void AddColumnIfNeeded()
Definition Canvas.cpp:2347
void SetYPos(const float NewYPos)
Definition Canvas.h:131
void SetDrawColor(const FColor &NewColor)
Definition Canvas.h:95
FDisplayDebugManager()
Definition Canvas.h:64
float GetYStep() const
Definition Canvas.h:111
Definition EngineTypes.h:4090
Definition Color.h:48
static CORE_API const FLinearColor Black
Definition Color.h:458
Definition CanvasTypes.h:42
Definition CanvasTypes.h:105
Definition ObjectPtr.h:488
Definition WeakObjectPtrTemplates.h:25
T Y
Definition Vector2D.h:52
T X
Definition Vector2D.h:49