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

Conversation

cyanpencil
Copy link
Contributor

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

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 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 commented Jul 26, 2018

Why default to false?

@radare
Copy link
Collaborator

radare commented Jul 26, 2018 via email

@XVilka
Copy link
Contributor

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 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

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 commented Jul 26, 2018

Can you do a screenshot of the new one maybe?

@cyanpencil
Copy link
Contributor Author

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 commented Jul 26, 2018 via email

@XVilka
Copy link
Contributor

XVilka commented Jul 26, 2018 via email

@Maijin
Copy link
Contributor

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 commented Jul 26, 2018

with a different symbol

@cyanpencil
Copy link
Contributor Author

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
@radare
Copy link
Collaborator

radare commented Jul 26, 2018 via email

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.

None yet

4 participants