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

how to change and set color for edge in python class GraphViewer ? #58

Open
zengfr opened this issue Dec 9, 2023 · 1 comment
Open

Comments

@zengfr
Copy link

zengfr commented Dec 9, 2023

how to change and set color for edge in python class GraphViewer ?

SetNodeInfo(self, node_index, node_info, flags) ?

p = ida_graph.node_info_t()
p.frame_color = self.random_hex_color()
p.bg_color = p.frame_color^0xffffff
self.SetNodeInfo(nid, p, ida_graph.NIF_FRAME_COLOR)

but edge is not node

@arizvisa
Copy link

I believe you should be using the ida_graph.mutable_graph_t class which has the mutable_graph_t.set_edge method. This takes an ida_graph.edge_info_t which lets you set the edge color. Once you have the graph, you'll need to attach the graph to a viewer using ida_graph.set_viewer_graph.

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

No branches or pull requests

2 participants