src/editmodes/abstractEditMode.cpp

changeset 1199
613a981223a6
parent 1192
317f4ce38f3f
equal deleted inserted replaced
1198:f7151e4cd90f 1199:613a981223a6
309 Axis relativeX; 309 Axis relativeX;
310 Axis relativeY; 310 Axis relativeY;
311 renderer()->getRelativeAxes(relativeX, relativeY); 311 renderer()->getRelativeAxes(relativeX, relativeY);
312 QLineF line = {vertex0[relativeX], vertex0[relativeY], vertex1[relativeX], vertex1[relativeY]}; 312 QLineF line = {vertex0[relativeX], vertex0[relativeY], vertex1[relativeX], vertex1[relativeY]};
313 line.setAngle(roundToInterval<int>(line.angle(), 45)); 313 line.setAngle(roundToInterval<int>(line.angle(), 45));
314 QPointF point = grid()->snap(line.p2()); 314 QPointF point = Grid::snap(line.p2());
315 result.setCoordinate(relativeX, point.x()); 315 result.setCoordinate(relativeX, point.x());
316 result.setCoordinate(relativeY, point.y()); 316 result.setCoordinate(relativeY, point.y());
317 } 317 }
318 318
319 return result; 319 return result;

mercurial