Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added images/cursor-move-parallel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
181 changes: 181 additions & 0 deletions images/svg/cursor-move-parallel.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
120 changes: 120 additions & 0 deletions images/svg/tool-move-parallel.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/tool-move-parallel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<file>images/cursor-georeferencing-move.png</file>
<file>images/cursor-hollow.png</file>
<file>images/cursor-invisible.png</file>
<file>images/cursor-move-parallel.png</file>
<file>images/cursor-rotate.png</file>
<file>images/cursor-scale.png</file>
<file>images/cut.png</file>
Expand Down Expand Up @@ -102,6 +103,7 @@
<file>images/tool-fill-border.png</file>
<file>images/tool-gps-display.png</file>
<file>images/tool-measure.png</file>
<file>images/tool-move-parallel.png</file>
<file>images/tool-rotate.png</file>
<file>images/tool-rotate-pattern.png</file>
<file>images/tool-scale.png</file>
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ set(Mapper_Common_SRCS
tools/object_selector.cpp
tools/pan_tool.cpp
tools/point_handles.cpp
tools/move_parallel_tool.cpp
tools/rotate_tool.cpp
tools/rotate_pattern_tool.cpp
tools/scale_tool.cpp
Expand Down
2 changes: 1 addition & 1 deletion src/core/objects/object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,7 @@ ClosestPathCoord PathObject::findClosestPointTo(

using distance_type = decltype(ClosestPathCoord::distance_squared);
return std::accumulate(begin(path_parts), end(path_parts),
ClosestPathCoord { {}, std::numeric_limits<distance_type>::max() },
ClosestPathCoord { {}, {}, std::numeric_limits<distance_type>::max() },
op);
}

Expand Down
8 changes: 7 additions & 1 deletion src/core/path_coord.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,17 @@ class PathCoord


/**
* The structure returned when looking for closest coordinates on a path.
* The structure returned when looking for the closest coordinates on a path.
* The tangent element is defined even on corners and line ends. Following the
* intuitive view, the tangent line touches the corner, dividing the plane into
* the part with the corner and the part without it. At the line ends, the
* "tangent" is the direction of the neighboring segment. The "pseudo tangent"
* is generated to define the direction for mouse drag actions.
*/
struct ClosestPathCoord
{
PathCoord path_coord;
MapCoordF tangent;
double distance_squared;
};

Expand Down
Loading