Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add custom size when capture invisible widget #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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