-
Notifications
You must be signed in to change notification settings - Fork 415
Adding contrast to flyline delay text so it's readable now #1451
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
Conversation
I think the offset by 2 unit (world coordinates) is going to be problematic for circuits of different sizes and for different zoom levels. If you look in the ezgl code you'll see how the text extents (in pixels are computed) and/or how to convert from world to screen coordinates. You should work out how far you need to shift the text to be away from the flyline. Looking at the routines that do text justification should show you how; you may be able to just choose an appropriate text justification to make this happen (i.e. leverage the existing computations). Then you'll have to test the various zoom levels, flyline orientations, circuit sizes etc. to make sure it draws nicely under various scenarios. |
@dpbaines: any thoughts? |
I agree completely, I've also experimented with changing text weight, and drawing a bold white text underneath the thin black text to give it a border, however this doesn't work in practice. I'll give your suggestions a go and let you know! |
I've updated the code so it now rotates the text and draws it parallel to the flyline. I also changed it to use screen coordinates instead of world coordinates as you suggested, however I wasn't able to get information on the text extents, as the variables I need are all private in ezgl. I've taken screen shots of the results of various circuits at different zoom levels, let me know if you'd like me to try some larger circuits! See the results here: |
Thanks, both the pictures and the code look good. There are two CI failures, but they both seem to be related to llvm / clang not being properly fetched and installed. Maybe their web server was down? Can you try relaunching the CI tests to see if they pass now? |
Yeah for sure, I think the strong sanitized test failure is related to this issue: #1459 |
Yes, the strong sanitized test failure is unrelated. |
Yeah it is strange, I have rerun it intermittently, and the odd thing is it seems to be failing on different jobs each time which is strange. I'm rerunning it again tonight, and I'll see what the result is. |
Thanks. Maybe the symbiflow people can help if we have intermittent CI failures due to some download issues. But first we need to figure out if it's truly intermittent. |
Yep it's passing now, I don't know if it's resolved but it's passed this time for me. Just for testing purposes I can rerun travis to see if it passes again? I'm not sure if its just this PR. |
Description
Change the colour of the flyline delay text to black. I also gave it a very small offset so that it does get seperated from the line it's printed over if zoomed in, but is still clearly related to said path. Ideally one would also draw a white box behind the text so it's clear, but ezgl doesn't make this very ez.
Related Issue
Motivation and Context
A visual example of the issue below.
https://imgur.com/Zu5VrQd
How Has This Been Tested?
I tested it on a random circuit and architecture and verified that it only effects flyline text, in the intended manner.
Types of changes
Checklist: