styling
Functions for style overrides of diagram elements.
BLUE_ACTOR_FNCS: dict[str, Styler] = {'node': parent_is_actor_fills_blue}
module-attribute
🔗
CSSStyle for coloring Actor Functions (Functions of Components with
the attribute is_actor
set to True
) with a blue gradient like in
Capella.
CSSStyles = t.Union[diagram.StyleOverrides, None]
module-attribute
🔗
A dictionary with CSS styles. The keys are the attribute names and the
values can be of the types str
, aird.RGB
and even
t.Sequence[aird.RGB]
for coloring a
common.GenericElement
with a gradient.
See also🔗
SYSTEM_CAP_STYLING: dict[str, Styler] = {'node': style_center_symbol}
module-attribute
🔗
CSSStyle for custom styling of SystemAnalysis diagrams. The center box is drawn with a white background and a grey dashed line.
Styler = t.Callable[[common.GenericElement, 'serializers.DiagramSerializer'], t.Union[diagram.StyleOverrides, None]]
module-attribute
🔗
Function that produces CSSStyles
for given obj.
parent_is_actor_fills_blue(obj, serializer)
🔗
Return CSSStyles
for given obj
rendering it blue.
Source code in capellambse_context_diagrams/styling.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|
style_center_symbol(obj, serializer)
🔗
Return CSSStyles
for given obj
.
Source code in capellambse_context_diagrams/styling.py
54 55 56 57 58 59 60 61 62 63 64 |
|