-
Notifications
You must be signed in to change notification settings - Fork 7
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
Remove Whitespace for "Export View as PNG" #81
Comments
hi @phschaad can I pick this up? |
@ojninja16 Sure! More than welcome to :-) |
hi @phschaad , can you elaborate on the exact issue here Ig there is no longer an export view as PNG instead we have a save view as PNG ... Thanks |
That is the button / functionality this issue refers to |
Hi @phschaad,In the current approach, we are directly using the canvas and then calling toDataURL to generate the images. If I understand correctly, we need to ensure that any unnecessary whitespace is removed from the generated image. To achieve this, we would need to go through each SDFG element on the canvas if any, determine its bounding box values, and use those to calculate the appropriate x, y, width, and height for cropping. Then, we can generate a properly cropped image.? |
Hi @ojninja16 - this sounds exactly right, I don't think there's a convenient alternative solution at the moment. Your understanding of how it's currently being done is correct. |
Export View as PNG
currently includes any whitespace in view. While this is included as transparency, it is desirable to have the resulting export cropped to any actual SDFG Elements (States) that are in view.The text was updated successfully, but these errors were encountered: