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

Dotted lines for conditional jumps in graph #10814

Merged
merged 3 commits into from Jul 26, 2018
Merged

Conversation

@cyanpencil
Copy link
Contributor

@cyanpencil cyanpencil commented Jul 24, 2018

Closes #204

Added new config var: graph.dotted, default to False.

Fixed a bunch of bugs utf8 related in canvas too.

2018-07-24-192635_1066x784_scrot

@cyanpencil
Copy link
Contributor Author

@cyanpencil cyanpencil commented Jul 24, 2018

I've set it as [WIP] cause I want to know if the code can be refactored better... especially this: do I absolutely need to add the dotted boolean argument to every call of draw_horizontal_line and draw_vertical_line ? Is there a more elegant way of doing this?

@XVilka
Copy link
Contributor

@XVilka XVilka commented Jul 26, 2018

So far looks good. Regarding the dotted? checks - you might convert those lines in some macro instead.

@Maijin
Copy link
Contributor

@Maijin Maijin commented Jul 26, 2018

Why default to false?

@radare
Copy link
Collaborator

@radare radare commented Jul 26, 2018

@XVilka
Copy link
Contributor

@XVilka XVilka commented Jul 26, 2018

@radare who said it is used in all lines? It is only used for conditional jumps.

@Maijin
Copy link
Contributor

@Maijin Maijin commented Jul 26, 2018

Yeah it's only for conditional jumps not for everything that's why i don't see why it's disabled by default :S

@cyanpencil cyanpencil changed the title [WIP] Dotted lines for conditional jumps in graph Dotted lines for conditional jumps in graph Jul 26, 2018
@cyanpencil
Copy link
Contributor Author

@cyanpencil cyanpencil commented Jul 26, 2018

I initially set up this feature to default because I was not sure it looked good enough to by default

Now refactored to use macros to make code a bit cleaner, and set up default of graph.dotted to true.
(But you still have to set scr.utf8 to true). Is it ok for you @radare ?

@Maijin
Copy link
Contributor

@Maijin Maijin commented Jul 26, 2018

Can you do a screenshot of the new one maybe?

@cyanpencil
Copy link
Contributor Author

@cyanpencil cyanpencil commented Jul 26, 2018

Can you do a screenshot of the new one maybe?

I didn't change anything about the rendering, I only refactored code, the result is the same ass the screen I posted before.
The main thing is that "dot" effect changes from font to font; e.g. here's a screen in urxvt using font Dejavu sans mono:

image

@radare
Copy link
Collaborator

@radare radare commented Jul 26, 2018

@XVilka
Copy link
Contributor

@XVilka XVilka commented Jul 26, 2018

@Maijin
Copy link
Contributor

@Maijin Maijin commented Jul 26, 2018

As discussed, can you add dotted lines for lines that go backward or to symbolize loops too?

@Maijin
Copy link
Contributor

@Maijin Maijin commented Jul 26, 2018

with a different symbol

@cyanpencil cyanpencil force-pushed the cyanpencil:dotted-lines branch from 51310b3 to 4ab86fa Jul 26, 2018
@cyanpencil
Copy link
Contributor Author

@cyanpencil cyanpencil commented Jul 26, 2018

As discussed, can you add dotted lines for lines that go backward or to symbolize loops too?

Sure, will do :)

@XVilka XVilka merged commit 4ac4873 into radareorg:master Jul 26, 2018
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@radare
Copy link
Collaborator

@radare radare commented Jul 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants