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

[Feature request] Get BoundingRect of node taking effects into consideration #72

Open
oisinlavery opened this issue Nov 18, 2020 · 2 comments

Comments

@oisinlavery
Copy link

The api gives us access to the absolute bounds of a node however when shadows, strokes and blurs are added to the node this isn't taken into account.

My request is to provide a function which computes this offset/bounding box.

@alexandrtovmach
Copy link
Member

@Andreslav Do you have any ideas?

@Andreslav
Copy link
Contributor

@Andreslav Do you have any ideas?

Well, there is a rough solution: https://app.slack.com/client/TJ0REL2N8/CHPTY6TFD/thread/CHPTY6TFD-1584040388.206500

There was an idea to get the image using exportAsync and somehow extract the width and height from the Uint8Array (without canvas), but it didn't work out for me.

Using the UI, you can find out the size like this: Menu -> Rasterize Selection -> View the size of the resulting image.

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

No branches or pull requests

3 participants