flutter-pi icon indicating copy to clipboard operation
flutter-pi copied to clipboard

Force physical dimensions of the screen

Open baldax95 opened this issue 3 years ago • 3 comments

The screen that I'm using right now does provide its own physical dimensions and the flutter device pixel ratio changes accordingly to it: my pixel ratio is 1.367054

What I want is to give dimensions of 0, 0 -d "0, 0" To have a pixel ratio of 1.0, or otherwise even forcing the pixel ratio would be fine.

Anyway when I give the option for the dimensions the application still gets the dimensions from the GPU

Immagine 2022-03-22 174857 .

baldax95 avatar Mar 22 '22 16:03 baldax95

That's a reasonable request, though -d "0,0" will internally be interpreted as no explicit screen dimensions, automatically determine them from KMS.

Right now if you want a device pixel ratio of 1.0, you can calculate the necessary physical dimensions yourself. There are 38 logical pixels per cm, so you'd have to specify -d "211,126" to get a pixel ratio of 1.0, roughly

Though a --pixel-ratio arg would probably be better.

ardera avatar Mar 23 '22 16:03 ardera

As always you're my hero!

baldax95 avatar Mar 23 '22 16:03 baldax95

np 😄 though I'll reopen the issue and close it when I've implemented an explicit --pixel-ratio arg

ardera avatar Mar 23 '22 17:03 ardera