Просмотр исходного кода

now i fixed the accuracy issues

naelstrof 10 лет назад
Родитель
Сommit
46092fa6f9
1 измененных файлов: 2 добавлений и 2 удалений
  1. 2
    2
      main.cpp

+ 2
- 2
main.cpp Просмотреть файл

@@ -133,8 +133,8 @@ int main( int argc, char** argv ) {
133 133
                     break;
134 134
                 }
135 135
                 // Check to make sure the user actually wants to drag for a selection before creating a rectangle.
136
-                int w = xengine->m_mousex - cx;
137
-                int h = xengine->m_mousey - cy;
136
+                int w = xengine->m_mousex - cx + 1;
137
+                int h = xengine->m_mousey - cy + 1;
138 138
                 if ( ( std::abs( w ) > tolerance || std::abs( h ) > tolerance ) && !selection ) {
139 139
                     selection = new slop::Rectangle( cx, cy, 0, 0, borderSize, padding, r, g, b );
140 140
                     xengine->addRect( selection );