Skip to content

add custom size when capture invisible widget#77

Open
ankiimation wants to merge 1 commit intoSachinGanesh:masterfrom
ankiimation:custom-root-widget-size
Open

add custom size when capture invisible widget#77
ankiimation wants to merge 1 commit intoSachinGanesh:masterfrom
ankiimation:custom-root-widget-size

Conversation

@ankiimation
Copy link

@ankiimation ankiimation commented Sep 20, 2021

add custom size when capture invisible widget

final Size rootSize = customSize ?? ui.window.physicalSize;
    Size logicalSize = rootSize / ui.window.devicePixelRatio;
    Size imageSize = rootSize;

Size logicalSize = ui.window.physicalSize / ui.window.devicePixelRatio;
Size imageSize = ui.window.physicalSize;
final Size rootSize = customSize ?? ui.window.physicalSize;
Size logicalSize = rootSize / ui.window.devicePixelRatio;
Copy link

@aaronreulkhoo aaronreulkhoo Sep 30, 2021

Choose a reason for hiding this comment

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

for the use case of generating a consistent image of some document across phones, the logical size should be set to the customSize - have confirmed this through testing, otherwise only the generated bitmap size is consistent.

@kekko7072
Copy link

@aaronreulkhoo Any update?

@hyungtaecf
Copy link

Any update?

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.

4 participants