Magnum::Platform::Sdl2Application::ViewportEvent class

Viewport event.

Constructors, destructors, conversion operators

ViewportEvent(const ViewportEvent&) deleted
Copying is not allowed.
ViewportEvent(ViewportEvent&&) deleted
Moving is not allowed.

Public functions

auto operator=(const ViewportEvent&) -> ViewportEvent& deleted
Copying is not allowed.
auto operator=(ViewportEvent&&) -> ViewportEvent& deleted
Moving is not allowed.
auto windowSize() const -> Vector2i
Window size.
auto framebufferSize() const -> Vector2i
Framebuffer size.
auto dpiScaling() const -> Vector2
DPI scaling.
auto event() const -> const SDL_Event&
Underlying SDL event.

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.

const SDL_Event& Magnum::Platform::Sdl2Application::ViewportEvent::event() const

Underlying SDL event.

Of type SDL_WINDOWEVENT.