Browse Source

python: expose also platform.*.Application.dpi_scaling.

For some reason only window and framebuffer size was exposed but not
this. Made DPI-aware calculations impossible to do.
pull/19/head
Vladimír Vondruš 4 years ago
parent
commit
bce7509e87
  1. 2
      doc/python/pages/changelog.rst
  2. 1
      src/python/magnum/platform/application.h

2
doc/python/pages/changelog.rst

@ -96,6 +96,8 @@ Changelog
to make the window resizable on startup
- Exposed :ref:`platform.sdl2.Application.exit_event` and
:ref:`platform.glfw.Application.exit_event`
- Exposed :ref:`platform.sdl2.Application.dpi_scaling` and
:ref:`platform.glfw.Application.dpi_scaling`
- Exposed :ref:`platform.glfw.Application.swap_interval` and
:ref:`platform.glfw.Application.main_loop_iteration`
- Exposed a basic interface of :ref:`trade.AbstractImageConverter` and

1
src/python/magnum/platform/application.h

@ -85,6 +85,7 @@ template<class T, class Trampoline, class Holder> void application(py::class_<T,
.def("redraw", &T::redraw, "Redraw immediately")
.def_property_readonly("window_size", &T::windowSize, "Window size")
.def_property_readonly("framebuffer_size", &T::framebufferSize, "Framebuffer size")
.def_property_readonly("dpi_scaling", static_cast<Vector2(T::*)() const>(&T::dpiScaling), "DPI scaling")
/* Event handlers */
.def("exit_event", &T::exitEvent, "Exit event")
.def("viewport_event", &T::viewportEvent, "Viewport event")

Loading…
Cancel
Save