FreeRuler icon indicating copy to clipboard operation
FreeRuler copied to clipboard

add crosshair cursor position readout relative to a reference point

Open rudifa opened this issue 4 years ago • 0 comments

@pascalpp Hello Pascal

This pull request replaces my previous one of October 2019: Feature: crosshair cursor readout relative to a reference point set by the user.

It works like this:

  • user moves the crosshair cursor to the desired reference point and taps on key "." to set it.
  • henceforth the x, y readout values are relative to the reference point
  • user taps again on key "." to unset it
  • the reference point remains active even if rulers are moved

PS. While I removed my debug printouts from the commit, I left in my debugging tool func printClassAndFunc, which you might find useful for tracking function calls and data during test runs. You just insert lines like these

   printClassAndFunc()
   printClassAndFunc(info: "mouseTickY=\(mouseTickY) label=\(label)")

If you are not interested, simply remove DebugUtil.swift from the project.

Best regards, @rudifa

rudifa avatar Sep 09 '21 15:09 rudifa