Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add quick measure overlays with Alt pressed #1894

Merged
merged 2 commits into from
Aug 10, 2024
Merged

Add quick measure overlays with Alt pressed #1894

merged 2 commits into from
Aug 10, 2024

Conversation

0HyperCube
Copy link
Member

@0HyperCube 0HyperCube commented Aug 4, 2024

Partly closes #1896

Some edge cases to consider (I'm not sure what anyone else does here since this isn't in Inkscape) (explained in the newly filed issue above):

  • Rotated bounding box
  • Rotated hover target
  • Intersecting bounding boxes between the selected and hovered
  • How we choose between [horizontal then vertical] or [vertical then horizontal] for drawing the lines (currently we always do horizontal then vertical from the selected layer).
  • How we do text when the document is rotated >90

demo

Base automatically changed from alignment-snap to master August 5, 2024 05:12
@Keavon Keavon changed the title Measure with alt Add quick measure overlays with Alt pressed Aug 5, 2024
@Keavon
Copy link
Member

Keavon commented Aug 5, 2024

I filed an issue with detailed diagrams for each scenario: #1896

To answer your questions:

  • Rotated bounding box
  • Rotated hover target

It should operate based on the AABB (in document space). We also want those bounding boxes (for both the selected and hovered shapes) to be drawn when holding Alt to make it clear what's being measured against what (so even if the shapes aren't rectangles, the measurement lines in the issue's diagrams actually connect to something instead of terminating confusingly in empty space).

  • Intersecting bounding boxes between the selected and hovered
  • How we choose between [horizontal then vertical] or [vertical then horizontal] for drawing the lines (currently we always do horizontal then vertical from the selected layer).

See the diagrams in the issue.

  • How we do text when the document is rotated >90

The measurement lines and AABBs for the shapes should all get tilted along with the viewport navigation PTZ tilt, but the actual text labels should remain upright for easier readability.

@Keavon Keavon marked this pull request as ready for review August 10, 2024 11:47
@Keavon Keavon merged commit 1f27879 into master Aug 10, 2024
2 checks passed
@Keavon Keavon deleted the measure branch August 10, 2024 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quick measurement overlays while holding the Alt key
2 participants