Procházet zdrojové kódy

now i fixed the accuracy issues

naelstrof před 11 roky
rodič
revize
46092fa6f9
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2
    2
      main.cpp

+ 2
- 2
main.cpp Zobrazit soubor

@@ -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 );