You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/robot_dart/gui/magnum/gs/camera.cpp
+10-7
Original file line number
Diff line number
Diff line change
@@ -327,26 +327,29 @@ namespace robot_dart {
327
327
auto viewport = Magnum::Vector2{_camera->viewport()};
328
328
auto sc = Magnum::Vector2{viewport.max() / 1024.f};
329
329
auto text_scaling = Magnum::Matrix3::scaling(sc);
330
-
auto extra_tr = Magnum::Matrix3(Magnum::Math::IdentityInit);
331
-
if ((text->alignment & Magnum::Text::Implementation::AlignmentVertical) == Magnum::Text::Implementation::AlignmentLine) // if line (bottom) alignment, push the text a bit above
auto text_tr = Magnum::Matrix3(Magnum::Matrix3d(text->transformation));
335
332
336
333
if (text->draw_background) {
337
-
auto bg_scaling = Magnum::Matrix3::scaling(Magnum::Vector2{viewport[0], rectangle.sizeY() * sc[1]});
334
+
auto extra_tr = Magnum::Matrix3(Magnum::Math::IdentityInit);
335
+
if ((text->alignment & Magnum::Text::Implementation::AlignmentVertical) == Magnum::Text::Implementation::AlignmentBottom) // if bottom alignment, push the bg a bit above
if ((text->alignment & Magnum::Text::Implementation::AlignmentVertical) == Magnum::Text::Implementation::AlignmentTop) // if top alignment, push the bg a bit down
0 commit comments