forked from 1b-agent/opencadstudio-upstream
Cargo: codec aad7053, kernel 1a52eaf, graph 263de59; honour viewport clipping
Brings codec PRs #84 (cross-version visual styles, table styles, subentity managers), #88 (viewport clipping flag, DXF boundary handle), #89 (DXF viewport snap/twist in degrees) and #92 (field format codes, event updates). With #88 a viewport keeps a stored boundary whether or not clipping is on, so a linked boundary alone no longer means "clipped": rendering, paper picking, VPCLIP and the Clipped property check the clipping flag too, and VPCLIP / MVIEW Object and Polygon set it. Before, OCS never set the flag, so its clipped viewports opened rectangular elsewhere. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2dfa9f3f2a
commit
81bb8d48cf
12 files changed
+32
-19
No files matched your search
+2
-1
@@ -189,7 +189,7 @@ impl Scene {
|
||||
if (paper.x - vp.center.x).abs() > hw || (paper.y - vp.center.y).abs() > hh {
|
||||
return false;
|
||||
}
|
||||
if vp.clip_boundary_handle.is_null() {
|
||||
if !crate::entities::viewport::is_clipped(vp) {
|
||||
return true;
|
||||
}
|
||||
let Some(boundary) = self.document.get_entity(vp.clip_boundary_handle)
|
||||
@@ -321,6 +321,7 @@ mod clip_tests {
|
||||
viewport.width = 20.0;
|
||||
viewport.height = 20.0;
|
||||
viewport.clip_boundary_handle = clip;
|
||||
viewport.status.non_rectangular_clipping = true;
|
||||
let viewport = scene.add_entity(EntityType::Viewport(viewport));
|
||||
for (x, y, inside) in [
|
||||
(2.0, 2.0, true), (8.0, 2.0, true), (8.0, 8.0, false),
|
||||
|
||||
Reference in new issue
Block a user