User Pref: Crosshair option #53

Open
opened 2021-10-05 04:29:28 +00:00 by kirsle · 0 comments
Owner

Add a setting to draw a + crosshair centered at the cursor, with configurable length as a percentage of the screen or so a maxed out length has the crosshair always reach the edges of the editor viewport.

% of screen algorithm:

Say the editor viewport is 800x600 pixels (inside of surrounding toolbars/UI)

Take the shorter edge (600) to use for the percent calculations.

  • 100% width = 600
  • 50% width = 300

Take the mouse cursor position over the viewport (e.g., 400x400) and compute the two vertical and two horizontal points to draw the lines. Constrain these points to the edges of the viewport if they run over.

Draw the lines.

Add a setting to draw a + crosshair centered at the cursor, with configurable length as a percentage of the screen or so a maxed out length has the crosshair always reach the edges of the editor viewport. % of screen algorithm: Say the editor viewport is 800x600 pixels (inside of surrounding toolbars/UI) Take the shorter edge (600) to use for the percent calculations. * 100% width = 600 * 50% width = 300 Take the mouse cursor position over the viewport (e.g., 400x400) and compute the two vertical and two horizontal points to draw the lines. Constrain these points to the edges of the viewport if they run over. Draw the lines.
kirsle added the
enhancement
label 2021-10-05 04:29:28 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: SketchyMaze/doodle#53
No description provided.