289 Axis relX, relY; |
289 Axis relX, relY; |
290 |
290 |
291 renderer()->getRelativeAxes (relX, relY); |
291 renderer()->getRelativeAxes (relX, relY); |
292 QLineF ln (v0[relX], v0[relY], v1[relX], v1[relY]); |
292 QLineF ln (v0[relX], v0[relY], v1[relX], v1[relY]); |
293 ln.setAngle (intervalClamp<int> (ln.angle(), 45)); |
293 ln.setAngle (intervalClamp<int> (ln.angle(), 45)); |
294 result.setCoordinate (relX, Grid::Snap (ln.x2(), Grid::Coordinate)); |
294 result.setCoordinate (relX, snapToGrid (ln.x2(), Grid::Coordinate)); |
295 result.setCoordinate (relY, Grid::Snap (ln.y2(), Grid::Coordinate)); |
295 result.setCoordinate (relY, snapToGrid (ln.y2(), Grid::Coordinate)); |
296 } |
296 } |
297 |
297 |
298 return result; |
298 return result; |
299 } |
299 } |