mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
5b6f468547
Placing labels at half-integer values gives horrible rendering artifacts. Therefore, always round to integer values. The easiest way to do this is right before setting the position. Introduce a helper function to round QPointF in such scenarios. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
10 lines
165 B
C++
10 lines
165 B
C++
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
#include "statshelper.h"
|
|
|
|
#include <cmath>
|
|
|
|
QPointF roundPos(const QPointF &p)
|
|
{
|
|
return QPointF(round(p.x()), round(p.y()));
|
|
}
|