Skip to content

[eve7] Fit the orthographic camera to the canvas - #24153

Open
osschar wants to merge 1 commit into
root-project:masterfrom
osschar:eve7-ortho-camera-fit
Open

osschar wants to merge 1 commit into
root-project:masterfrom
osschar:eve7-ortho-camera-fit

Conversation

@osschar

@osschar osschar commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Orthographic views came up stretched sideways by about 7% until a resize, because the camera was fitted to the whole view, toolbar included, instead of the canvas. The camera is now fitted to the canvas.

To be backported to 6.42.

Tested on master with event_demo.C, calorimeters.C and boxset.C in a headless browser. Without the fix, 8 of 10 event_demo projection views were first drawn stretched and corrected 30 ms to 1.1 s later. With the fix, all 20 projection views had their final shape from the first frame.

Orthographic views were stretched sideways until a resize, because the
camera was fitted to the whole view, toolbar included, instead of the
canvas.

Changes:
- Take the aspect ratio from the canvas.
- Use 1 for a canvas of zero size.

Assisted-by: Claude:Opus 5.5
@osschar
osschar requested a review from linev as a code owner November 14, 2026 08:15

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant