casey / casey/pxl

Intelligent cropping

Open
#119 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
32
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Programs may wish that the runtime always display the entire pixel surface, regardless of the window aspect ratio. Alternately, they may wish that the runtime fill the window with content, even if the window isn't the same aspect ratio as the content.

I'm not sure exactly how to deal with this, but one idea is to allow programs to specify that part of the pixel surface must be displayed, whereas some of the pixel surface is margin/padding/whatever and may be cropped out.

The runtime will be able to fill more of the window if the game allows for a lot of padding.

It would also be nice if the game knew not to render pixels that wouldn't be displayed.

This pre-supposes that the runtime can letter-/pillbox content, which it doesn't currently.

Contributor guide

Open the contributing guide

Research direction

No files or tests are named. Start by tracing the runtime's window sizing, aspect-ratio handling, and pixel-surface rendering path. Define the behavior for full-surface display, content-filled cropping, letterboxing or pillarboxing, and avoiding rendering pixels that will not be displayed; done requires an agreed API and verified behavior across differing window ratios.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics, game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.