MCPcopy Create free account
hub / github.com/OpenImageDebugger/OpenImageDebugger / window_resized

Method window_resized

src/visualization/components/camera.cpp:84–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84void Camera::window_resized(const int w, const int h) {
85 projection_.set_ortho_projection(static_cast<float>(w) / 2.0f,
86 static_cast<float>(h) / 2.0f,
87 -1.0f,
88 1.0f);
89 canvas_width_ = w;
90 canvas_height_ = h;
91}
92
93void Camera::scroll_callback(const float delta) {
94 const auto mouse_x = static_cast<float>(gl_canvas_ref().mouse_x());

Callers 2

resize_callbackMethod · 0.80
render_buffer_iconMethod · 0.80

Calls 1

set_ortho_projectionMethod · 0.80

Tested by

no test coverage detected