def Draw(self, dc: DC, withChildren: bool = True): """ Called for the content drawing of links. Args: dc: Device context withChildren: draw the children or not """ self.updateLabels() OglLink.Draw(self, dc, withChildren)
def Draw(self, dc: DC, withChildren: bool = False): """ Called to draw the link content. We are going to draw all of our stuff, cardinality, Link name, etc. Args: dc: Device context withChildren: draw the children or not """ OglLink.Draw(self, dc, withChildren) sp: Tuple[int, int] = self._srcAnchor.GetPosition() dp: Tuple[int, int] = self._dstAnchor.GetPosition() oglSp: OglPosition = OglPosition(x=sp[0], y=sp[1]) oglDp: OglPosition = OglPosition(x=dp[0], y=dp[1]) self._drawSourceCardinality(dc=dc, sp=oglSp, dp=oglDp) self._drawCenterLabel(dc=dc, sp=oglSp, dp=oglDp) self._drawDestinationCardinality(dc=dc, sp=oglSp, dp=oglDp)