styling
Functions for style overrides of diagram elements.
BLUE_ACTOR_FNCS
module-attribute
🔗
BLUE_ACTOR_FNCS: dict[str, Styler] = {'node': parent_is_actor_fills_blue}
CSSStyle for coloring Actor Functions (Functions of Components with
the attribute is_actor
set to True
) with a blue gradient like in
Capella.
CSSStyles
module-attribute
🔗
CSSStyles = Union[StyleOverrides, None]
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
ModelElement
with a gradient.
See also
SYSTEM_CAP_STYLING
module-attribute
🔗
SYSTEM_CAP_STYLING: dict[str, Styler] = {'node': style_center_symbol}
CSSStyle for custom styling of SystemAnalysis diagrams. The center box is drawn with a white background and a grey dashed line.
Styler
module-attribute
🔗
Styler = Callable[[ModelElement, 'serializers.DiagramSerializer'], Union[StyleOverrides, None]]
Function that produces CSSStyles
for given obj.
parent_is_actor_fills_blue 🔗
parent_is_actor_fills_blue(obj: m.ModelElement, serializer: serializers.DiagramSerializer) -> CSSStyles
Return CSSStyles
for given obj
rendering it blue.
Source code in capellambse_context_diagrams/styling.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
|
style_center_symbol 🔗
style_center_symbol(obj: m.ModelElement, serializer: serializers.DiagramSerializer) -> CSSStyles
Return CSSStyles
for given obj
.
Source code in capellambse_context_diagrams/styling.py
53 54 55 56 57 58 59 60 61 62 63 |
|