New GRID in views to perrorm MousePointer snap to GRID

For this new MousePointer to snap to grid, a Grid specific for each view is necessary. Grid for moving is orthographic (with an aspect ratio), and grid for mixing or rotation is in polar coordinates. Rendering is done with new Primitives. The entire calculation of grab coordinates is changed to be able to snap to grid coordinates in all circumstances.
This commit is contained in:
Bruno Herbelin
2023-08-27 12:15:31 +02:00
parent d0e1101bfb
commit 7fcb53c7d0
29 changed files with 1517 additions and 579 deletions

View File

@@ -271,6 +271,7 @@ struct Application
int accent_color;
bool save_version_snapshot;
bool smooth_transition;
bool proportional_grid;
int mouse_pointer;
std::vector<float> mouse_pointer_strength;
bool action_history_follow_view;
@@ -337,6 +338,7 @@ struct Application
accent_color = 0;
smooth_transition = false;
save_version_snapshot = false;
proportional_grid = true;
mouse_pointer = 0;
mouse_pointer_strength = {0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f};
action_history_follow_view = false;