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

SVG logging #30

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

wjcarpenter
Copy link

I wanted to make some screenshots of some things I was doing with this graphics package,
so I implemented a way to get SVG output. If you find it interesting, feel free to add it
to the library (or any similar driver libraries you have).

SVG logging sends equivalent SVG directives to the ESP log (usually uart0).
It logs at the logging level and with the logging tag specified. That
should make it straightforward to use text tools to carve the actual SVG
out of the log. There is an optional "cut line" argument to the lcdSvgLoggingEnd.
If provided, it is logged as-is and could be used to automatically separate
multiple chunks from the overall output.

There is no inherent overall background color. If you want one, you
should start with lcdFillScreen() within the SVG logging.

SVG output can be quite verbose (especially for things like text that are
drawn a pixel at a time). It also slows things down a huge amount. In fact,
it makes things so slow that there are task delays of 1 tick sprinkled
throughout to avoid tripping the task watchdog timer.

@wjcarpenter wjcarpenter mentioned this pull request May 5, 2022
@nopnop2002
Copy link
Owner

Thank you for your PR.

I don't know anything about SVG, so it will take some time to understand this.

@wjcarpenter
Copy link
Author

In issue #31, I attached a ZIP of the SVGs for the library's sample app so you can get an idea of what the output looks like. You can also see some examples of my screens here: https://hackaday.io/project/184926-blexmang/log/205726-user-interface-elements (Because I am using a TTGO T-Display in landscape mode, and because that web site doesn't accept graphics as SVGs, I used some common tools to convert them to PNG and rotate them. But they are otherwise identical to the SVGs.)

@nopnop2002
Copy link
Owner

Thank you.

I don't understand SVG yet

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.

2 participants