diff --git a/src/modules/MeasureTool/MeasureToolCore/ScreenCapturing.cpp b/src/modules/MeasureTool/MeasureToolCore/ScreenCapturing.cpp index c7b5f19b96..88ac0a4085 100644 --- a/src/modules/MeasureTool/MeasureToolCore/ScreenCapturing.cpp +++ b/src/modules/MeasureTool/MeasureToolCore/ScreenCapturing.cpp @@ -337,6 +337,13 @@ void UpdateCaptureState(const CommonState& commonState, perColorChannelEdgeDetection = state.global.perColorChannelEdgeDetection; }); + // We must offset mouse cursor, since its position is off by one from its center (TODO: reason?) + if (cursorPos.x > 0) + --cursorPos.x; + + if (cursorPos.y > 0) + --cursorPos.y; + // Every one of 4 edges is a coordinate of the last similar pixel in a row // Example: given a 5x5 green square on a blue background with its top-left pixel // at 20x100, bounds should be [20,100]-[24,104]. We don't include [25,105] or