UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ReporterGraph.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#include "CoreMinimal.h"
7#include "ReporterGraph.generated.h"
8
9class UCanvas;
10class UFont;
11
13UENUM()
15{
16 enum Type : int
17 {
21 };
22}
23
25UENUM()
27{
28 enum Type : int
29 {
30 Lines,
32 };
33}
34
35UENUM()
37{
38 enum Type : int
39 {
40 Outside,
41 Inside
42 };
43}
44
51
54{
56 float Threshold;
57
60
63
65 : Threshold(0.0f),
67 ThresholdName("UNDEFINED")
68 {
69
70 }
71
72 FGraphThreshold(float InThreshold, const FLinearColor& InColor, FString InName)
74 Color(InColor),
75 ThresholdName(InName)
76 {
77
78 }
79};
80
99
100UCLASS(MinimalAPI)
102{
104
105public:
106
112
117
124 ENGINE_API void SetGraphScreenSize(float MinX, float MaxX, float MinY, float MaxY);
125
130 ENGINE_API void SetGraphScreenSize(const FVector2D& Min, const FVector2D& Max);
131
135 ENGINE_API virtual void Draw(UCanvas* Canvas) override;
136
143 ENGINE_API void SetAxesMinMax(float MinX, float MaxX, float MinY, float MaxY);
144
149 ENGINE_API void SetAxesMinMax(const FVector2D& Min, const FVector2D& Max);
150
155 inline void SetNotchesPerAxis(int NewNumXNotches, int NewNumYNotches) { NumXNotches = NewNumXNotches; NumYNotches = NewNumYNotches; }
156
160 ENGINE_API void SetNumGraphLines(int32 NumDataLines);
161
166 ENGINE_API FGraphLine* GetGraphLine(int32 LineIndex);
167
171 ENGINE_API void SetNumThresholds(int32 NumThresholds);
172
178
182 ENGINE_API void SetBackgroundColor(FColor Color);
183
187 ENGINE_API void SetLegendPosition(ELegendPosition::Type Position);
188
192 void OffsetDataSets(bool Enable) { bOffsetDataSets = Enable; }
193
195 bool IsOffsetForDataSetsEnabled() { return !!bOffsetDataSets; }
196
198 void SetCursorLocation(float InValue) { CursorLocation = InValue; }
199
201 void UseTinyFont(bool InUseTinyFont) { bUseTinyFont = InUseTinyFont; }
202
204 void DrawCursorOnGraph(bool InDrawCursorOnGraph) { bDrawCursorOnGraph = InDrawCursorOnGraph; }
205
206 void DrawExtremesOnGraph(bool InDrawExtremes) { bDrawExtremes = InDrawExtremes; }
207
211 ENGINE_API void DrawBackground(UCanvas* Canvas);
212
216 ENGINE_API void DrawLegend(UCanvas* Canvas);
217
221 ENGINE_API void DrawAxes(UCanvas* Canvas);
222
230 ENGINE_API void DrawAxis(UCanvas* Canvas, FVector2D Start, FVector2D End, float NumNotches, bool bIsVerticalAxis);
231
235 ENGINE_API void DrawThresholds(UCanvas* Canvas);
236
240 ENGINE_API void DrawData(UCanvas* Canvas);
241
247 ENGINE_API virtual FVector2D ToScreenSpace(const FVector2D& InVector, UCanvas* Canvas) override;
248
253 ENGINE_API FVector2D DataToNormalized(const FVector2D& InVector);
254
256 ENGINE_API UFont* GetDefaultFont();
257
260
263
265
268
271
274
277
280
283
286
289
292
295
298
301
304
307};
308
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
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
#define UENUM(...)
Definition ObjectMacros.h:749
Definition Array.h:670
Definition Canvas.h:159
Definition Font.h:111
Definition ReporterBase.h:25
Definition ReporterGraph.h:102
FColor BackgroundColor
Definition ReporterGraph.h:291
float CursorLocation
Definition ReporterGraph.h:294
int NumXNotches
Definition ReporterGraph.h:273
int32 bDrawExtremes
Definition ReporterGraph.h:306
int32 bUseTinyFont
Definition ReporterGraph.h:300
TArray< FGraphLine > CurrentData
Definition ReporterGraph.h:267
int32 bDrawCursorOnGraph
Definition ReporterGraph.h:303
float LegendWidth
Definition ReporterGraph.h:288
void DrawCursorOnGraph(bool InDrawCursorOnGraph)
Definition ReporterGraph.h:204
FRect GraphScreenSize
Definition ReporterGraph.h:259
EGraphAxisStyle::Type AxisStyle
Definition ReporterGraph.h:279
void UseTinyFont(bool InUseTinyFont)
Definition ReporterGraph.h:201
void SetStyles(EGraphAxisStyle::Type NewAxisStyle, EGraphDataStyle::Type NewDataStyle)
Definition ReporterGraph.h:111
TArray< FGraphThreshold > Thresholds
Definition ReporterGraph.h:264
void SetNotchesPerAxis(int NewNumXNotches, int NewNumYNotches)
Definition ReporterGraph.h:155
ELegendPosition::Type LegendPosition
Definition ReporterGraph.h:285
void DrawExtremesOnGraph(bool InDrawExtremes)
Definition ReporterGraph.h:206
FRect GraphMinMaxData
Definition ReporterGraph.h:262
void OffsetDataSets(bool Enable)
Definition ReporterGraph.h:192
int NumYNotches
Definition ReporterGraph.h:276
EGraphDataStyle::Type DataStyle
Definition ReporterGraph.h:282
bool IsOffsetForDataSetsEnabled()
Definition ReporterGraph.h:195
int32 bOffsetDataSets
Definition ReporterGraph.h:297
void SetCursorLocation(float InValue)
Definition ReporterGraph.h:198
void SetAxesColor(FLinearColor NewAxesColor)
Definition ReporterGraph.h:116
FLinearColor AxesColor
Definition ReporterGraph.h:270
Definition ReporterGraph.h:15
Type
Definition ReporterGraph.h:17
@ Lines
Definition ReporterGraph.h:18
@ Notches
Definition ReporterGraph.h:19
Definition ReporterGraph.h:27
Type
Definition ReporterGraph.h:29
@ Filled
Definition ReporterGraph.h:31
Definition ReporterGraph.h:37
Type
Definition ReporterGraph.h:39
Definition Color.h:486
Definition ReporterGraph.h:83
FVector2D LeftExtreme
Definition ReporterGraph.h:91
FString LineName
Definition ReporterGraph.h:97
TArray< FVector2D > Data
Definition ReporterGraph.h:85
FLinearColor Color
Definition ReporterGraph.h:88
FVector2D RightExtreme
Definition ReporterGraph.h:94
Definition ReporterGraph.h:54
FString ThresholdName
Definition ReporterGraph.h:62
float Threshold
Definition ReporterGraph.h:56
FLinearColor Color
Definition ReporterGraph.h:59
FGraphThreshold()
Definition ReporterGraph.h:64
FGraphThreshold(float InThreshold, const FLinearColor &InColor, FString InName)
Definition ReporterGraph.h:72
Definition Color.h:48
Definition ReporterGraph.h:47
FVector2D Max
Definition ReporterGraph.h:49
FVector2D Min
Definition ReporterGraph.h:48