-
Notifications
You must be signed in to change notification settings - Fork 19
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
Use rmscene 0.5.0, ensure strocks are inside the svg and minor adjustments #19
Conversation
- use SceneTree API instead of blocks iterator - use text.TextDocument instead of scene_items.Text
- use SceneTree API instead of blocks iterator
- use SceneTree API instead of blocks iterator - use proper logger - mimic rm tree structure in the svg - add anchor position dictionary
- use text.TextDocument instead of scene_items.Text
Change viewBox min values to the minimum x/y coordinates of the strokes
- extract and rename cutoff into a function - fix typos
Fix size issue and scale to 72 dpi
Also blurring the lines doesn't make the image look better/closer to the remarkable one and make the image really laggy.
Thanks for this. Generally looks all good. I'll have to come back on a computer to merge / check conflicts but will try to do that soon. I'm curious about your changes to the special anchor position y coords. I'm not sure, but I thought these represented the top and bottom edges of the document, so a drawing at the bottom of the page would stay there even if more lines of text were added. Did you find something different? |
Thank you :) ! I tried to commit in an easy-to-understand way and keep a linear git history but it's not perfect, so don't hesitate
I find it curious too, an anchor for the end of the page makes a lot of sense. But, when trying to debug the
Looking at it again now, it seems that 270 for Test setup:
On a side note, I wanted to have a deeper look at the anchor and alignment issues when trying to align the background templates but did not have time yet. |
Thanks @Seb-sti1, this is now merged and I added you to the list of contributors |
This is largely based on #5 to use the scene tree API. I then used the changelog of rmscene to upgrade to 0.5.0. I finally modify a bit the SVG exporter to ensure the strokes were inside the SVG and fix the anchor issues I stumble upon.
It is the branch used by Seb-sti1/rmtree, and it exports all my files properly (decently aligned to the background PDF, not that much with the background template).
Regarding the rmscene 0.6.0, the main modification needed would probably be done by #18.
Let me know if anything is unclear.