Пример #1
0
 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]
Пример #2
0
 def _as_graphviz_node(self):
     from abjad.tools import documentationtools
     node = Component._as_graphviz_node(self)
     node[0].append(
         documentationtools.GraphvizTableRow([
             documentationtools.GraphvizTableCell(
                 label=type(self).__name__,
                 attributes={'border': 0},
             ),
         ]))
     return node
Пример #3
0
 def _as_graphviz_node(self):
     from abjad.tools import documentationtools
     lilypond_format = self._compact_representation
     lilypond_format = lilypond_format.replace('<', '&lt;')
     lilypond_format = lilypond_format.replace('>', '&gt;')
     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
Пример #4
0
 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