Magnum::Platform::Sdl2Application::ViewportEvent class

Viewport event.

Contents

Public functions

auto windowSize() const -> Vector2i
Window size.
auto framebufferSize() const -> Vector2i
Framebuffer size.
auto dpiScaling() const -> Vector2
DPI scaling.

Function documentation

Vector2i Magnum::Platform::Sdl2Application::ViewportEvent::windowSize() const

Window size.

On some platforms with HiDPI displays, window size can be different from framebufferSize(). See DPI awareness for more information.

Vector2i Magnum::Platform::Sdl2Application::ViewportEvent::framebufferSize() const

Framebuffer size.

On some platforms with HiDPI displays, framebuffer size can be different from windowSize(). See DPI awareness for more information.

Vector2 Magnum::Platform::Sdl2Application::ViewportEvent::dpiScaling() const

DPI scaling.

On some platforms moving an app between displays can result in DPI scaling value being changed in tandem with a window/framebuffer size. Simply resizing a window doesn't change the DPI scaling value. See DPI awareness for more information.