mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 23:20:52 +01:00
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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user