M11.3: View → Snap to Pixel (drawing points and moved selections land on whole pixels)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-02 08:16:36 -04:00
co-authored by Claude Opus 5.5
parent 16a73dc02a
commit 8e735f1de9
7 changed files with 60 additions and 4 deletions
+4 -1
View File
@@ -14,11 +14,13 @@ pub struct ViewInfo {
pub smart_guides: bool,
pub snap_to_grid: bool,
pub show_bbox: bool,
/// View → Snap to Pixel: drawing and moving land on whole pixels (points at 72 ppi).
pub snap_to_pixel: bool,
}
impl Default for ViewInfo {
fn default() -> Self {
Self { zoom: 1.0, outline: false, smart_guides: true, snap_to_grid: false, show_bbox: true }
Self { zoom: 1.0, outline: false, smart_guides: true, snap_to_grid: false, show_bbox: true, snap_to_pixel: false }
}
}
@@ -60,6 +62,7 @@ impl Session {
smart_guides: view.smart_guides,
snap_to_grid: view.snap_to_grid,
show_bbox: view.show_bbox,
snap_to_pixel: view.snap_to_pixel,
};
f(self.tool.as_mut(), &cx)
}