RealDocs

FGeometry::Scale

property SlateCore Deprecated Since 4.0
Deprecated: Use GetAccumulatedLayoutTransform().GetScale() instead.
#include "Layout/Geometry.h"
Access: public Specifiers: const

Description

Scale in absolute space, equivalent to the scale component of the accumulated layout transform. Does not account for render transforms.

Caveats & Gotchas

  • Deprecated — this field reflects only the layout transform scale and ignores any render transform scale applied to the widget or its ancestors. For the true composite scale, use GetAccumulatedRenderTransform().
  • On high-DPI screens this value includes the OS DPI scale factor, so it is not simply 1.0 even when no explicit scale has been set on the widget.

Signature

const float Scale

Example

Reading DPI scale (legacy) C++
// Prefer GetAccumulatedLayoutTransform().GetScale() in new code.
float DPIScale = MyGeometry.Scale;
UE_LOG(LogTemp, Log, TEXT("Layout scale: %.2f"), DPIScale);

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.