]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
fix grid so it stays still and only in plotted area
authoradam@algroup.co.uk <adam@algroup.co.uk@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Tue, 21 Jul 2009 16:27:23 +0000 (16:27 +0000)
committeradam@algroup.co.uk <adam@algroup.co.uk@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Tue, 21 Jul 2009 16:27:23 +0000 (16:27 +0000)
linux/proxguiqt.cpp

index af32809dda9ed9d9d6121d800f12fcbfa732a792..2be3f68228ec26cf1658cee0c02ced2b8685414f 100644 (file)
@@ -119,7 +119,7 @@ void ProxWidget::paintEvent(QPaintEvent *event)
         // plot X and Y grid lines
         int i;
         if ((PlotGridX > 0) && ((PlotGridX * GraphPixelsPerPoint) > 1)) {
         // plot X and Y grid lines
         int i;
         if ((PlotGridX > 0) && ((PlotGridX * GraphPixelsPerPoint) > 1)) {
-               for(i = GraphStart; i < r.right(); i += (int)(PlotGridX * GraphPixelsPerPoint)) {
+               for(i = 40; i < r.right(); i += (int)(PlotGridX * GraphPixelsPerPoint)) {
                        //SelectObject(hdc, GreyPenLite);
                        //MoveToEx(hdc, r.left + i, r.top, NULL);
                        //LineTo(hdc, r.left + i, r.bottom);
                        //SelectObject(hdc, GreyPenLite);
                        //MoveToEx(hdc, r.left + i, r.top, NULL);
                        //LineTo(hdc, r.left + i, r.bottom);
@@ -130,10 +130,10 @@ void ProxWidget::paintEvent(QPaintEvent *event)
         } 
         if ((PlotGridY > 0) && ((PlotGridY * GraphPixelsPerPoint) > 1)){
                for(i = 0; i < ((r.top() + r.bottom())>>1); i += (int)(PlotGridY * GraphPixelsPerPoint)) {
         } 
         if ((PlotGridY > 0) && ((PlotGridY * GraphPixelsPerPoint) > 1)){
                for(i = 0; i < ((r.top() + r.bottom())>>1); i += (int)(PlotGridY * GraphPixelsPerPoint)) {
-                               lightgreyPath.moveTo(r.left(),zeroHeight + i);
+                               lightgreyPath.moveTo(r.left() + 40,zeroHeight + i);
                        lightgreyPath.lineTo(r.right(),zeroHeight + i);
                        painter.drawPath(lightgreyPath);
                        lightgreyPath.lineTo(r.right(),zeroHeight + i);
                        painter.drawPath(lightgreyPath);
-                       lightgreyPath.moveTo(r.left(),zeroHeight - i);
+                       lightgreyPath.moveTo(r.left() + 40,zeroHeight - i);
                        lightgreyPath.lineTo(r.right(),zeroHeight - i);
                        painter.drawPath(lightgreyPath);
                        }
                        lightgreyPath.lineTo(r.right(),zeroHeight - i);
                        painter.drawPath(lightgreyPath);
                        }
Impressum, Datenschutz