def _create_graphviz_table_cell(label, with_rule=False, **kwargs): attributes = {'border': 0} attributes.update(**kwargs) cell = documentationtools.GraphvizTableCell(label=label, attributes=attributes) row = documentationtools.GraphvizTableRow(children=[cell]) if with_rule: rule = documentationtools.GraphvizTableHorizontalRule() return [rule, row] return [row]
def _as_graphviz_node(self): from abjad.tools import documentationtools lilypond_format = self._compact_representation lilypond_format = lilypond_format.replace('<', '<') lilypond_format = lilypond_format.replace('>', '>') node = Component._as_graphviz_node(self) node[0].extend([ documentationtools.GraphvizTableRow([ documentationtools.GraphvizTableCell( label=type(self).__name__, attributes={'border': 0}, ), ]), documentationtools.GraphvizTableHorizontalRule(), documentationtools.GraphvizTableRow([ documentationtools.GraphvizTableCell( label=lilypond_format, attributes={'border': 0}, ), ]), ]) return node
def _as_graphviz_node(self): from abjad.tools import documentationtools from abjad.tools import scoretools node = scoretools.Component._as_graphviz_node(self) fraction = mathtools.NonreducedFraction( self.time_signature.numerator, self.time_signature.denominator, ) node[0].extend([ documentationtools.GraphvizTableRow([ documentationtools.GraphvizTableCell( label=type(self).__name__, attributes={'border': 0}, ), ]), documentationtools.GraphvizTableHorizontalRule(), documentationtools.GraphvizTableRow([ documentationtools.GraphvizTableCell( label=str(fraction), attributes={'border': 0}, ), ]), ]) return node