FFrameRate::ComputeGridSpacing

Compute a desirable grid spacing for the specified screen units

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Misc/FrameRate.h

Include

#include "Misc/FrameRate.h"

Source

/Engine/Source/Runtime/Core/Private/Misc/FrameRate.cpp

Syntax

bool ComputeGridSpacing
(
    const float PixelsPerSecond,
    double & OutMajorInterval,
    int32 & OutMinorDivisions,
    float MinTickPx,
    float DesiredMajorTickPx
) const

Remarks

Compute a desirable grid spacing for the specified screen units

Returns

True if a valid grid spacing was computed, false otherwise.

Parameters

Parameter

Description

PixelsPerSecond

The number of pixels representing a second of time

OutMajorInterval

(Out) The interval in seconds at which to draw major grid lines

OutMinorDivisions

(Out) The number of divisions to draw between major tick lines

MinTickPx

(Optional) The smallest size in pixels that is desirable between ticks

DesiredMajorTickPx

(Optional) The desired size to compute major tick lines from

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss