GridColor
GridColor
#Overview
name: GridColor
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 64
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of GridColor is to define the color of grid lines in various visualization and rendering contexts within Unreal Engine 5. This variable is used across different subsystems and modules to control the appearance of grids in editors, viewports, and debug visualizations.
GridColor is utilized in several Unreal Engine subsystems, plugins, and modules, including:
- Curve Editor
- Viewport Interaction
- World Partition
- Audio Widgets
- Networking Profiler
- Memory Profiler
- Trace Insights
- Modeling Tools
- Avalanche Plugin
The value of GridColor is typically set within the specific context where it’s used. It can be:
- Defined as a constant value
- Set through editor preferences
- Passed as a parameter to widgets or functions
- Dynamically calculated based on certain conditions
GridColor often interacts with other variables such as:
- GridThickness
- GridSize
- GridSpacing
- Other color variables (e.g., BackgroundColor, AxisLabelColor)
Developers should be aware that:
- GridColor is usually an FLinearColor or FColor type
- It may have an alpha component for transparency
- The color choice can affect visibility and readability of the grid
- In some contexts, GridColor may be animated or change dynamically
Best practices when using GridColor include:
- Choose colors that provide good contrast with the background and other elements
- Consider accessibility and color blindness when selecting grid colors
- Use consistent colors across related UI elements for a cohesive look
- Adjust the alpha component to control grid prominence without obscuring other elements
- Allow user customization of grid colors where appropriate
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:533, section: [/Script/UnrealEd.CurveEdOptions]
- INI Section:
/Script/UnrealEd.CurveEdOptions
- Raw value:
(R=0.35,G=0.35,B=0.35,A=1.0)
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Experimental/Avalanche/Source/AvalancheLevelViewport/Private/Widgets/SAvaLevelViewportScreenGrid.cpp:27
Scope (from outer to inner):
file
function int32 SAvaLevelViewportScreenGrid::OnPaint
Source code excerpt:
{
DrawGrid(InPaintArgs, InAllottedGeometry, InMyCullingRect, OutDrawElements, InLayerId,
AvaViewportSettings->GridSize, AvaViewportSettings->GridColor, AvaViewportSettings->GridThickness);
}
}
}
}
return InLayerId;
#Loc: <Workspace>/Engine/Plugins/Experimental/Avalanche/Source/AvalancheSequencer/Private/EaseCurveTool/Widgets/SAvaEaseCurveEditor.cpp:82
Scope (from outer to inner):
file
function void SAvaEaseCurveEditor::Construct
Source code excerpt:
bGridSnap = InArgs._GridSnap;
GridSize = InArgs._GridSize;
GridColor = InArgs._GridColor;
ExtendedGridColor = InArgs._ExtendedGridColor;
CurveThickness = InArgs._CurveThickness;
CurveColor = InArgs._CurveColor;
Operation = InArgs._Operation;
StartText = InArgs._StartText;
#Loc: <Workspace>/Engine/Plugins/Experimental/Avalanche/Source/AvalancheSequencer/Private/EaseCurveTool/Widgets/SAvaEaseCurveEditor.cpp:290
Scope (from outer to inner):
file
function int32 SAvaEaseCurveEditor::PaintGrid
Source code excerpt:
FSlateDrawElement::MakeLines(OutDrawElements, NormalizedLayerId
, InAllottedGeometry.ToPaintGeometry(), LinePoints, InDrawEffects, GridColor, false);
}
// Horizontal grid lines
for (float Y = 0.f; Y < 1.f; Y += GridStep)
{
const float ScreenY = InScaleInfo.OutputToLocalY(Y);
#Loc: <Workspace>/Engine/Plugins/Experimental/Avalanche/Source/AvalancheSequencer/Private/EaseCurveTool/Widgets/SAvaEaseCurveEditor.cpp:306
Scope (from outer to inner):
file
function int32 SAvaEaseCurveEditor::PaintGrid
Source code excerpt:
FSlateDrawElement::MakeLines(OutDrawElements, NormalizedLayerId
, InAllottedGeometry.ToPaintGeometry(), LinePoints, InDrawEffects, GridColor, false);
}
}
return NormalizedLayerId;
}
#Loc: <Workspace>/Engine/Plugins/Experimental/Avalanche/Source/AvalancheSequencer/Private/EaseCurveTool/Widgets/SAvaEaseCurveEditor.h:241
Scope (from outer to inner):
file
class class SAvaEaseCurveEditor : public SCompoundWidget, public FGCObject, public FEditorUndoClient
Source code excerpt:
TAttribute<bool> bGridSnap;
TAttribute<int32> GridSize;
FLinearColor GridColor;
FLinearColor ExtendedGridColor;
float CurveThickness = 1.f;
FLinearColor CurveColor;
TAttribute<FAvaEaseCurveTool::EOperation> Operation;
TAttribute<FText> StartText;
#Loc: <Workspace>/Engine/Plugins/Experimental/Avalanche/Source/AvalancheViewport/Private/AvaViewportSettings.cpp:18
Scope (from outer to inner):
file
function UAvaViewportSettings::UAvaViewportSettings
Source code excerpt:
bGridAlwaysVisible = false;
GridSize = 50;
GridColor = FLinearColor(0.6, 0.0, 0.0, 0.4);
GridThickness = 1.f;
bPixelGridEnabled = true;
PixelGridColor = FLinearColor(0.5, 0.5, 0.5, 0.4);
SnapState = static_cast<int32>(EAvaViewportSnapState::Global | EAvaViewportSnapState::Screen | EAvaViewportSnapState::Grid);
#Loc: <Workspace>/Engine/Plugins/Experimental/Avalanche/Source/AvalancheViewport/Public/AvaViewportSettings.h:96
Scope (from outer to inner):
file
class class UAvaViewportSettings : public UDeveloperSettings
Source code excerpt:
UPROPERTY(Config, EditAnywhere, BlueprintReadWrite, Category = "Screen Grid")
FLinearColor GridColor;
UPROPERTY(Config, EditAnywhere, BlueprintReadWrite, Category = "Screen Grid", Meta = (UIMin = 1, UIMax = 8, ClampMin = 1, ClampMax = 8))
float GridThickness;
UPROPERTY(Config, EditAnywhere, BlueprintReadWrite, Category = "Pixel Grid")
bool bPixelGridEnabled;
#Loc: <Workspace>/Engine/Plugins/Experimental/ChaosEditor/Source/FractureEditor/Private/FractureToolPlaneCut.cpp:243
Scope (from outer to inner):
file
function void UFractureToolPlaneCut::Render
lambda-function
Source code excerpt:
const int32 NumGridLines = 20;
const float GridLineSpacing = PlaneSize / (NumGridLines - 1);
const FColor GridColor(64, 64, 64, 128);
const float GridThickness = 1.0f;
const UE::Geometry::FFrame3d DrawFrame(Center, Transform.GetRotation());
MeshDebugDraw::DrawSimpleGrid(DrawFrame, NumGridLines, GridLineSpacing, GridThickness, GridColor, true, PDI, FTransform::Identity);
};
if (GizmoSettings->IsGizmoEnabled())
{
const FTransform& Transform = GizmoSettings->GetTransform();
EnumerateVisualizationMapping(PlanesMappings, RenderCuttingPlanesTransforms.Num(), [&](int32 Idx, FVector ExplodedVector)
#Loc: <Workspace>/Engine/Plugins/Experimental/MeshModelingToolsetExp/Source/MeshModelingToolsExp/Private/DynamicMeshSculptTool.cpp:1522
Scope (from outer to inner):
file
function void UDynamicMeshSculptTool::Render
Source code excerpt:
{
FPrimitiveDrawInterface* PDI = RenderAPI->GetPrimitiveDrawInterface();
FColor GridColor(128, 128, 128, 32);
float GridThickness = 0.5f*RenderCameraState.GetPDIScalingFactor();
int NumGridLines = 10;
FFrame3d DrawFrame(GizmoProperties->Position, GizmoProperties->Rotation);
MeshDebugDraw::DrawSimpleFixedScreenAreaGrid(RenderCameraState, DrawFrame, NumGridLines, 45.0, GridThickness, GridColor, false, PDI, FTransform::Identity);
}
}
void UDynamicMeshSculptTool::OnTick(float DeltaTime)
{
TRACE_CPUPROFILER_EVENT_SCOPE(DynamicMeshSculptTool_OnTick);
#Loc: <Workspace>/Engine/Plugins/Experimental/MeshModelingToolsetExp/Source/MeshModelingToolsExp/Private/Sculpting/MeshSculptToolBase.cpp:283
Scope (from outer to inner):
file
function void UMeshSculptToolBase::Render
Source code excerpt:
{
FPrimitiveDrawInterface* PDI = RenderAPI->GetPrimitiveDrawInterface();
FColor GridColor(128, 128, 128, 32);
float GridThickness = 0.5f*RenderCameraState.GetPDIScalingFactor();
int NumGridLines = 10;
FFrame3d DrawFrame(GizmoProperties->Position, GizmoProperties->Rotation);
MeshDebugDraw::DrawSimpleFixedScreenAreaGrid(RenderCameraState, DrawFrame, NumGridLines, 45.0, GridThickness, GridColor, false, PDI, FTransform::Identity);
}
}
#Loc: <Workspace>/Engine/Plugins/Experimental/Mutable/Source/CustomizableObjectPopulationEditor/Private/MuCOPE/CustomizableObjectPopulationClassEditor.cpp:156
Scope: file
Source code excerpt:
CurveEditor = SNew(SCurveEditor)
.ShowCurveSelector(true)
.GridColor(FLinearColor(1.0f, 0.8f, 0.8f))
.ViewMinInput(-0.01f)
.ViewMaxInput(1.01f)
.ViewMinOutput(-0.01f)
.ViewMaxOutput(1.01f)
.TimelineLength(1.01f)
.HideUI(false)
#Loc: <Workspace>/Engine/Plugins/Runtime/AudioWidgets/Source/AudioWidgets/Private/AudioWidgetsSlateTypes.cpp:157
Scope (from outer to inner):
file
function FSampledSequenceValueGridOverlayStyle::FSampledSequenceValueGridOverlayStyle
Source code excerpt:
FSampledSequenceValueGridOverlayStyle::FSampledSequenceValueGridOverlayStyle()
: GridColor(FLinearColor::Black)
, GridThickness(1.f)
, LabelTextColor(FLinearColor::White)
, LabelTextFont(FAppStyle::GetFontStyle("Regular"))
, DesiredWidth(AudioWidgetStylesSharedParams::DefaultWidth)
, DesiredHeight(AudioWidgetStylesSharedParams::DefaultHeight)
{
#Loc: <Workspace>/Engine/Plugins/Runtime/AudioWidgets/Source/AudioWidgets/Private/SAudioSpectrumPlot.cpp:208
Scope (from outer to inner):
file
function void SAudioSpectrumPlot::Construct
Source code excerpt:
FrequencyAxisPixelBucketMode = InArgs._FrequencyAxisPixelBucketMode;
BackgroundColor = InArgs._BackgroundColor;
GridColor = InArgs._GridColor;
AxisLabelColor = InArgs._AxisLabelColor;
SpectrumColor = InArgs._SpectrumColor;
bAllowContextMenu = InArgs._AllowContextMenu;
OnContextMenuOpening = InArgs._OnContextMenuOpening;
OnGetAudioSpectrumData = InArgs._OnGetAudioSpectrumData;
}
#Loc: <Workspace>/Engine/Plugins/Runtime/AudioWidgets/Source/AudioWidgets/Private/SAudioSpectrumPlot.cpp:569
Scope (from outer to inner):
file
function FLinearColor SAudioSpectrumPlot::GetGridColor
Source code excerpt:
FLinearColor SAudioSpectrumPlot::GetGridColor(const FWidgetStyle& InWidgetStyle) const
{
const FSlateColor& SlateColor = (GridColor.Get() != FSlateColor::UseStyle()) ? GridColor.Get() : Style->GridColor;
return SlateColor.GetColor(InWidgetStyle) * InWidgetStyle.GetColorAndOpacityTint();
}
FLinearColor SAudioSpectrumPlot::GetAxisLabelColor(const FWidgetStyle& InWidgetStyle) const
{
const FSlateColor& SlateColor = (AxisLabelColor.Get() != FSlateColor::UseStyle()) ? AxisLabelColor.Get() : Style->AxisLabelColor;
#Loc: <Workspace>/Engine/Plugins/Runtime/AudioWidgets/Source/AudioWidgets/Private/SSampledSequenceValueGridOverlay.cpp:25
Scope (from outer to inner):
file
function void SSampledSequenceValueGridOverlay::Construct
Source code excerpt:
bHideLabels = InArgs._HideLabels;
bHideGrid = InArgs._HideGrid;
GridColor = InArgs._Style->GridColor;
LabelTextFont = InArgs._Style->LabelTextFont;
LabelTextColor = InArgs._Style->LabelTextColor;
DesiredWidth = InArgs._Style->DesiredWidth;
DesiredHeight = InArgs._Style->DesiredHeight;
GridThickness = InArgs._Style->GridThickness;
}
#Loc: <Workspace>/Engine/Plugins/Runtime/AudioWidgets/Source/AudioWidgets/Private/SSampledSequenceValueGridOverlay.cpp:101
Scope (from outer to inner):
file
function int32 SSampledSequenceValueGridOverlay::OnPaint
Source code excerpt:
LinePoints,
ESlateDrawEffect::None,
GridColor.GetSpecifiedColor(),
false,
GridThickness
);
}
}
}
#Loc: <Workspace>/Engine/Plugins/Runtime/AudioWidgets/Source/AudioWidgets/Private/SSampledSequenceValueGridOverlay.cpp:129
Scope (from outer to inner):
file
function void SSampledSequenceValueGridOverlay::OnStyleUpdated
Source code excerpt:
void SSampledSequenceValueGridOverlay::OnStyleUpdated(const FSampledSequenceValueGridOverlayStyle UpdatedStyle)
{
GridColor = UpdatedStyle.GridColor;
LabelTextFont = UpdatedStyle.LabelTextFont;
LabelTextColor = UpdatedStyle.LabelTextColor;
DesiredWidth = UpdatedStyle.DesiredWidth;
DesiredHeight = UpdatedStyle.DesiredHeight;
GridThickness = UpdatedStyle.GridThickness;
#Loc: <Workspace>/Engine/Plugins/Runtime/AudioWidgets/Source/AudioWidgets/Public/AudioSpectrumPlotStyle.h:30
Scope: file
Source code excerpt:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Appearance)
FSlateColor GridColor = FMath::Lerp(FStyleColors::Background.GetSpecifiedColor(), FStyleColors::Foreground.GetSpecifiedColor(), 0.1f);
FAudioSpectrumPlotStyle& SetGridColor(const FSlateColor& InGridColor) { GridColor = InGridColor; return *this; }
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Appearance)
FSlateColor AxisLabelColor = FStyleColors::Foreground;
FAudioSpectrumPlotStyle& SetAxisLabelColor(const FSlateColor& InAxisLabelColor) { AxisLabelColor = InAxisLabelColor; return *this; }
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Appearance)
#Loc: <Workspace>/Engine/Plugins/Runtime/AudioWidgets/Source/AudioWidgets/Public/AudioWidgetsSlateTypes.h:342
Scope: file
Source code excerpt:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Appearance)
FSlateColor GridColor;
FSampledSequenceValueGridOverlayStyle& SetGridColor(const FSlateColor InGridColor) { GridColor = InGridColor; return *this; }
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Appearance)
float GridThickness;
FSampledSequenceValueGridOverlayStyle& SetGridThickness(const float InGridThickness) { GridThickness = InGridThickness; return *this; }
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Appearance)
#Loc: <Workspace>/Engine/Plugins/Runtime/AudioWidgets/Source/AudioWidgets/Public/SAudioSpectrumPlot.h:210
Scope (from outer to inner):
file
class class SAudioSpectrumPlot : public SCompoundWidget
Source code excerpt:
TAttribute<EAudioSpectrumPlotFrequencyAxisPixelBucketMode> FrequencyAxisPixelBucketMode;
TAttribute<FSlateColor> BackgroundColor;
TAttribute<FSlateColor> GridColor;
TAttribute<FSlateColor> AxisLabelColor;
TAttribute<FSlateColor> SpectrumColor;
TAttribute<bool> bAllowContextMenu;
FOnContextMenuOpening OnContextMenuOpening;
FGetAudioSpectrumData OnGetAudioSpectrumData;
};
#Loc: <Workspace>/Engine/Plugins/Runtime/AudioWidgets/Source/AudioWidgets/Public/SSampledSequenceValueGridOverlay.h:85
Scope (from outer to inner):
file
class class SSampledSequenceValueGridOverlay : public SLeafWidget
Source code excerpt:
const FSampledSequenceValueGridOverlayStyle* Style = nullptr;
FSlateColor GridColor;
FSlateColor LabelTextColor;
FSlateFontInfo LabelTextFont;
float DesiredWidth;
float DesiredHeight;
float GridThickness;
#Loc: <Workspace>/Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Private/Drawing/MeshDebugDrawing.cpp:176
Scope (from outer to inner):
file
function void MeshDebugDraw::DrawHierarchicalGrid
Source code excerpt:
// Select our color, using the last grid color over again if we don't have enough.
FColor GridColor = Colors.Num() - 1 > Level ? Colors[Level] : Colors.Last();
// Finally draw one grid level.
MeshDebugDraw::DrawSimpleGrid(GridFrame, GridLines, GridScales[Level], AdjustedLineWidth,
GridColor, bDepthTested, PDI, Transform);
}
}
#Loc: <Workspace>/Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Private/Mechanics/ConstructionPlaneMechanic.cpp:157
Scope (from outer to inner):
file
function void UConstructionPlaneMechanic::Render
Source code excerpt:
const int32 NumGridLines = Settings->NumGridLines;
const float GridThickness = 0.75f * PDIScale;
constexpr FColor GridColor(128, 128, 128, 32);
static constexpr bool bDepthTested = false;
FPrimitiveDrawInterface* PDI = RenderAPI->GetPrimitiveDrawInterface();
const FTransform DrawTransform = FTransform::Identity;
switch (Settings->GridMode)
{
#Loc: <Workspace>/Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Private/Mechanics/ConstructionPlaneMechanic.cpp:167
Scope (from outer to inner):
file
function void UConstructionPlaneMechanic::Render
Source code excerpt:
{
const double GridSpacing = Settings->GridSpacing;
MeshDebugDraw::DrawSimpleGrid(DrawFrame, NumGridLines, GridSpacing, GridThickness, GridColor, bDepthTested, PDI, DrawTransform);
break;
}
case EModelingComponentsPlaneVisualizationMode::HierarchicalGrid:
{
const double ZoomFactor = Distance(CameraState.Position, DrawFrame.Origin);
#Loc: <Workspace>/Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Private/Mechanics/ConstructionPlaneMechanic.cpp:179
Scope (from outer to inner):
file
function void UConstructionPlaneMechanic::Render
Source code excerpt:
TArray<FColor> Colors;
Colors.Add(GridColor);
const double Scale = Settings->GridScale;
constexpr int32 MaxLevelDensity = 500;
constexpr int32 Subdivision = 5;
MeshDebugDraw::DrawHierarchicalGrid(Scale, ZoomFactor / Scale, MaxLevelDensity, WorldMaxBounds, WorldMinBounds, Levels, Subdivision, Colors, DrawFrame, GridThickness, bDepthTested, PDI, DrawTransform);
#Loc: <Workspace>/Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Private/Mechanics/ConstructionPlaneMechanic.cpp:192
Scope (from outer to inner):
file
function void UConstructionPlaneMechanic::Render
Source code excerpt:
{
const double VisualAngleSpan = Settings->GridSize * 90.;
MeshDebugDraw::DrawSimpleFixedScreenAreaGrid(CameraState, DrawFrame, NumGridLines, VisualAngleSpan, GridThickness, GridColor, bDepthTested, PDI, DrawTransform);
break;
}
}
}
}
#Loc: <Workspace>/Engine/Plugins/Runtime/NetworkPredictionInsights/Source/NetworkPredictionInsights/Private/UI/SNPSimFrameView.cpp:1190
Scope (from outer to inner):
file
function void SNPSimFrameView::DrawHorizontalAxisGrid
Source code excerpt:
const float ViewHeight = Viewport.GetHeight();
const FLinearColor GridColor(0.0f, 0.0f, 0.0f, 0.1f);
//const FLinearColor TextBgColor(0.05f, 0.05f, 0.05f, 1.0f);
//const FLinearColor TextColor(1.0f, 1.0f, 1.0f, 1.0f);
const FLinearColor TopTextColor(1.0f, 1.0f, 1.0f, 0.7f);
//const TSharedRef<FSlateFontMeasure> FontMeasureService = FSlateApplication::Get().GetRenderer()->GetFontMeasureService();
#Loc: <Workspace>/Engine/Plugins/Runtime/NetworkPredictionInsights/Source/NetworkPredictionInsights/Private/UI/SNPSimFrameView.cpp:1202
Scope (from outer to inner):
file
function void SNPSimFrameView::DrawHorizontalAxisGrid
Source code excerpt:
// Draw vertical grid line.
DrawContext.DrawBox(X, 0, 1, ViewHeight, Brush, GridColor);
const FString Text = FText::AsNumber(Index).ToString();
//const FVector2D TextSize = FontMeasureService->Measure(Text, Font);
//constexpr float TextH = 14.0f;
// Draw background for index text.
#Loc: <Workspace>/Engine/Source/Developer/Profiler/Private/Widgets/SDataGraph.cpp:494
Scope (from outer to inner):
file
function int32 SDataGraph::OnPaint
Source code excerpt:
// Data provider is needed for time line markers.
static const FLinearColor GridColor = FLinearColor(0.0f,0.0f,0.0f, 0.25f);
static const FLinearColor GridTextColor = FLinearColor(1.0f,1.0f,1.0f, 0.25f);
TArray<FVector2D> LinePoints;
const float LabelSize = MaxFontCharHeight * 7.0f;
const TSharedPtr<FTrackedStat> FirstTrackedStat = GetFirstGraph();
if( FirstTrackedStat.IsValid() )
#Loc: <Workspace>/Engine/Source/Developer/Profiler/Private/Widgets/SDataGraph.cpp:526
Scope (from outer to inner):
file
function int32 SDataGraph::OnPaint
Source code excerpt:
LinePoints,
DrawEffects,
GridColor
);
LinePoints.Empty();
// Don't draw label if too close to the time values.
if( MarkerPosX < LabelSize || MarkerPosX > AreaX1-LabelSize )
{
#Loc: <Workspace>/Engine/Source/Developer/Profiler/Private/Widgets/SDataGraph.cpp:588
Scope (from outer to inner):
file
function int32 SDataGraph::OnPaint
Source code excerpt:
LinePoints,
DrawEffects,
GridColor
);
LinePoints.Empty();
// Don't draw label if too close to the time values.
if( MarkerPosX < LabelSize || MarkerPosX > AreaX1-LabelSize )
{
#Loc: <Workspace>/Engine/Source/Developer/Profiler/Private/Widgets/SDataGraph.cpp:769
Scope (from outer to inner):
file
function int32 SDataGraph::OnPaint
Source code excerpt:
LinePoints,
DrawEffects,
BasicHintColor ? *BasicHintColor : GridColor
);
LinePoints.Empty();
float HintOffsetY = 2.0f/*-MaxFontCharHeight * 0.5f*/;
if( IndicatorIndex == FirstHintIndex )
{
#Loc: <Workspace>/Engine/Source/Developer/Profiler/Private/Widgets/SHistogram.cpp:61
Scope (from outer to inner):
file
function int32 SHistogram::OnPaint
Source code excerpt:
uint32 CountX = (uint32)((AllottedGeometry.Size.X-LabelBuffer*2.0f) / (float)Description.GetBinCount());
float StartX = LabelBuffer;
static const FLinearColor GridColor = FLinearColor(0.0f,0.0f,0.0f, 0.25f);
static const FLinearColor GridTextColor = FLinearColor(1.0f,1.0f,1.0f, 0.25f);
static const FLinearColor BorderColor = FLinearColor(0.0f,0.0f,0.0f,1.0f);
FSlateFontInfo SummaryFont = FCoreStyle::GetDefaultFontStyle("Regular", 8);
const float MaxFontCharHeight = static_cast<float>(FontMeasureService->Measure( TEXT("!"), SummaryFont ).Y);
TArray<FVector2D> LinePoints;
#Loc: <Workspace>/Engine/Source/Developer/Profiler/Private/Widgets/SHistogram.cpp:97
Scope (from outer to inner):
file
function int32 SHistogram::OnPaint
Source code excerpt:
LinePoints,
DrawEffects,
GridColor
);
LinePoints.Empty();
// Bottom - X-Axes numbers, starting from MinValue
const FString XLabel = FString::Printf(TEXT("%.0f"), Description.MinValue + (float)Index * Description.Interval);
float FontCharWidth = static_cast<float>(FontMeasureService->Measure(XLabel, SummaryFont).X);
#Loc: <Workspace>/Engine/Source/Developer/Profiler/Private/Widgets/SHistogram.cpp:131
Scope (from outer to inner):
file
function int32 SHistogram::OnPaint
Source code excerpt:
LinePoints,
DrawEffects,
GridColor
);
LinePoints.Empty();
// Bottom - Y-Axes numbers, starting from 0
const FString YLabel = FString::Printf(TEXT("%i"), Description.Normalize ? 25 * (4-Index) : Description.GetTotalCount() / 4 * Index);
float FontCharWidth = static_cast<float>(FontMeasureService->Measure(YLabel, SummaryFont).X);
#Loc: <Workspace>/Engine/Source/Developer/TraceInsights/Private/Insights/MemoryProfiler/ViewModels/MemoryGraphTrack.cpp:769
Scope (from outer to inner):
file
function void FMemoryGraphTrack::DrawVerticalAxisGrid
Source code excerpt:
Params.Precision = Precision;
const FLinearColor GridColor(0.0f, 0.0f, 0.0f, 0.1f);
for (double Value = StartValue; Value < TopValue; Value += Grid)
{
const float Y = Y0 + RoundedViewHeight - FMath::RoundToFloat(ViewportY.GetOffsetForValue(Value));
const float LabelY = FMath::Min(MaxLabelY, FMath::Max(MinLabelY, Y - TextH / 2));
#Loc: <Workspace>/Engine/Source/Developer/TraceInsights/Private/Insights/MemoryProfiler/ViewModels/MemoryGraphTrack.cpp:784
Scope (from outer to inner):
file
function void FMemoryGraphTrack::DrawVerticalAxisGrid
Source code excerpt:
// Draw horizontal grid line.
DrawContext.DrawBox(0, Y, ViewWidth, 1, Brush, GridColor);
// Draw label.
Params.Y = LabelY;
Params.Value = Value;
DrawHorizontalAxisLabel(Params);
}
#Loc: <Workspace>/Engine/Source/Developer/TraceInsights/Private/Insights/NetworkingProfiler/Widgets/SPacketView.cpp:1040
Scope (from outer to inner):
file
function void SPacketView::DrawVerticalAxisGrid
Source code excerpt:
const float ViewWidth = Viewport.GetWidth();
const FLinearColor GridColor(0.0f, 0.0f, 0.0f, 0.1f);
const FLinearColor TextBgColor(0.05f, 0.05f, 0.05f, 1.0f);
const FLinearColor TextColor(1.0f, 1.0f, 1.0f, 1.0f);
const TSharedRef<FSlateFontMeasure> FontMeasureService = FSlateApplication::Get().GetRenderer()->GetFontMeasureService();
const float FontScale = DrawContext.Geometry.Scale;
#Loc: <Workspace>/Engine/Source/Developer/TraceInsights/Private/Insights/NetworkingProfiler/Widgets/SPacketView.cpp:1052
Scope (from outer to inner):
file
function void SPacketView::DrawVerticalAxisGrid
Source code excerpt:
// Draw horizontal grid line.
DrawContext.DrawBox(0, Y, ViewWidth, 1, Brush, GridColor);
const int64 ValueBits = static_cast<int64>(Value);
const FString Text = (ValueBits == 0) ? TEXT("0") : FString::Format(TEXT("{0} bits"), { FText::AsNumber(ValueBits).ToString() });
const FVector2D TextSize = FontMeasureService->Measure(Text, Font, FontScale) / FontScale;
const float TextW = static_cast<float>(TextSize.X);
constexpr float TextH = 14.0f;
#Loc: <Workspace>/Engine/Source/Developer/TraceInsights/Private/Insights/NetworkingProfiler/Widgets/SPacketView.cpp:1115
Scope (from outer to inner):
file
function void SPacketView::DrawHorizontalAxisGrid
Source code excerpt:
const float ViewHeight = Viewport.GetHeight();
const FLinearColor GridColor(0.0f, 0.0f, 0.0f, 0.1f);
//const FLinearColor TextBgColor(0.05f, 0.05f, 0.05f, 1.0f);
//const FLinearColor TextColor(1.0f, 1.0f, 1.0f, 1.0f);
const FLinearColor TopTextColor(1.0f, 1.0f, 1.0f, 0.7f);
//const TSharedRef<FSlateFontMeasure> FontMeasureService = FSlateApplication::Get().GetRenderer()->GetFontMeasureService();
//const float FontScale = DrawContext.Geometry.Scale;
#Loc: <Workspace>/Engine/Source/Developer/TraceInsights/Private/Insights/NetworkingProfiler/Widgets/SPacketView.cpp:1128
Scope (from outer to inner):
file
function void SPacketView::DrawHorizontalAxisGrid
Source code excerpt:
// Draw vertical grid line.
DrawContext.DrawBox(X, 0, 1, ViewHeight, Brush, GridColor);
const FString Text = FText::AsNumber(Index).ToString();
//const FVector2D TextSize = FontMeasureService->Measure(Text, Font, FontScale) / FontScale;
//constexpr float TextH = 14.0f;
// Draw background for index text.
#Loc: <Workspace>/Engine/Source/Developer/TraceInsights/Private/Insights/ViewModels/TimingGraphTrack.cpp:976
Scope (from outer to inner):
file
function void FTimingGraphTrack::DrawVerticalAxisGrid
Source code excerpt:
const double StartValue = FMath::GridSnap(BottomValue, Grid);
const FLinearColor GridColor(0.0f, 0.0f, 0.0f, 0.1f);
const FLinearColor TextBgColor(0.05f, 0.05f, 0.05f, 1.0f);
const FLinearColor TextColor = FirstTimeUnitSeries->GetColor().CopyWithNewOpacity(1.0f);
for (double Value = StartValue; Value < TopValue; Value += Grid)
{
const float Y = Y0 + RoundedViewHeight - FMath::RoundToFloat(ViewportY.GetOffsetForValue(Value));
#Loc: <Workspace>/Engine/Source/Developer/TraceInsights/Private/Insights/ViewModels/TimingGraphTrack.cpp:987
Scope (from outer to inner):
file
function void FTimingGraphTrack::DrawVerticalAxisGrid
Source code excerpt:
// Draw horizontal grid line.
DrawContext.DrawBox(0, Y, ViewWidth, 1, Brush, GridColor);
const FVector2D LabelTextSize = FontMeasureService->Measure(LabelText, Font, FontScale) / FontScale;
const float LabelX = X0 - static_cast<float>(LabelTextSize.X) - 4.0f;
const float LabelY = FMath::Min(Y0 + GetHeight() - TextH, FMath::Max(Y0, Y - TextH / 2));
// Draw background for value text.
#Loc: <Workspace>/Engine/Source/Developer/TraceInsights/Private/Insights/Widgets/SFrameTrack.cpp:836
Scope (from outer to inner):
file
function void SFrameTrack::DrawVerticalAxisGrid
Source code excerpt:
const float RoundedViewHeight = FMath::RoundToFloat(ViewportY.GetSize());
const FLinearColor GridColor(0.0f, 0.0f, 0.0f, 0.1f);
const FLinearColor TextBgColor(0.05f, 0.05f, 0.05f, 1.0f);
const TSharedRef<FSlateFontMeasure> FontMeasureService = FSlateApplication::Get().GetRenderer()->GetFontMeasureService();
const float FontScale = DrawContext.Geometry.Scale;
// Available axis, pre-ordered by value.
#Loc: <Workspace>/Engine/Source/Developer/TraceInsights/Private/Insights/Widgets/SFrameTrack.cpp:952
Scope (from outer to inner):
file
function void SFrameTrack::DrawVerticalAxisGrid
Source code excerpt:
// Draw horizontal grid line.
DrawContext.DrawBox(0, Axis.Y, ViewWidth, 1.0f, Brush, GridColor);
const FString LabelText = (Axis.Value == 0.0) ? TEXT("0") :
(Axis.Value <= 1.0) ? FString::Printf(TEXT("%s (%.0f fps)"), *TimeUtils::FormatTimeAuto(Axis.Value), 1.0 / Axis.Value) :
TimeUtils::FormatTimeAuto(Axis.Value);
const float LabelTextWidth = static_cast<float>(FontMeasureService->Measure(LabelText, Font, FontScale).X / FontScale);
#Loc: <Workspace>/Engine/Source/Developer/TraceInsights/Private/Insights/Widgets/SFrameTrack.cpp:1018
Scope (from outer to inner):
file
function void SFrameTrack::DrawHorizontalAxisGrid
Source code excerpt:
// Draw vertical grid lines.
const FLinearColor GridColor(0.0f, 0.0f, 0.0f, 0.1f);
for (int32 Index = StartIndex; Index < RightIndex; Index += Grid)
{
const float X = FMath::RoundToFloat(ViewportX.GetOffsetForValue(Index));
DrawContext.DrawBox(X, 0.0f, 1.0f, ViewHeight, Brush, GridColor);
}
DrawContext.LayerId++;
}
else
{
const TSharedRef<FSlateFontMeasure> FontMeasureService = FSlateApplication::Get().GetRenderer()->GetFontMeasureService();
#Loc: <Workspace>/Engine/Source/Editor/DistCurveEditor/Private/CurveEditorViewportClient.cpp:81
Scope (from outer to inner):
file
function FCurveEditorViewportClient::FCurveEditorViewportClient
Source code excerpt:
LabelColor = SharedData->EditorOptions->LabelColor;
SelectedLabelColor = SharedData->EditorOptions->SelectedLabelColor;
GridColor = SharedData->EditorOptions->GridColor;
GridTextColor = SharedData->EditorOptions->GridTextColor;
LabelBlockBkgColor = SharedData->EditorOptions->LabelBlockBkgColor;
SelectedKeyColor = SharedData->EditorOptions->SelectedKeyColor;
MouseOverCurveIndex = INDEX_NONE;
MouseOverSubIndex = INDEX_NONE;
#Loc: <Workspace>/Engine/Source/Editor/DistCurveEditor/Private/CurveEditorViewportClient.cpp:1324
Scope (from outer to inner):
file
function void FCurveEditorViewportClient::DrawGrid
Source code excerpt:
while(InNum * InGridSpacing < SharedData->EndIn)
{
FLinearColor LineColor = GridColor;
// Change line color for important frames.
if (bSnapToFrames)
{
LineColor = NormalLine;
if (InNum % FrameStep == 0)
#Loc: <Workspace>/Engine/Source/Editor/DistCurveEditor/Private/CurveEditorViewportClient.cpp:1352
Scope (from outer to inner):
file
function void FCurveEditorViewportClient::DrawGrid
Source code excerpt:
{
FIntPoint GridPos = CalcScreenPos(FVector2D(0.f, OutNum*OutGridSpacing));
LineItem.SetColor( GridColor );
LineItem.Draw( Canvas, FVector2D(LabelWidth, GridPos.Y), FVector2D(LabelWidth + CurveViewX, GridPos.Y) );
OutNum++;
}
// Calculate screen position of graph origin and draw white lines to indicate it
#Loc: <Workspace>/Engine/Source/Editor/DistCurveEditor/Private/CurveEditorViewportClient.h:152
Scope (from outer to inner):
file
class class FCurveEditorViewportClient : public FCommonViewportClient
Source code excerpt:
FLinearColor LabelColor;
FLinearColor SelectedLabelColor;
FLinearColor GridColor;
FLinearColor GridTextColor;
FLinearColor LabelBlockBkgColor;
FLinearColor SelectedKeyColor;
int32 MouseOverCurveIndex;
int32 MouseOverSubIndex;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Preferences/CurveEdOptions.h:35
Scope (from outer to inner):
file
class class UCurveEdOptions : public UObject
Source code excerpt:
UPROPERTY(EditAnywhere, config, Category=Options)
FLinearColor GridColor;
UPROPERTY(EditAnywhere, config, Category=Options)
FLinearColor GridTextColor;
UPROPERTY(EditAnywhere, config, Category=Options)
FLinearColor LabelBlockBkgColor;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/SCurveEditor.cpp:80
Scope (from outer to inner):
file
function void SCurveEditor::Construct
Source code excerpt:
DesiredSize = InArgs._DesiredSize;
GridColor = InArgs._GridColor;
bIsUsingSlider = false;
bAllowAutoFrame = true;
// if editor size is set, use it, otherwise, use default value
if (DesiredSize.Get().IsZero())
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/SCurveEditor.cpp:1158
Scope (from outer to inner):
file
function void SCurveEditor::PaintGridLines
Source code excerpt:
LinePoints,
DrawEffects,
GridColor,
false);
//Show grid time
if (bDrawInputGridNumbers)
{
FString TimeStr = FString::Printf(TEXT("%.2f"), Time);
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/SCurveEditor.cpp:1203
Scope (from outer to inner):
file
function void SCurveEditor::PaintGridLines
Source code excerpt:
LinePoints,
DrawEffects,
GridColor,
false);
//Show grid value
if (bDrawOutputGridNumbers)
{
FString ValueStr = FString::Printf(TEXT("%.2f"), Value);
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Public/SCurveEditor.h:842
Scope (from outer to inner):
file
class class SCurveEditor : public SCompoundWidget, public FGCObject, public FEditorUndoClient
Source code excerpt:
/** The color used to draw the grid lines. */
FLinearColor GridColor;
/** The tolerance to use when reducing curves */
float ReduceTolerance;
/** Generic Popup Entry */
TWeakPtr<IMenu> EntryPopupMenu;
#Loc: <Workspace>/Engine/Source/Editor/ViewportInteraction/Private/ViewportWorldInteraction.cpp:2809
Scope (from outer to inner):
file
function void UViewportWorldInteraction::RefreshTransformGizmo
Source code excerpt:
// Animate the grid a little bit
const FLinearColor GridColor = FLinearColor::LerpUsingHSV(
FLinearColor::White,
FLinearColor::Yellow,
FMath::MakePulsatingValue( GetTimeSinceEntered().GetTotalSeconds(), 0.5f ) ).CopyWithNewOpacity( GridAlpha );
const float GridInterval = GEditor->GetGridSize();
#Loc: <Workspace>/Engine/Source/Editor/ViewportInteraction/Private/ViewportWorldInteraction.cpp:2828
Scope (from outer to inner):
file
function void UViewportWorldInteraction::RefreshTransformGizmo
Source code excerpt:
static FName GridColorParameterName( "GridColor" );
LocalSnapGridMID->SetVectorParameterValue( GridColorParameterName, GridColor );
static FName GridCenterParameterName( "GridCenter" );
LocalSnapGridMID->SetVectorParameterValue( GridCenterParameterName, SnapGridCenter );
static FName GridIntervalParameterName( "GridInterval" );
LocalSnapGridMID->SetScalarParameterValue( GridIntervalParameterName, GridInterval );
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/WorldGridPreviewer.cpp:11
Scope (from outer to inner):
file
function FWorldGridPreviewer::FWorldGridPreviewer
Source code excerpt:
: CellSize(0)
, LoadingRange(0)
, GridColor(ForceInit)
, GridOffset(ForceInit)
, World(nullptr)
{}
FWorldGridPreviewer::FWorldGridPreviewer(UWorld* InWorld, bool bInIs2D)
: FWorldGridPreviewer()
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/WorldGridPreviewer.cpp:73
Scope (from outer to inner):
file
function void FWorldGridPreviewer::Update
Source code excerpt:
MaterialInstance->SetScalarParameterValueEditorOnly(TEXT("Grid_CellSize"), (float)CellSize);
MaterialInstance->SetScalarParameterValueEditorOnly(TEXT("Grid_LoadingRange"), (float)LoadingRange);
MaterialInstance->SetVectorParameterValueEditorOnly(TEXT("Grid_Color"), GridColor);
//MaterialInstance->SetVectorParameterValueEditorOnly(TEXT("Grid_Offset"), GridOffset);
}
}
#endif
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/WorldPartition/RuntimeHashSet/RuntimePartitionLHGrid.cpp:105
Scope (from outer to inner):
file
function void URuntimePartitionLHGrid::PostEditChangeProperty
Source code excerpt:
{
WorldGridPreviewer->CellSize = CellSize;
WorldGridPreviewer->GridColor = DebugColor;
WorldGridPreviewer->GridOffset = FVector::ZeroVector;
WorldGridPreviewer->LoadingRange = LoadingRange;
WorldGridPreviewer->Update();
}
Super::PostEditChangeProperty(InPropertyChangedEvent);
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/WorldPartition/WorldPartitionRuntimeSpatialHashGridPreviewer.cpp:78
Scope (from outer to inner):
file
function void FWorldPartitionRuntimeSpatialHashGridPreviewer::Draw
Source code excerpt:
}
if (CachedParameters.GridColor != Grid.DebugColor)
{
MID->SetVectorParameterValue(*FString::Printf(TEXT("Grid%d_Color"), i), Grid.DebugColor);
CachedParameters.GridColor = Grid.DebugColor;
}
FVector GridOffset = FVector(Grid.Origin, 0) + (bUseAlignedGridLevels ? FVector(0.5 * PreviewCellSize) : FVector::ZeroVector);
if (CachedParameters.GridOffset != GridOffset)
{
MID->SetVectorParameterValue(*FString::Printf(TEXT("Grid%d_Offset"), i), GridOffset);
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/WorldSettings.cpp:780
Scope (from outer to inner):
file
function void AWorldSettings::PostEditChangeProperty
Source code excerpt:
{
InstancedFoliageGridGridPreviewer->CellSize = InstancedFoliageGridSize;
InstancedFoliageGridGridPreviewer->GridColor = FColor::White;
InstancedFoliageGridGridPreviewer->GridOffset = FVector::ZeroVector;
InstancedFoliageGridGridPreviewer->LoadingRange = MAX_int32;
InstancedFoliageGridGridPreviewer->Update();
}
}
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/WorldGridPreviewer.h:29
Scope: file
Source code excerpt:
int32 CellSize;
int32 LoadingRange;
FLinearColor GridColor;
FVector GridOffset;
private:
TObjectPtr<UWorld> World;
TObjectPtr<UMaterial> Material;
TObjectPtr<UMaterialInstanceConstant> MaterialInstance;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/WorldPartition/WorldPartitionRuntimeSpatialHashGridPreviewer.h:38
Scope (from outer to inner):
file
function FGridParametersCache
Source code excerpt:
, CellSize(0)
, LoadingRange(0.f)
, GridColor(0.f, 0.f, 0.f, 0.f)
, GridOffset(FVector::ZeroVector)
{}
bool bEnabled;
int32 CellSize;
float LoadingRange;
FLinearColor GridColor;
FVector GridOffset;
};
enum { MAX_PREVIEW_GRIDS = 4 };
FGridParametersCache GridParameters[MAX_PREVIEW_GRIDS];
#endif