refactoring/cleanups
This commit is contained in:
@@ -154,7 +154,7 @@ void Painter::drawImage(const Point2 pt, const QImage& img) {
|
||||
|
||||
void Painter::drawLength(Point2 p1, Point2 p2, const float len, const float offset) {
|
||||
if (p1.x < p2.x) {swap(p1, p2);}
|
||||
const Point2 center_m = (p1 + p2) / 2;
|
||||
const Point2 center_m = (p1 + p2) / 2 - Point2(0.5,0);
|
||||
Point2 dir_px = (p2 - p1).perpendicular().normalized() * (5+offset);
|
||||
if (dir_px.x <= 0) {dir_px = -dir_px;}
|
||||
const Point2 pos_m = center_m + dir_px / getScaler().getScale();
|
||||
|
||||
Reference in New Issue
Block a user