makers
BOX_TO_SYMBOL
module-attribute
🔗
BOX_TO_SYMBOL = (__name__, __name__, __name__, __name__, 'SystemHumanActor', 'SystemActor')
Types that need to be converted to symbols during serialization if
display_symbols_as_boxes
attribute is False
.
CENTRIC_LABEL_LAYOUT_OPTIONS
module-attribute
🔗
CENTRIC_LABEL_LAYOUT_OPTIONS: LayoutOptions = {'nodeLabels.placement': 'INSIDE, V_CENTER, H_CENTER'}
Layout options for a centric label.
DEFAULT_LABEL_LAYOUT_OPTIONS
module-attribute
🔗
DEFAULT_LABEL_LAYOUT_OPTIONS: LayoutOptions = {'nodeLabels.placement': 'INSIDE, V_TOP, H_CENTER'}
Default layout options for a label.
ICON_WIDTH
module-attribute
🔗
ICON_WIDTH = icon_size + icon_padding * 2
Default icon width from capellambse including the padding around it.
NEIGHBOR_VMARGIN
module-attribute
🔗
NEIGHBOR_VMARGIN = 20
Vertical space between two neighboring boxes.
SYMBOL_LAYOUT_OPTIONS
module-attribute
🔗
SYMBOL_LAYOUT_OPTIONS: LayoutOptions = {'nodeLabels.placement': 'OUTSIDE, V_BOTTOM, H_CENTER'}
Layout options for a symbol label.
SYMBOL_RATIO
module-attribute
🔗
SYMBOL_RATIO = MIN_SYMBOL_WIDTH / MIN_SYMBOL_HEIGHT
Width and height ratio of symbols.
calculate_height_and_width 🔗
calculate_height_and_width(labels: list[_elkjs.ELKInputLabel], *, width: int | float = 0, height: int | float = 0, slim_width: bool = False) -> tuple[int | float, int | float]
Calculate the size (width and height) from given labels for a box.
Source code in capellambse_context_diagrams/collectors/makers.py
187 188 189 190 191 192 193 194 195 196 197 198 199 |
|
is_symbol 🔗
is_symbol(obj: str | m.ModelElement | None) -> bool
Check if given obj
is rendered as a Symbol instead of a Box.
Source code in capellambse_context_diagrams/collectors/makers.py
202 203 204 205 206 207 208 |
|
make_box 🔗
make_box(obj: m.ModelElement, *, width: int | float = 0, height: int | float = 0, no_symbol: bool = False, slim_width: bool = True, label_getter: cabc.Callable[[m.ModelElement], cabc.Iterable[_LabelBuilder]] = lambda i: [{'text': i.name, 'icon': (ICON_WIDTH, 0), 'layout_options': {}}], max_label_width: int | float = MAX_BOX_WIDTH, layout_options: _elkjs.LayoutOptions | None = None) -> _elkjs.ELKInputChild
Return an
ELKInputChild
.
Source code in capellambse_context_diagrams/collectors/makers.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
|
make_diagram 🔗
make_diagram(diagram: context.ContextDiagram) -> _elkjs.ELKInputData
Return basic skeleton for ContextDiagram
s.
Source code in capellambse_context_diagrams/collectors/makers.py
77 78 79 80 81 82 83 84 |
|
make_label 🔗
make_label(text: str, icon: tuple[int | float, int | float] = (ICON_WIDTH, ICON_HEIGHT), layout_options: _elkjs.LayoutOptions | None = None, max_width: int | float | None = None) -> list[_elkjs.ELKInputLabel]
Return an
ELKInputLabel
.
Source code in capellambse_context_diagrams/collectors/makers.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
|
make_port 🔗
make_port(uuid: str) -> _elkjs.ELKInputPort
Return an
ELKInputPort
.
Source code in capellambse_context_diagrams/collectors/makers.py
211 212 213 214 215 216 217 218 219 220 |
|