Render options¶
See the official C4-PlantUML Layout Options documentation for additional information.
c4.renderers.plantuml.options.PlantUMLRenderOptionsBuilder ¶
Builder class for constructing PlantUMLRenderOptions.
Provides a fluent API for incrementally defining styles and layout configuration.
add_element_tag ¶
add_element_tag(
tag_stereo: str | None = None,
bg_color: str | None = None,
font_color: str | None = None,
border_color: str | None = None,
shadowing: bool | None = None,
shape: TagShape | None = None,
sprite: str | None = None,
technology: str | None = None,
legend_text: str | None = None,
legend_sprite: str | None = None,
border_style: LineStyle | None = None,
border_thickness: str | None = None,
) -> Self
Adds an AddElementTag() macro configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_stereo
|
str | None
|
The tag stereotype name. |
None
|
bg_color
|
str | None
|
Background color. |
None
|
font_color
|
str | None
|
Font color. |
None
|
border_color
|
str | None
|
Border color. |
None
|
shadowing
|
bool | None
|
Shadow effect setting. |
None
|
shape
|
TagShape | None
|
Optional shape modifier. |
None
|
sprite
|
str | None
|
Optional sprite reference. |
None
|
technology
|
str | None
|
Technology metadata. |
None
|
legend_text
|
str | None
|
Legend label. |
None
|
legend_sprite
|
str | None
|
Legend sprite. |
None
|
border_style
|
LineStyle | None
|
Border style. |
None
|
border_thickness
|
str | None
|
Border thickness. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
add_boundary_tag ¶
add_boundary_tag(
tag_stereo: str | None = None,
bg_color: str | None = None,
font_color: str | None = None,
border_color: str | None = None,
shadowing: bool | None = None,
shape: TagShape | None = None,
sprite: str | None = None,
technology: str | None = None,
legend_text: str | None = None,
legend_sprite: str | None = None,
border_style: LineStyle | None = None,
border_thickness: str | None = None,
) -> Self
Adds an AddBoundaryTag() macro configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_stereo
|
str | None
|
The tag stereotype name. |
None
|
bg_color
|
str | None
|
Background color. |
None
|
font_color
|
str | None
|
Font color. |
None
|
border_color
|
str | None
|
Border color. |
None
|
shadowing
|
bool | None
|
Shadow effect setting. |
None
|
shape
|
TagShape | None
|
Optional shape modifier. |
None
|
sprite
|
str | None
|
Optional sprite reference. |
None
|
technology
|
str | None
|
Technology metadata. |
None
|
legend_text
|
str | None
|
Legend label. |
None
|
legend_sprite
|
str | None
|
Legend sprite. |
None
|
border_style
|
LineStyle | None
|
Border style. |
None
|
border_thickness
|
str | None
|
Border thickness. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
add_rel_tag ¶
add_rel_tag(
tag_stereo: str | None = None,
text_color: str | None = None,
line_color: str | None = None,
sprite: str | None = None,
technology: str | None = None,
legend_text: str | None = None,
legend_sprite: str | None = None,
line_style: LineStyle | None = None,
line_thickness: str | None = None,
) -> Self
Adds an AddRelTag() macro configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_stereo
|
str | None
|
The tag stereotype name. |
None
|
text_color
|
str | None
|
Text color. |
None
|
line_color
|
str | None
|
Line color. |
None
|
sprite
|
str | None
|
Optional sprite reference. |
None
|
technology
|
str | None
|
Technology metadata. |
None
|
legend_text
|
str | None
|
Legend label. |
None
|
legend_sprite
|
str | None
|
Legend sprite. |
None
|
line_style
|
LineStyle | None
|
Line style. |
None
|
line_thickness
|
str | None
|
Line thickness. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
add_component_tag ¶
add_component_tag(
tag_stereo: str | None = None,
bg_color: str | None = None,
font_color: str | None = None,
border_color: str | None = None,
shadowing: bool | None = None,
shape: TagShape | None = None,
sprite: str | None = None,
technology: str | None = None,
legend_text: str | None = None,
legend_sprite: str | None = None,
border_style: LineStyle | None = None,
border_thickness: str | None = None,
) -> Self
Adds an AddComponentTag() macro configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_stereo
|
str | None
|
The tag stereotype name. |
None
|
bg_color
|
str | None
|
Background color. |
None
|
font_color
|
str | None
|
Font color. |
None
|
border_color
|
str | None
|
Border color. |
None
|
shadowing
|
bool | None
|
Shadow effect setting. |
None
|
shape
|
TagShape | None
|
Optional shape modifier. |
None
|
sprite
|
str | None
|
Optional sprite reference. |
None
|
technology
|
str | None
|
Technology metadata. |
None
|
legend_text
|
str | None
|
Legend label. |
None
|
legend_sprite
|
str | None
|
Legend sprite. |
None
|
border_style
|
LineStyle | None
|
Border style. |
None
|
border_thickness
|
str | None
|
Border thickness. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
add_external_component_tag ¶
add_external_component_tag(
tag_stereo: str | None = None,
bg_color: str | None = None,
font_color: str | None = None,
border_color: str | None = None,
shadowing: bool | None = None,
shape: TagShape | None = None,
sprite: str | None = None,
technology: str | None = None,
legend_text: str | None = None,
legend_sprite: str | None = None,
border_style: LineStyle | None = None,
border_thickness: str | None = None,
) -> Self
Adds an AddExternalComponentTag() macro configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_stereo
|
str | None
|
The tag stereotype name. |
None
|
bg_color
|
str | None
|
Background color. |
None
|
font_color
|
str | None
|
Font color. |
None
|
border_color
|
str | None
|
Border color. |
None
|
shadowing
|
bool | None
|
Shadow effect setting. |
None
|
shape
|
TagShape | None
|
Optional shape modifier. |
None
|
sprite
|
str | None
|
Optional sprite reference. |
None
|
technology
|
str | None
|
Technology metadata. |
None
|
legend_text
|
str | None
|
Legend label. |
None
|
legend_sprite
|
str | None
|
Legend sprite. |
None
|
border_style
|
LineStyle | None
|
Border style. |
None
|
border_thickness
|
str | None
|
Border thickness. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
add_container_tag ¶
add_container_tag(
tag_stereo: str | None = None,
bg_color: str | None = None,
font_color: str | None = None,
border_color: str | None = None,
shadowing: bool | None = None,
shape: TagShape | None = None,
sprite: str | None = None,
technology: str | None = None,
legend_text: str | None = None,
legend_sprite: str | None = None,
border_style: LineStyle | None = None,
border_thickness: str | None = None,
) -> Self
Adds an AddContainerTag() macro configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_stereo
|
str | None
|
The tag stereotype name. |
None
|
bg_color
|
str | None
|
Background color. |
None
|
font_color
|
str | None
|
Font color. |
None
|
border_color
|
str | None
|
Border color. |
None
|
shadowing
|
bool | None
|
Shadow effect setting. |
None
|
shape
|
TagShape | None
|
Optional shape modifier. |
None
|
sprite
|
str | None
|
Optional sprite reference. |
None
|
technology
|
str | None
|
Technology metadata. |
None
|
legend_text
|
str | None
|
Legend label. |
None
|
legend_sprite
|
str | None
|
Legend sprite. |
None
|
border_style
|
LineStyle | None
|
Border style. |
None
|
border_thickness
|
str | None
|
Border thickness. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
add_external_container_tag ¶
add_external_container_tag(
tag_stereo: str | None = None,
bg_color: str | None = None,
font_color: str | None = None,
border_color: str | None = None,
shadowing: bool | None = None,
shape: TagShape | None = None,
sprite: str | None = None,
technology: str | None = None,
legend_text: str | None = None,
legend_sprite: str | None = None,
border_style: LineStyle | None = None,
border_thickness: str | None = None,
) -> Self
Adds an AddExternalContainerTag() macro configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_stereo
|
str | None
|
The tag stereotype name. |
None
|
bg_color
|
str | None
|
Background color. |
None
|
font_color
|
str | None
|
Font color. |
None
|
border_color
|
str | None
|
Border color. |
None
|
shadowing
|
bool | None
|
Shadow effect setting. |
None
|
shape
|
TagShape | None
|
Optional shape modifier. |
None
|
sprite
|
str | None
|
Optional sprite reference. |
None
|
technology
|
str | None
|
Technology metadata. |
None
|
legend_text
|
str | None
|
Legend label. |
None
|
legend_sprite
|
str | None
|
Legend sprite. |
None
|
border_style
|
LineStyle | None
|
Border style. |
None
|
border_thickness
|
str | None
|
Border thickness. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
add_node_tag ¶
add_node_tag(
tag_stereo: str | None = None,
bg_color: str | None = None,
font_color: str | None = None,
border_color: str | None = None,
shadowing: bool | None = None,
shape: TagShape | None = None,
sprite: str | None = None,
technology: str | None = None,
legend_text: str | None = None,
legend_sprite: str | None = None,
border_style: LineStyle | None = None,
border_thickness: str | None = None,
) -> Self
Adds an AddNodeTag() macro configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_stereo
|
str | None
|
The tag stereotype name. |
None
|
bg_color
|
str | None
|
Background color. |
None
|
font_color
|
str | None
|
Font color. |
None
|
border_color
|
str | None
|
Border color. |
None
|
shadowing
|
bool | None
|
Shadow effect setting. |
None
|
shape
|
TagShape | None
|
Optional shape modifier. |
None
|
sprite
|
str | None
|
Optional sprite reference. |
None
|
technology
|
str | None
|
Technology metadata. |
None
|
legend_text
|
str | None
|
Legend label. |
None
|
legend_sprite
|
str | None
|
Legend sprite. |
None
|
border_style
|
LineStyle | None
|
Border style. |
None
|
border_thickness
|
str | None
|
Border thickness. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
add_person_tag ¶
add_person_tag(
tag_stereo: str | None = None,
bg_color: str | None = None,
font_color: str | None = None,
border_color: str | None = None,
shadowing: bool | None = None,
shape: TagShape | None = None,
sprite: str | None = None,
type_: str | None = None,
legend_text: str | None = None,
legend_sprite: str | None = None,
border_style: LineStyle | None = None,
border_thickness: str | None = None,
) -> Self
Adds an AddPersonTag() macro configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_stereo
|
str | None
|
The tag stereotype name. |
None
|
bg_color
|
str | None
|
Background color. |
None
|
font_color
|
str | None
|
Font color. |
None
|
border_color
|
str | None
|
Border color. |
None
|
shadowing
|
bool | None
|
Shadow effect setting. |
None
|
shape
|
TagShape | None
|
Optional shape modifier. |
None
|
sprite
|
str | None
|
Optional sprite reference. |
None
|
type_
|
str | None
|
Person type. |
None
|
legend_text
|
str | None
|
Legend label. |
None
|
legend_sprite
|
str | None
|
Legend sprite. |
None
|
border_style
|
LineStyle | None
|
Border style. |
None
|
border_thickness
|
str | None
|
Border thickness. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
add_external_person_tag ¶
add_external_person_tag(
tag_stereo: str | None = None,
bg_color: str | None = None,
font_color: str | None = None,
border_color: str | None = None,
shadowing: bool | None = None,
shape: TagShape | None = None,
sprite: str | None = None,
type_: str | None = None,
legend_text: str | None = None,
legend_sprite: str | None = None,
border_style: LineStyle | None = None,
border_thickness: str | None = None,
) -> Self
Adds an AddExternalPersonTag() macro configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_stereo
|
str | None
|
The tag stereotype name. |
None
|
bg_color
|
str | None
|
Background color. |
None
|
font_color
|
str | None
|
Font color. |
None
|
border_color
|
str | None
|
Border color. |
None
|
shadowing
|
bool | None
|
Shadow effect setting. |
None
|
shape
|
TagShape | None
|
Optional shape modifier. |
None
|
sprite
|
str | None
|
Optional sprite reference. |
None
|
type_
|
str | None
|
Person type. |
None
|
legend_text
|
str | None
|
Legend label. |
None
|
legend_sprite
|
str | None
|
Legend sprite. |
None
|
border_style
|
LineStyle | None
|
Border style. |
None
|
border_thickness
|
str | None
|
Border thickness. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
add_system_tag ¶
add_system_tag(
tag_stereo: str | None = None,
bg_color: str | None = None,
font_color: str | None = None,
border_color: str | None = None,
shadowing: bool | None = None,
shape: TagShape | None = None,
sprite: str | None = None,
type_: str | None = None,
legend_text: str | None = None,
legend_sprite: str | None = None,
border_style: LineStyle | None = None,
border_thickness: str | None = None,
) -> Self
Adds an AddSystemTag() macro configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_stereo
|
str | None
|
The tag stereotype name. |
None
|
bg_color
|
str | None
|
Background color. |
None
|
font_color
|
str | None
|
Font color. |
None
|
border_color
|
str | None
|
Border color. |
None
|
shadowing
|
bool | None
|
Shadow effect setting. |
None
|
shape
|
TagShape | None
|
Optional shape modifier. |
None
|
sprite
|
str | None
|
Optional sprite reference. |
None
|
type_
|
str | None
|
System type. |
None
|
legend_text
|
str | None
|
Legend label. |
None
|
legend_sprite
|
str | None
|
Legend sprite. |
None
|
border_style
|
LineStyle | None
|
Border style. |
None
|
border_thickness
|
str | None
|
Border thickness. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
add_external_system_tag ¶
add_external_system_tag(
tag_stereo: str | None = None,
bg_color: str | None = None,
font_color: str | None = None,
border_color: str | None = None,
shadowing: bool | None = None,
shape: TagShape | None = None,
sprite: str | None = None,
type_: str | None = None,
legend_text: str | None = None,
legend_sprite: str | None = None,
border_style: LineStyle | None = None,
border_thickness: str | None = None,
) -> Self
Adds an AddExternalSystemTag() macro configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag_stereo
|
str | None
|
The tag stereotype name. |
None
|
bg_color
|
str | None
|
Background color. |
None
|
font_color
|
str | None
|
Font color. |
None
|
border_color
|
str | None
|
Border color. |
None
|
shadowing
|
bool | None
|
Shadow effect setting. |
None
|
shape
|
TagShape | None
|
Optional shape modifier. |
None
|
sprite
|
str | None
|
Optional sprite reference. |
None
|
type_
|
str | None
|
System type. |
None
|
legend_text
|
str | None
|
Legend label. |
None
|
legend_sprite
|
str | None
|
Legend sprite. |
None
|
border_style
|
LineStyle | None
|
Border style. |
None
|
border_thickness
|
str | None
|
Border thickness. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
update_element_style ¶
update_element_style(
element_name: str | None = None,
bg_color: str | None = None,
font_color: str | None = None,
border_color: str | None = None,
shadowing: bool | None = None,
shape: TagShape | None = None,
sprite: str | None = None,
technology: str | None = None,
legend_text: str | None = None,
legend_sprite: str | None = None,
border_style: LineStyle | None = None,
border_thickness: str | None = None,
) -> Self
Adds an UpdateElementStyle() macro configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_name
|
str | None
|
C4 element type to style (e.g. 'person', 'system', 'container'). |
None
|
bg_color
|
str | None
|
Background color. |
None
|
font_color
|
str | None
|
Font color. |
None
|
border_color
|
str | None
|
Border color. |
None
|
shadowing
|
bool | None
|
Shadow effect setting. |
None
|
shape
|
TagShape | None
|
Optional shape modifier. |
None
|
sprite
|
str | None
|
Optional sprite reference. |
None
|
technology
|
str | None
|
Technology metadata. |
None
|
legend_text
|
str | None
|
Legend label. |
None
|
legend_sprite
|
str | None
|
Legend sprite. |
None
|
border_style
|
LineStyle | None
|
Border style. |
None
|
border_thickness
|
str | None
|
Border thickness. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
update_boundary_style ¶
update_boundary_style(
element_name: str | None = None,
bg_color: str | None = None,
font_color: str | None = None,
border_color: str | None = None,
shadowing: bool | None = None,
shape: TagShape | None = None,
type_: str | None = None,
sprite: str | None = None,
technology: str | None = None,
legend_text: str | None = None,
legend_sprite: str | None = None,
border_style: LineStyle | None = None,
border_thickness: str | None = None,
) -> Self
Adds an UpdateBoundaryStyle() macro configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_name
|
str | None
|
C4 element type to style (e.g. 'person', 'system', 'container'). |
None
|
bg_color
|
str | None
|
Background color. |
None
|
font_color
|
str | None
|
Font color. |
None
|
border_color
|
str | None
|
Border color. |
None
|
shadowing
|
bool | None
|
Shadow effect setting. |
None
|
shape
|
TagShape | None
|
Optional shape modifier. |
None
|
type_
|
str | None
|
Element type. |
None
|
sprite
|
str | None
|
Optional sprite reference. |
None
|
technology
|
str | None
|
Technology metadata. |
None
|
legend_text
|
str | None
|
Legend label. |
None
|
legend_sprite
|
str | None
|
Legend sprite. |
None
|
border_style
|
LineStyle | None
|
Border style. |
None
|
border_thickness
|
str | None
|
Border thickness. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
update_rel_style ¶
update_rel_style(
text_color: str | None = None,
line_color: str | None = None,
) -> Self
Adds an UpdateRelStyle() macro configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text_color
|
str | None
|
Text color. |
None
|
line_color
|
str | None
|
Line color. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
update_container_boundary_style ¶
update_container_boundary_style(
element_name: str | None = None,
bg_color: str | None = None,
font_color: str | None = None,
border_color: str | None = None,
shadowing: bool | None = None,
shape: TagShape | None = None,
type_: str | None = None,
sprite: str | None = None,
technology: str | None = None,
legend_text: str | None = None,
legend_sprite: str | None = None,
border_style: LineStyle | None = None,
border_thickness: str | None = None,
) -> Self
Adds an UpdateContainerBoundaryStyle() macro configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_name
|
str | None
|
C4 element type to style (e.g. 'person', 'system', 'container'). |
None
|
bg_color
|
str | None
|
Background color. |
None
|
font_color
|
str | None
|
Font color. |
None
|
border_color
|
str | None
|
Border color. |
None
|
shadowing
|
bool | None
|
Shadow effect setting. |
None
|
shape
|
TagShape | None
|
Optional shape modifier. |
None
|
type_
|
str | None
|
Element type. |
None
|
sprite
|
str | None
|
Optional sprite reference. |
None
|
technology
|
str | None
|
Technology metadata. |
None
|
legend_text
|
str | None
|
Legend label. |
None
|
legend_sprite
|
str | None
|
Legend sprite. |
None
|
border_style
|
LineStyle | None
|
Border style. |
None
|
border_thickness
|
str | None
|
Border thickness. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
update_system_boundary_style ¶
update_system_boundary_style(
element_name: str | None = None,
bg_color: str | None = None,
font_color: str | None = None,
border_color: str | None = None,
shadowing: bool | None = None,
shape: TagShape | None = None,
type_: str | None = None,
sprite: str | None = None,
technology: str | None = None,
legend_text: str | None = None,
legend_sprite: str | None = None,
border_style: LineStyle | None = None,
border_thickness: str | None = None,
) -> Self
Adds an UpdateSystemBoundaryStyle() macro configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_name
|
str | None
|
C4 element type to style (e.g. 'person', 'system', 'container'). |
None
|
bg_color
|
str | None
|
Background color. |
None
|
font_color
|
str | None
|
Font color. |
None
|
border_color
|
str | None
|
Border color. |
None
|
shadowing
|
bool | None
|
Shadow effect setting. |
None
|
shape
|
TagShape | None
|
Optional shape modifier. |
None
|
type_
|
str | None
|
Container type. |
None
|
sprite
|
str | None
|
Optional sprite reference. |
None
|
technology
|
str | None
|
Technology metadata. |
None
|
legend_text
|
str | None
|
Legend label. |
None
|
legend_sprite
|
str | None
|
Legend sprite. |
None
|
border_style
|
LineStyle | None
|
Border style. |
None
|
border_thickness
|
str | None
|
Border thickness. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
update_enterprise_boundary_style ¶
update_enterprise_boundary_style(
element_name: str | None = None,
bg_color: str | None = None,
font_color: str | None = None,
border_color: str | None = None,
shadowing: bool | None = None,
shape: TagShape | None = None,
type_: str | None = None,
sprite: str | None = None,
technology: str | None = None,
legend_text: str | None = None,
legend_sprite: str | None = None,
border_style: LineStyle | None = None,
border_thickness: str | None = None,
) -> Self
Adds an UpdateEnterpriseBoundaryStyle() macro configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_name
|
str | None
|
C4 element type to style (e.g. 'person', 'system', 'container'). |
None
|
bg_color
|
str | None
|
Background color. |
None
|
font_color
|
str | None
|
Font color. |
None
|
border_color
|
str | None
|
Border color. |
None
|
shadowing
|
bool | None
|
Shadow effect setting. |
None
|
shape
|
TagShape | None
|
Optional shape modifier. |
None
|
type_
|
str | None
|
Container type. |
None
|
sprite
|
str | None
|
Optional sprite reference. |
None
|
technology
|
str | None
|
Technology metadata. |
None
|
legend_text
|
str | None
|
Legend label. |
None
|
legend_sprite
|
str | None
|
Legend sprite. |
None
|
border_style
|
LineStyle | None
|
Border style. |
None
|
border_thickness
|
str | None
|
Border thickness. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
layout_top_down ¶
layout_top_down(*, with_legend: bool = False) -> Self
Sets the diagram layout to top-down orientation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
with_legend
|
bool
|
Whether to include LAYOUT_WITH_LEGEND. |
False
|
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
layout_left_right ¶
layout_left_right(*, with_legend: bool = False) -> Self
Sets the diagram layout to left-right orientation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
with_legend
|
bool
|
Whether to include LAYOUT_WITH_LEGEND. |
False
|
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
layout_landscape ¶
layout_landscape(*, with_legend: bool = False) -> Self
Sets the diagram layout to PlantUML landscape mode.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
with_legend
|
bool
|
Whether to include LAYOUT_WITH_LEGEND. |
False
|
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
layout_with_legend ¶
layout_with_legend() -> Self
Enables LAYOUT_WITH_LEGEND macro.
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
layout_as_sketch ¶
layout_as_sketch() -> Self
Enables LAYOUT_AS_SKETCH macro.
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
without_property_header ¶
without_property_header() -> Self
Enables WithoutPropertyHeader macro.
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
set_sketch_style ¶
set_sketch_style(
bg_color: str | None = None,
font_color: str | None = None,
warning_color: str | None = None,
font_name: str | None = None,
footer_warning: str | None = None,
footer_text: str | None = None,
) -> Self
Enables SET_SKETCH_STYLE macro with optional customization.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bg_color
|
str | None
|
Background color of the sketch. |
None
|
font_color
|
str | None
|
Font color. |
None
|
warning_color
|
str | None
|
Color for footer warnings. |
None
|
font_name
|
str | None
|
Font family name. |
None
|
footer_warning
|
str | None
|
Warning message in the footer. |
None
|
footer_text
|
str | None
|
Custom footer text. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
show_legend ¶
show_legend(
hide_stereotype: bool = True, details: Details = "Small"
) -> Self
Enables SHOW_LEGEND macro with custom options.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hide_stereotype
|
bool
|
Whether to hide stereotypes in the legend. |
True
|
details
|
Details
|
Level of detail to show. |
'Small'
|
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
show_floating_legend ¶
show_floating_legend(
alias: str | None = None,
hide_stereotype: bool = True,
details: Details = "Small",
) -> Self
Enables SHOW_FLOATING_LEGEND macro with custom options.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
alias
|
str | None
|
Optional legend alias. |
None
|
hide_stereotype
|
bool
|
Whether to hide stereotypes in the legend. |
True
|
details
|
Details
|
Level of detail to show. |
'Small'
|
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
update_legend_title ¶
update_legend_title(new_title: str | None = None) -> Self
Sets a custom title for the legend.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
new_title
|
str | None
|
The title to display above the legend. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
show_person_outline ¶
show_person_outline() -> Self
Enables SHOW_PERSON_OUTLINE macro.
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
show_person_sprite ¶
show_person_sprite(alias: str | None = None) -> Self
Enables SHOW_PERSON_SPRITE macro with custom options.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
alias
|
str | None
|
Optional sprite alias. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
hide_stereotype ¶
hide_stereotype() -> Self
Enables HIDE_STEREOTYPE macro.
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
hide_person_sprite ¶
hide_person_sprite() -> Self
Enables HIDE_PERSON_SPRITE macro.
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
show_person_portrait ¶
show_person_portrait() -> Self
Enables SHOW_PERSON_PORTRAIT macro.
Returns:
| Type | Description |
|---|---|
Self
|
The updated render options. |
build ¶
build() -> PlantUMLRenderOptions
Build and return the final PlantUMLRenderOptions instance.
Returns:
| Type | Description |
|---|---|
PlantUMLRenderOptions
|
A fully populated |
PlantUMLRenderOptions
|
passed to renderers. |
c4.renderers.plantuml.options.PlantUMLRenderOptions
dataclass
¶
Final render options for rendering a C4-PlantUML diagram.
This class encapsulates all layout directives, macros, tag definitions, and visual styles that should be applied to a diagram at render time.
Attributes:
| Name | Type | Description |
|---|---|---|
includes |
list[str]
|
A list of PlantUML |
layout |
DiagramLayout | None
|
Layout direction (e.g., top-down, left-right, landscape). |
layout_with_legend |
bool
|
Whether to apply the LAYOUT_WITH_LEGEND macro. |
layout_as_sketch |
bool
|
Whether to apply the LAYOUT_AS_SKETCH macro. |
set_sketch_style |
SetSketchStyle | None
|
Optional sketch-style visual customization. |
show_legend |
ShowLegend | None
|
Configuration for SHOW_LEGEND macro. |
show_floating_legend |
ShowFloatingLegend | None
|
Configuration for SHOW_FLOATING_LEGEND macro. |
hide_stereotype |
bool
|
Whether to hide stereotype labels globally. |
hide_person_sprite |
bool
|
Whether to hide person sprites globally. |
show_person_sprite |
ShowPersonSprite | None
|
Configuration for SHOW_PERSON_SPRITE macro. |
show_person_portrait |
bool
|
Whether to enable person portraits. |
show_person_outline |
bool
|
Whether to enable person outlines. |
without_property_header |
bool
|
If no header is used, then the second column is bold. |
legend_title |
str | None
|
Optional title for the diagram legend. |
tags |
list[BaseTag]
|
List of tag macros (e.g., AddElementTag, AddRelTag). |
styles |
list[BaseStyle]
|
List of style update macros (e.g., UpdateElementStyle). |
Source code in c4/renderers/plantuml/options.py
395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 | |
c4.renderers.plantuml.options.TagShape
module-attribute
¶
TagShape = Literal['EightSidedShape', 'RoundedBoxShape']
c4.renderers.plantuml.options.LineStyle
module-attribute
¶
LineStyle = Literal[
"DashedLine", "DottedLine", "BoldLine", "SolidLine"
]
c4.renderers.plantuml.options.Details
module-attribute
¶
Details = Literal['Small', 'Normal', 'None']