File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1
1
#include " Rectangle.h"
2
2
3
+ #include < cmath>
4
+
3
5
#include " ui/UI.h"
4
6
#include " types/mesh/Rectangle.h"
5
7
#include " scene/actor/Mesh.h"
@@ -40,14 +42,14 @@ void Rectangle::UpdateImpl() {
40
42
if ( m_mesh ) {
41
43
const auto top_left = m_ui->ClampXY (
42
44
{
43
- m_area.left ,
44
- m_area.top ,
45
+ std::round ( m_area.left ) ,
46
+ std::round ( m_area.top ) ,
45
47
}
46
48
);
47
49
const auto bottom_right = m_ui->ClampXY (
48
50
{
49
- m_area.right ,
50
- m_area.bottom ,
51
+ std::round ( m_area.right ) ,
52
+ std::round ( m_area.bottom ) ,
51
53
}
52
54
);
53
55
if ( m_tile_dimensions.x && m_tile_dimensions.y ) {
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ void Text::UpdateImpl() {
22
22
if ( m_actor ) {
23
23
m_actor->SetPosition (
24
24
{
25
- m_ui->ClampX ( m_area.left ),
26
- m_ui->ClampY ( m_area.bottom ),
25
+ m_ui->ClampX ( std::round ( m_area.left ) ),
26
+ m_ui->ClampY ( std::round ( m_area.bottom ) ),
27
27
m_area.zindex ,
28
28
}
29
29
);
You can’t perform that action at this time.
0 commit comments