forked from 1b-agent/opencadstudio-upstream
feat: A4 landscape default paper, white paper area on dark desk
- paper_limits() falls back to A4 landscape (297×210mm) even when no Layout object exists in the document - paper_bg_color default changed to white [1,1,1,1] (paper surface color) - PaperCanvas::draw() fills canvas with dark desk color first, then draws the paper area rectangle in paper_bg_color so the sheet is clearly visible against the desk background - view.rs container background uses the fixed desk color instead of paper_bg_color so it no longer conflicts with the paper-surface color - BACKGROUND RESET for paper space now resets to white instead of dark gray - Removed unused PaperSheet variant, paper_sheet() constructor, build_paper_sheet_primitive() and associated match arms (dead code after 2D canvas replacement) Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
1 parent
fcc29de469
commit
0a291c877b
6 files changed
+23
-56
No files matched your search
@@ -246,39 +246,6 @@ impl Scene {
|
||||
}
|
||||
}
|
||||
|
||||
/// Build a Primitive for the full paper canvas: paper-space entities
|
||||
/// (title blocks, frames, borders) plus model-space content projected
|
||||
/// through each viewport's view matrix into paper-space coordinates.
|
||||
pub(super) fn build_paper_sheet_primitive(
|
||||
&self,
|
||||
hover_region: Option<usize>,
|
||||
bounds: Rectangle,
|
||||
) -> Primitive {
|
||||
let cam = self.camera.borrow();
|
||||
self.selection.borrow_mut().vp_size = (bounds.width, bounds.height);
|
||||
|
||||
let layout_block = self.current_layout_block_handle();
|
||||
let mut wires = self.paper_sheet_wires();
|
||||
// When MSPACE is active, exclude that viewport from the CPU projection —
|
||||
// it is rendered in 3D by the separate PaperViewportPane widget.
|
||||
wires.extend(self.viewport_content_wires(layout_block, None, self.active_viewport));
|
||||
if let Some(iw) = &self.interim_wire {
|
||||
wires.push(iw.clone());
|
||||
}
|
||||
wires.extend(self.preview_wires.iter().cloned());
|
||||
|
||||
Primitive {
|
||||
wires,
|
||||
hatches: self.synced_hatch_models(),
|
||||
wipeout_hatches: self.wipeout_models(),
|
||||
images: self.images.values().cloned().collect(),
|
||||
meshes: self.meshes.values().cloned().collect(),
|
||||
uniforms: Uniforms::new(&cam, bounds),
|
||||
cam_rotation: cam.view_rotation_mat(),
|
||||
hover_region,
|
||||
bg_color: self.paper_bg_color,
|
||||
}
|
||||
}
|
||||
|
||||
/// Build a Primitive that renders model-space content through a specific
|
||||
/// paper-space viewport's camera, applying its layer-freeze list.
|
||||
|
||||
Reference in new issue
Block a user