Skip to content

Conversation

@madsmtm
Copy link
Member

@madsmtm madsmtm commented Jun 5, 2025

Part of #237.

I've decided to return these in pixels corresponding to the surface/buffer itself, as that's what Softbuffer concerns itself with. If the user wants to render at the current screen DPI, they either need to multiply by a scaling factor themselves, or size the buffer using logical sizes and rely on the compositor to upscale it (which we don't yet expose knobs to control, but which we could in the future).

@madsmtm madsmtm added the enhancement New feature or request label Jun 5, 2025
@madsmtm madsmtm force-pushed the madsmtm/width-height branch from 6789eff to 344f8b7 Compare June 5, 2025 17:21
Copy link
Member

@MarijnS95 MarijnS95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The examples look so much better with this change, no more "hacks" based on a possibly-stale and/or desynced window size.

Approving at least the Android parts; these getters are just fields returned internally.

@madsmtm madsmtm merged commit a9bae73 into master Nov 23, 2025
38 checks passed
@madsmtm madsmtm deleted the madsmtm/width-height branch November 23, 2025 13:20
@MarijnS95 MarijnS95 changed the title Add Buffer::width and Buffer::height Add Buffer::width() and Buffer::height() getters Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

5 participants