From 96fd15a91307a397b09571b9de6650b189b8a2bd Mon Sep 17 00:00:00 2001 From: xavier Date: Sun, 10 Jan 2010 19:11:32 +0000 Subject: [PATCH] Optimisation sur le rendu de la grille. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@838 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/diagram.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/diagram.cpp b/sources/diagram.cpp index 446ae770e..a5340eb88 100644 --- a/sources/diagram.cpp +++ b/sources/diagram.cpp @@ -111,11 +111,13 @@ void Diagram::drawBackground(QPainter *p, const QRectF &r) { int g_y = (int)ceil(r.y()); while (g_y % yGrid) ++ g_y; + QPolygon points; for (int gx = g_x ; gx < limite_x ; gx += xGrid) { for (int gy = g_y ; gy < limite_y ; gy += yGrid) { - p -> drawPoint(gx, gy); + points << QPoint(gx, gy); } } + p -> drawPoints(points); } if (use_border) border_and_inset.draw(p, margin, margin);