cottax.consumers.visualization.interface module¶
What drawing asks. Of a node class: how a condition node is drawn (NodeDrawing) [answer]. Of a place class: how a place is written (PlaceDrawing) [answer]. Of a purpose: how a name derived for it is written (MintDrawing) [answer]. Of a study: how a name is written (Formatter) [choice].
- class NodeDrawing[source]¶
Bases:
AnswerHow a condition node is drawn.
- about¶
alias of
ConditionalNode
- class PlaceDrawing[source]¶
Bases:
AnswerHow a place is written in a drawing, and a node name of its kind.
- about: AbstractClassVar[Any] = (<class 'cottax.core.maths.places.Place'>, Label)¶
a class, a type alias of one, a protocol, or a tuple of those. @answers refuses a class that is none; a protocol is met by shape, which a class cannot be asked.
- Type:
What the interface is answered per, bound by the interface
- abstractmethod spell_plain(place: Label)[source]¶
A name written plainly: a key within one picture, its identity there whatever it shows. A picture refuses two places, or two node names, sharing one (refusals.SpelledAlike).
- Return type:
str
- abstractmethod spelling(place: Label)[source]¶
A name as its own kind writes it in full, in a one-line summary or a refusal.
- Return type:
str
- class MintDrawing[source]¶
Bases:
AnswerHow a name derived for a purpose is written over what it stands for: plain in plain text, latex in LaTeX. A purpose nobody answers for is written by its spelling, copy(·).
- plain: AbstractVar[Notation]¶
abstract to ABC until a subclass binds the name, and absent on a class that declares it as a field.
- Type:
What the level binds in place of the annotation
- latex: AbstractVar[Notation]¶
abstract to ABC until a subclass binds the name, and absent on a class that declares it as a field.
- Type:
What the level binds in place of the annotation
- class Formatter[source]¶
Bases:
ChoiceHow a drawing writes a name. spell(path) is the name of a place in the formatter’s own source, set(source) that source as what a drawing sets (MARKUP runs), label(text) a text naming no place written in its own source (a boundary box), and text(text) one written in each (a slot’s, Text), set from its own. A minted name is written by shown: outright(path) says the formatter names it itself, and otherwise notation(m) is how its purpose is written over what it stands for: its MintDrawing, unless the formatter overrides it. Named by a drawing’s formatter=.
Handed in as:
render_xdsm_svg(graph, formatter=PlainFormat(notation={Copy: Around(‘{}′’)})) where the argument is a Formatter: names as words, a cut’s copy primed.