MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / EdgeStyle

Class EdgeStyle

python/flowgraph.py:63–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61
62
63class EdgeStyle:
64 def __init__(self, style: Optional[EdgePenStyle] = None, width: Optional[int] = None, theme_color: Optional[ThemeColor] = None):
65 self.style = style if style is not None else EdgePenStyle.SolidLine
66 self.width = width if width is not None else 0
67 self.color = theme_color if theme_color is not None else ThemeColor.AddressColor
68
69 def _to_core_struct(self) -> core.BNEdgeStyle:
70 result = core.BNEdgeStyle()
71 result.style = int(self.style)
72 result.width = self.width
73 result.color = self.color
74 return result
75
76 @staticmethod
77 def from_core_struct(edge_style):
78 return EdgeStyle(edge_style.style, edge_style.width, edge_style.color)
79
80 def __eq__(self, other):
81 return (self.style, self.width, self.color) == (other.style, other.width, other.color)
82
83 def __hash__(self):
84 return hash((self.style, self.width, self.color))
85
86
87class FlowGraphNode:

Callers 4

from_core_structMethod · 0.70
outgoing_edgesMethod · 0.70
incoming_edgesMethod · 0.70
add_outgoing_edgeMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected