README

Milky2018/diago/graph does not have a README file

#
ArrowheadType

pub(all) enum ArrowheadType {
None
Triangle
Arrow
Diamond
FilledDiamond
Circle
FilledCircle
Open
Line
CfOne
CfMany
CfOneRequired
CfManyRequired
CfOneOptional
CfManyOptional
} derive(Eq,
Debug
)

All supported arrowhead types

#
ArrowheadType::from_string

fn ArrowheadType::from_string(s : String) -> ArrowheadType

Parse an arrowhead type from a string

#
ArrowheadType::is_crows_foot

fn ArrowheadType::is_crows_foot(self : ArrowheadType) -> Bool

Check if this is a crow's foot notation type

#
ArrowheadType::marker_id

fn ArrowheadType::marker_id(self : ArrowheadType, reverse : Bool) -> String

Get the SVG marker ID for this arrowhead type

#
ArrowheadType::marker_url

fn ArrowheadType::marker_url(self : ArrowheadType, reverse : Bool) -> String

Get the marker URL for SVG use

#
ArrowheadType::to_arrowhead_string

fn ArrowheadType::to_arrowhead_string(self : ArrowheadType) -> String

Convert arrowhead type to canonical string representation

#
ArrowheadType::to_ascii

fn ArrowheadType::to_ascii(self : ArrowheadType, reverse : Bool) -> String

Get ASCII representation of this arrowhead

#
Box

pub struct Box {
x : Double
y : Double
width : Double
height : Double
} derive(Eq,
Debug
)

Bounding box for positioning
impl Show for Box

#
Box::bottom_left

fn Box::bottom_left(self : Box) -> Point

Get the bottom-left corner

#
Box::bottom_right

fn Box::bottom_right(self : Box) -> Point

Get the bottom-right corner

#
Box::center

fn Box::center(self : Box) -> Point

Get the center point of the box

#
Box::contains

fn Box::contains(self : Box, p : Point) -> Bool

Check if a point is inside the box

#
Box::get_height

fn Box::get_height(self : Box) -> Double

Get height

#
Box::get_width

fn Box::get_width(self : Box) -> Double

Get width

#
Box::get_x

fn Box::get_x(self : Box) -> Double

Get x coordinate

#
Box::get_y

fn Box::get_y(self : Box) -> Double

Get y coordinate

#
Box::intersects

fn Box::intersects(self : Box, other : Box) -> Bool

Check if this box intersects another

#
Box::new

fn Box::new(x : Double, y : Double, width : Double, height : Double) -> Box

#
Box::top_left

fn Box::top_left(self : Box) -> Point

Get the top-left corner

#
Box::top_right

fn Box::top_right(self : Box) -> Point

Get the top-right corner

#
Box::zero

fn Box::zero() -> Box

#
EdgeInput

pub struct EdgeInput {
index : Int
src_id : String
dst_id : String
src_id_syntax : String
dst_id_syntax : String
references : Array[EdgeReference]
classes : Array[String]
src_arrow : Bool
dst_arrow : Bool
src_arrowhead : ArrowheadType
dst_arrowhead : ArrowheadType
src_arrowhead_label : String?
dst_arrowhead_label : String?
src_arrowhead_label_color : String?
dst_arrowhead_label_color : String?
src_anchor : String?
dst_anchor : String?
label : String
icon : String?
icon_position : String?
icon_border_radius : Double?
link : String?
style : StyleInput
route : Array[Point]
bend_points : Array[Point]?
is_curve : Bool
z_index : Int
reference_count : Int
label_box : Box?
src_column_index : Int?
dst_column_index : Int?
} derive(
Debug
)

#
EdgeInput::from_model

fn EdgeInput::from_model(edge : EdgeModel) -> EdgeInput

#
EdgeInput::from_parts

fn EdgeInput::from_parts(index : Int, src_id : String, dst_id : String, src_arrow : Bool, dst_arrow : Bool, src_arrowhead : ArrowheadType, dst_arrowhead : ArrowheadType, src_arrowhead_label : String?, dst_arrowhead_label : String?, src_arrowhead_label_color : String?, dst_arrowhead_label_color : String?, src_anchor : String?, dst_anchor : String?, label : String, style : StyleInput, route : Array[Point], bend_points : Array[Point]?, is_curve : Bool, z_index : Int, reference_count : Int, label_box : Box?, src_column_index : Int?, dst_column_index : Int?, src_id_syntax? : String, dst_id_syntax? : String, references? : Array[EdgeReference], icon? : String?, icon_position? : String?, icon_border_radius? : Double?, link? : String?, classes? : Array[String]) -> EdgeInput

#
EdgeInput::get_dst_id

fn EdgeInput::get_dst_id(self : EdgeInput) -> String

#
EdgeInput::get_label_box

fn EdgeInput::get_label_box(self : EdgeInput) -> Box?

#
EdgeInput::get_src_id

fn EdgeInput::get_src_id(self : EdgeInput) -> String

#
EdgeInput::lookup_dst_id

fn EdgeInput::lookup_dst_id(self : EdgeInput) -> String

#
EdgeInput::lookup_src_id

fn EdgeInput::lookup_src_id(self : EdgeInput) -> String

#
EdgeInput::new

fn EdgeInput::new(index : Int, src_id : String, dst_id : String, src_arrow : Bool, dst_arrow : Bool, src_id_syntax? : String, dst_id_syntax? : String) -> EdgeInput

#
EdgeModel

pub struct EdgeModel {
index : Int
src_id : String
dst_id : String
src_id_syntax : String
dst_id_syntax : String
references : Array[EdgeReference]
classes : Array[String]
src_arrow : Bool
dst_arrow : Bool
src_arrowhead : ArrowheadType
dst_arrowhead : ArrowheadType
src_arrowhead_label : String?
dst_arrowhead_label : String?
src_arrowhead_label_color : String?
dst_arrowhead_label_color : String?
src_anchor : String?
dst_anchor : String?
label : String
icon : String?
icon_position : String?
icon_border_radius : Double?
link : String?
style : StyleModel
route : Array[Point]
bend_points : Array[Point]?
is_curve : Bool
z_index : Int
reference_count : Int
label_box : Box?
src_column_index : Int?
dst_column_index : Int?
} derive(
Debug
)

Immutable edge model

#
EdgeModel::new

fn EdgeModel::new(index : Int, src_id : String, dst_id : String, src_arrow : Bool, dst_arrow : Bool, src_id_syntax? : String, dst_id_syntax? : String) -> EdgeModel

#
EdgeModel::with_label

fn EdgeModel::with_label(self : EdgeModel, label : String) -> EdgeModel

#
EdgeModel::with_label_box

fn EdgeModel::with_label_box(self : EdgeModel, label_box : Box?) -> EdgeModel

#
EdgeModel::with_route

fn EdgeModel::with_route(self : EdgeModel, route : Array[Point]) -> EdgeModel

#
EdgeReference

pub struct EdgeReference {
range :
Range

edge_index : Int
scope_abs_id_syntax : String?
source_path : String?
primary : Bool
due_to_glob : Bool
due_to_lazy_glob : Bool
} derive(Eq,
Debug
)

#
EdgeReference::contained_by

fn EdgeReference::contained_by(self : EdgeReference, abs_id_syntax : String) -> Bool

#
EdgeReference::new

fn EdgeReference::new(range :
Range
, edge_index : Int, scope_abs_id_syntax : String?, source_path : String?, primary : Bool, due_to_glob : Bool, due_to_lazy_glob : Bool) -> EdgeReference

#
FragmentOperandInput

pub struct FragmentOperandInput {
condition : String?
} derive(
Debug
)

#
FragmentOperandInput::new

fn FragmentOperandInput::new(condition : String?) -> FragmentOperandInput

#
FragmentOperandLayout

pub struct FragmentOperandLayout {
condition : String?
separator_y : Double
} derive(
Debug
)

#
FragmentOperandLayout::new

fn FragmentOperandLayout::new(condition : String?, separator_y : Double) -> FragmentOperandLayout

#
FragmentOperandModel

pub struct FragmentOperandModel {
condition : String?
separator_y : Double
} derive(
Debug
)

#
GraphDataValue

pub(all) enum GraphDataValue {
Text(String)
StringArray(Array[String])
} derive(Eq,
Debug
)

Graph-scoped metadata values aligned with the reference's current config data shape.

#
GraphInput

pub struct GraphInput {
name : String
root : ObjectInput
objects : Array[ObjectInput]
edges : Array[EdgeInput]
sequence_fragments : Array[SequenceFragmentInput]
activation_boxes : Array[(String, Box)]
sequence_notes : Array[(String, String, Box)]
sequence_fragments_layout : Array[SequenceFragmentLayout]
layers : Array[LayerInput]
scenarios : Array[ScenarioInput]
steps : Array[StepInput]
legend : LegendInput?
is_folder_only : Bool
data : Map[String, GraphDataValue]
} derive(
Debug
)

#
GraphInput::children_of

fn GraphInput::children_of(self : GraphInput, obj : ObjectInput) -> Array[ObjectInput]

#
GraphInput::find_object

fn GraphInput::find_object(self : GraphInput, id : String) -> ObjectInput?

#
GraphInput::from_model

fn GraphInput::from_model(graph : GraphModel) -> GraphInput

#
GraphInput::from_parts

fn GraphInput::from_parts(name : String, root : ObjectInput, objects : Array[ObjectInput], edges : Array[EdgeInput], sequence_fragments : Array[SequenceFragmentInput], activation_boxes : Array[(String, Box)], sequence_notes : Array[(String, String, Box)], sequence_fragments_layout : Array[SequenceFragmentLayout], layers : Array[LayerInput], scenarios : Array[ScenarioInput], steps : Array[StepInput], legend : LegendInput?, is_folder_only? : Bool, data? : Map[String, GraphDataValue]) -> GraphInput

#
GraphInput::get_edges

fn GraphInput::get_edges(self : GraphInput) -> Array[EdgeInput]

#
GraphInput::get_objects

fn GraphInput::get_objects(self : GraphInput) -> Array[ObjectInput]

#
GraphInput::new

fn GraphInput::new(name : String) -> GraphInput

#
GraphInput::uses_latex_labels

fn GraphInput::uses_latex_labels(self : GraphInput) -> Bool

Whether this graph or one of its child boards contains a LaTeX label.

#
GraphInput::uses_sketch_styles

fn GraphInput::uses_sketch_styles(self : GraphInput) -> Bool

Whether this graph or one of its child boards explicitly enables sketch rendering on an object or edge.

#
GraphInput::with_caps_lock

fn GraphInput::with_caps_lock(self : GraphInput) -> GraphInput

Apply a theme's caps-lock rule before layout so measured labels and rendered labels use the same text. Explicit text-transform: none, code blocks, and LaTeX labels retain their source text, matching D2's theme semantics.

#
GraphInput::with_default_font

fn GraphInput::with_default_font(self : GraphInput, font : String) -> GraphInput

Apply a layout-time fallback font without overriding explicit object or edge font styles. Theme rules use this before invoking any layout backend so text measurement remains backend-independent.

#
GraphModel

pub struct GraphModel {
name : String
root : ObjectModel
objects : Array[ObjectModel]
edges : Array[EdgeModel]
activation_boxes : Array[(String, Box)]
sequence_notes : Array[(String, String, Box)]
sequence_fragments : Array[SequenceFragmentModel]
layers : Array[LayerModel]
scenarios : Array[ScenarioModel]
steps : Array[StepModel]
legend : LegendModel?
is_folder_only : Bool
data : Map[String, GraphDataValue]
} derive(
Debug
)

Immutable graph model

#
GraphModel::add_edge

fn GraphModel::add_edge(self : GraphModel, edge : EdgeModel) -> GraphModel

#
GraphModel::add_object

fn GraphModel::add_object(self : GraphModel, obj : ObjectModel) -> GraphModel

#
GraphModel::new

fn GraphModel::new(name : String) -> GraphModel

#
GraphModel::with_legend

fn GraphModel::with_legend(self : GraphModel, legend : LegendModel?) -> GraphModel

#
LayerInput

pub struct LayerInput {
name : String
graph : GraphInput
} derive(
Debug
)

#
LayerInput::new

fn LayerInput::new(name : String, graph : GraphInput) -> LayerInput

#
LayerModel

pub struct LayerModel {
name : String
graph : GraphModel
} derive(
Debug
)

#
LayoutPatch

pub struct LayoutPatch {
nodes : Map[String, Box]
node_labels : Map[String, Box]
edges : Map[Int, Array[Point]]
edge_bend_points : Map[Int, Array[Point]]
edge_curves : Map[Int, Bool]
edge_labels : Map[Int, Box]
activation_boxes : Array[(String, Box)]
sequence_notes : Array[(String, String, Box)]
sequence_fragments : Array[SequenceFragmentLayout]
} derive(
Debug
)

#
LayoutPatch::new

#
Legend

pub struct Legend {
title : String?
position : LegendPosition
entries : Array[LegendEntry]
fill : String?
stroke : String?
padding : Double
entry_gap : Double
icon_size : Double
} derive(
Debug
)

The legend configuration for a diagram

#
Legend::add_connection

fn Legend::add_connection(self : Legend, src_arrow : ArrowheadType, dst_arrow : ArrowheadType, label : String) -> Unit

Add a connection entry to the legend

#
Legend::add_entry

fn Legend::add_entry(self : Legend, entry : LegendEntry) -> Unit

Add an entry to the legend

#
Legend::add_separator

fn Legend::add_separator(self : Legend) -> Unit

Add a separator to the legend

#
Legend::add_shape

fn Legend::add_shape(self : Legend, shape : ShapeType, label : String) -> Unit

Add a shape entry to the legend

#
Legend::entry_count

fn Legend::entry_count(self : Legend) -> Int

Get the number of entries (excluding separators)

#
Legend::is_empty

fn Legend::is_empty(self : Legend) -> Bool

Check if legend has any entries

#
Legend::new

fn Legend::new() -> Legend

Create a new legend with default settings

#
Legend::set_entry_gap

fn Legend::set_entry_gap(self : Legend, entry_gap : Double) -> Legend

#
Legend::set_fill

fn Legend::set_fill(self : Legend, fill : String) -> Legend

#
Legend::set_icon_size

fn Legend::set_icon_size(self : Legend, icon_size : Double) -> Legend

#
Legend::set_padding

fn Legend::set_padding(self : Legend, padding : Double) -> Legend

#
Legend::set_position

fn Legend::set_position(self : Legend, position : LegendPosition) -> Legend

#
Legend::set_stroke

fn Legend::set_stroke(self : Legend, stroke : String) -> Legend

#
Legend::set_title

fn Legend::set_title(self : Legend, title : String) -> Legend

#
Legend::with_position

fn Legend::with_position(position : LegendPosition) -> Legend

Create a legend with a specific position

#
LegendEntry

pub(all) enum LegendEntry {
ShapeEntry(id~ : String, shape~ : ShapeType, label~ : String, style~ : StyleInput?)
ConnectionEntry(src_id~ : String, dst_id~ : String, index~ : Int, src_arrow_enabled~ : Bool, dst_arrow_enabled~ : Bool, src_arrow~ : ArrowheadType, dst_arrow~ : ArrowheadType, label~ : String, style~ : StyleInput?)
CustomEntry(icon~ : String, label~ : String)
Separator
} derive(
Debug
)

A single entry in the legend

#
LegendEntry::connection

fn LegendEntry::connection(src_arrow : ArrowheadType, dst_arrow : ArrowheadType, label : String, style : StyleInput?, src_id? : String, dst_id? : String, index? : Int, src_arrow_enabled? : Bool, dst_arrow_enabled? : Bool) -> LegendEntry

Create a connection legend entry

#
LegendEntry::custom

fn LegendEntry::custom(icon : String, label : String) -> LegendEntry

Create a custom legend entry

#
LegendEntry::separator

fn LegendEntry::separator() -> LegendEntry

Create a separator entry

#
LegendEntry::shape

fn LegendEntry::shape(shape : ShapeType, label : String, style : StyleInput?, id? : String) -> LegendEntry

Create a shape legend entry

#
LegendEntryInput

pub enum LegendEntryInput {
ShapeEntry(id~ : String, shape~ : ShapeType, label~ : String, style~ : StyleInput?)
ConnectionEntry(src_id~ : String, dst_id~ : String, index~ : Int, src_arrow_enabled~ : Bool, dst_arrow_enabled~ : Bool, src_arrow~ : ArrowheadType, dst_arrow~ : ArrowheadType, label~ : String, style~ : StyleInput?)
CustomEntry(icon~ : String, label~ : String)
Separator
} derive(
Debug
)

#
LegendEntryInput::connection

fn LegendEntryInput::connection(src_arrow : ArrowheadType, dst_arrow : ArrowheadType, label : String, style : StyleInput?, src_id? : String, dst_id? : String, index? : Int, src_arrow_enabled? : Bool, dst_arrow_enabled? : Bool) -> LegendEntryInput

#
LegendEntryInput::custom

fn LegendEntryInput::custom(icon : String, label : String) -> LegendEntryInput

#
LegendEntryInput::separator

#
LegendEntryInput::shape

fn LegendEntryInput::shape(shape : ShapeType, label : String, style : StyleInput?, id? : String) -> LegendEntryInput

#
LegendInput

pub struct LegendInput {
title : String?
position : LegendPosition
entries : Array[LegendEntryInput]
fill : String?
stroke : String?
padding : Double
entry_gap : Double
icon_size : Double
} derive(
Debug
)

#
LegendInput::entry_count

fn LegendInput::entry_count(self : LegendInput) -> Int

#
LegendInput::from_model

fn LegendInput::from_model(legend : LegendModel) -> LegendInput

#
LegendInput::from_parts

fn LegendInput::from_parts(title : String?, position : LegendPosition, entries : Array[LegendEntryInput], fill : String?, stroke : String?, padding : Double, entry_gap : Double, icon_size : Double) -> LegendInput

#
LegendInput::is_empty

fn LegendInput::is_empty(self : LegendInput) -> Bool

#
LegendModel

pub struct LegendModel {
title : String?
position : LegendPosition
entries : Array[LegendEntryInput]
fill : String?
stroke : String?
padding : Double
entry_gap : Double
icon_size : Double
} derive(
Debug
)

Immutable legend configuration

#
LegendModel::new

#
LegendPosition

pub(all) enum LegendPosition {
TopLeft
TopRight
BottomLeft
BottomRight
Hidden
} derive(Eq,
Debug
)

Position of the legend in the diagram

#
LegendPosition::from_string

fn LegendPosition::from_string(s : String) -> LegendPosition

Parse legend position from string

#
LegendPosition::to_position_string

fn LegendPosition::to_position_string(self : LegendPosition) -> String

Convert legend position to string

#
ObjectInput

pub struct ObjectInput {
id : String
id_val : String
id_syntax : String
abs_id_syntax : String
references : Array[ObjectReference]
label : String
shape_type : ShapeType
style : StyleInput
box : Box?
label_box : Box?
child_ids : Array[String]
z_index : Int
icon : String?
icon_position : String?
tooltip : String?
tooltip_position : String?
link : String?
label_position : String?
classes : Array[String]
language : String?
sql_constraints : Array[String]
grid_rows : Int?
grid_columns : Int?
grid_row_directed : Bool?
grid_gap : Double?
horizontal_gap : Double?
vertical_gap : Double?
grid_column_span : Int?
grid_row_span : Int?
near : String?
top : Int?
left : Int?
direction : String?
} derive(
Debug
)

Immutable representation of a graph object for layout engines.

Fields:

  • id : Compatibility absolute identifier using semantic path values.
  • id_val : Semantic value of the local object identifier.
  • id_syntax : Canonical source syntax for the local object identifier.
  • abs_id_syntax : Canonical source syntax for the absolute object path.
  • references : Source references that compiled into this object.
  • label : Display text for the object.
  • shape_type : Visual shape of the object.
  • style : Visual styling properties.
  • box : Optional precomputed bounding box.
  • label_box : Optional precomputed label bounding box.
  • child_ids : Array of child object absolute syntax identifiers.
  • z_index : Layer ordering for visual stacking.
  • icon : Optional icon identifier.
  • tooltip : Optional tooltip text.
  • link : Optional hyperlink URL.
  • classes : Array of CSS class names for styling.
  • language : Optional language tag preserved for code/text handling.
  • sql_constraints : Optional SQL constraints preserved for class/sql_table children.
  • grid_rows : Optional number of grid rows for layout.
  • grid_columns : Optional number of grid columns for layout.
  • grid_gap : Optional spacing between grid items.
  • horizontal_gap : Optional horizontal spacing between children.
  • vertical_gap : Optional vertical spacing between children.
  • grid_column_span : Optional number of columns this object spans.
  • grid_row_span : Optional number of rows this object spans.
  • near : Optional identifier of object to position near.
  • top : Optional fixed top coordinate in pixels.
  • left : Optional fixed left coordinate in pixels.
  • direction : Optional layout direction override (up|down|left|right).

#
ObjectInput::from_model

fn ObjectInput::from_model(obj : ObjectModel) -> ObjectInput

#
ObjectInput::from_parts

fn ObjectInput::from_parts(id : String, label : String, shape_type : ShapeType, style : StyleInput, box : Box?, label_box : Box?, child_ids : Array[String], z_index : Int, icon : String?, tooltip : String?, link : String?, classes : Array[String], grid_rows : Int?, grid_columns : Int?, grid_gap : Double?, horizontal_gap : Double?, vertical_gap : Double?, grid_column_span : Int?, grid_row_span : Int?, near : String?, top : Int?, left : Int?, direction? : String?, language? : String?, sql_constraints? : Array[String], id_val? : String, id_syntax? : String, abs_id_syntax? : String, references? : Array[ObjectReference], icon_position? : String?, tooltip_position? : String?, label_position? : String?, grid_row_directed? : Bool?) -> ObjectInput

#
ObjectInput::get_box

fn ObjectInput::get_box(self : ObjectInput) -> Box?

#
ObjectInput::get_label_box

fn ObjectInput::get_label_box(self : ObjectInput) -> Box?

#
ObjectInput::lookup_id

fn ObjectInput::lookup_id(self : ObjectInput) -> String

#
ObjectInput::new

fn ObjectInput::new(id : String, id_val? : String, id_syntax? : String, abs_id_syntax? : String) -> ObjectInput

#
ObjectInput::with_direction

fn ObjectInput::with_direction(self : ObjectInput, direction : String?) -> ObjectInput

#
ObjectModel

pub struct ObjectModel {
id : String
id_val : String
id_syntax : String
abs_id_syntax : String
references : Array[ObjectReference]
label : String
shape_type : ShapeType
style : StyleModel
box : Box?
label_box : Box?
children : Array[ObjectModel]
z_index : Int
icon : String?
icon_position : String?
tooltip : String?
tooltip_position : String?
link : String?
label_position : String?
classes : Array[String]
language : String?
sql_constraints : Array[String]
grid_rows : Int?
grid_columns : Int?
grid_gap : Double?
horizontal_gap : Double?
vertical_gap : Double?
grid_column_span : Int?
grid_row_span : Int?
near : String?
top : Int?
left : Int?
direction : String?
} derive(
Debug
)

Immutable object model

#
ObjectModel::add_child

fn ObjectModel::add_child(self : ObjectModel, child : ObjectModel) -> ObjectModel

#
ObjectModel::new

fn ObjectModel::new(id : String, id_val? : String, id_syntax? : String, abs_id_syntax? : String) -> ObjectModel

#
ObjectModel::with_box

fn ObjectModel::with_box(self : ObjectModel, box : Box?) -> ObjectModel

#
ObjectModel::with_label

fn ObjectModel::with_label(self : ObjectModel, label : String) -> ObjectModel

Functional helpers

#
ObjectModel::with_label_box

fn ObjectModel::with_label_box(self : ObjectModel, label_box : Box?) -> ObjectModel

#
ObjectReference

pub struct ObjectReference {
range :
Range

key_path_index : Int
in_edge : Bool
scope_abs_id_syntax : String?
source_path : String?
primary : Bool
due_to_glob : Bool
due_to_lazy_glob : Bool
} derive(Eq,
Debug
)

#
ObjectReference::contained_by

fn ObjectReference::contained_by(self : ObjectReference, abs_id_syntax : String) -> Bool

#
ObjectReference::new

fn ObjectReference::new(range :
Range
, key_path_index : Int, in_edge : Bool, scope_abs_id_syntax : String?, source_path : String?, primary : Bool, due_to_glob : Bool, due_to_lazy_glob : Bool) -> ObjectReference

#
Point

pub struct Point {
x : Double
y : Double
} derive(Eq,
Debug
)

A 2D point
impl Show for Point

#
Point::add

fn Point::add(self : Point, other : Point) -> Point

Add two points

#
Point::distance

fn Point::distance(self : Point, other : Point) -> Double

Calculate distance to another point

#
Point::get_x

fn Point::get_x(self : Point) -> Double

Get x coordinate

#
Point::get_y

fn Point::get_y(self : Point) -> Double

Get y coordinate

#
Point::new

fn Point::new(x : Double, y : Double) -> Point

#
Point::scale

fn Point::scale(self : Point, factor : Double) -> Point

Scale by a factor

#
Point::sub

fn Point::sub(self : Point, other : Point) -> Point

Subtract another point

#
Point::zero

fn Point::zero() -> Point

#
Route

pub struct Route {
style : RouteStyle
waypoints : Array[Waypoint]
src_arrowhead : ArrowheadType
dst_arrowhead : ArrowheadType
} derive(
Debug
)

Route configuration for an edge

#
Route::add_point

fn Route::add_point(self : Route, x : Double, y : Double) -> Unit

Add a simple point to the route

#
Route::add_waypoint

fn Route::add_waypoint(self : Route, wp : Waypoint) -> Unit

Add a waypoint to the route

#
Route::end

fn Route::end(self : Route) -> Waypoint?

Get the ending point of the route

#
Route::from_points

fn Route::from_points(points : Array[Point], style : RouteStyle, src : ArrowheadType, dst : ArrowheadType) -> Route

Convert from Edge's simple route (Array[Point]) to Route

#
Route::is_empty

fn Route::is_empty(self : Route) -> Bool

Check if route has any waypoints

#
Route::length

fn Route::length(self : Route) -> Int

Get the number of waypoints

#
Route::new

fn Route::new() -> Route

Create a new empty route with default style

#
Route::start

fn Route::start(self : Route) -> Waypoint?

Get the starting point of the route

#
Route::to_points

fn Route::to_points(self : Route) -> Array[Point]

Get all points as a simple array (for backward compatibility)

#
Route::with_style

fn Route::with_style(style : RouteStyle) -> Route

Create a route with specified style

#
RouteStyle

pub(all) enum RouteStyle {
Straight
Curved
Elbow
Orthogonal
} derive(Eq,
Debug
)

Route style for edge paths

#
RouteStyle::from_string

fn RouteStyle::from_string(s : String) -> RouteStyle

Parse route style from string

#
RouteStyle::is_curved

fn RouteStyle::is_curved(self : RouteStyle) -> Bool

Check if this style uses curves

#
RouteStyle::is_orthogonal

fn RouteStyle::is_orthogonal(self : RouteStyle) -> Bool

Check if this style uses right angles

#
RouteStyle::to_route_string

fn RouteStyle::to_route_string(self : RouteStyle) -> String

Convert route style to canonical string

#
ScenarioInput

pub struct ScenarioInput {
name : String
graph : GraphInput
} derive(
Debug
)

#
ScenarioInput::new

fn ScenarioInput::new(name : String, graph : GraphInput) -> ScenarioInput

#
ScenarioModel

pub struct ScenarioModel {
name : String
graph : GraphModel
} derive(
Debug
)

#
SequenceFragmentInput

pub struct SequenceFragmentInput {
fragment_type : String
condition : String?
start_index : Int
end_index : Int
operands : Array[FragmentOperandInput]
} derive(
Debug
)

#
SequenceFragmentInput::from_model

#
SequenceFragmentInput::new

fn SequenceFragmentInput::new(fragment_type : String, condition : String?, start_index : Int, end_index : Int, operands : Array[FragmentOperandInput]) -> SequenceFragmentInput

#
SequenceFragmentLayout

pub struct SequenceFragmentLayout {
fragment_type : String
condition : String?
bbox : Box?
start_index : Int
end_index : Int
operands : Array[FragmentOperandLayout]
} derive(
Debug
)

#
SequenceFragmentLayout::new

fn SequenceFragmentLayout::new(fragment_type : String, condition : String?, bbox : Box?, start_index : Int, end_index : Int, operands : Array[FragmentOperandLayout]) -> SequenceFragmentLayout

#
SequenceFragmentModel

pub struct SequenceFragmentModel {
fragment_type : String
condition : String?
bbox : Box?
start_index : Int
end_index : Int
operands : Array[FragmentOperandModel]
} derive(
Debug
)

Immutable sequence fragment

#
SequenceFragmentModel::new

fn SequenceFragmentModel::new(fragment_type : String, start_index : Int, end_index : Int) -> SequenceFragmentModel

#
ShapeType

pub(all) enum ShapeType {
Rectangle
Square
Circle
Oval
Diamond
Hexagon
Parallelogram
Cylinder
Queue
Package
Step
Callout
StoredData
Person
Cloud
Page
Document
Class
SqlTable
Text
Code
Image
SequenceDiagram
Octagon
C4Person
C4Container
} derive(Eq,
Debug
)

All supported shape types

#
ShapeType::default_aspect_ratio

fn ShapeType::default_aspect_ratio(self : ShapeType) -> Double

Get the default aspect ratio for the shape (width / height)

#
ShapeType::from_string

fn ShapeType::from_string(s : String) -> ShapeType

Parse a shape type from a string

#
ShapeType::has_inside_label

fn ShapeType::has_inside_label(self : ShapeType) -> Bool

Check if this shape renders its label inside the shape

#
ShapeType::is_3d_shape

fn ShapeType::is_3d_shape(self : ShapeType) -> Bool

Check if this shape needs special 3D rendering

#
ShapeType::is_container

fn ShapeType::is_container(self : ShapeType) -> Bool

Check if this shape is a container type (can have structured children)

#
ShapeType::is_text_only

fn ShapeType::is_text_only(self : ShapeType) -> Bool

Check if this shape is a text-only type (no border)

#
ShapeType::to_shape_string

fn ShapeType::to_shape_string(self : ShapeType) -> String

Convert shape type to canonical string representation

#
StepInput

pub struct StepInput {
name : String
graph : GraphInput
} derive(
Debug
)

#
StepInput::new

fn StepInput::new(name : String, graph : GraphInput) -> StepInput

#
StepModel

pub struct StepModel {
name : String
graph : GraphModel
} derive(
Debug
)

#
StyleInput

pub struct StyleInput {
opacity : StyleValue?
stroke : StyleValue?
fill : StyleValue?
stroke_width : StyleValue?
stroke_dash : StyleValue?
border_radius : StyleValue?
shadow : StyleValue?
three_d : StyleValue?
multiple : StyleValue?
font : StyleValue?
font_size : StyleValue?
font_color : StyleValue?
bold : StyleValue?
italic : StyleValue?
underline : StyleValue?
animated : StyleValue?
filled : StyleValue?
double_border : StyleValue?
text_transform : StyleValue?
font_family : StyleValue?
fill_pattern : StyleValue?
sketch : StyleValue?
curved : StyleValue?
} derive(Eq,
Debug
)

#
StyleInput::from_model

fn StyleInput::from_model(style : StyleModel) -> StyleInput

#
StyleInput::from_parts

fn StyleInput::from_parts(opacity : StyleValue?, stroke : StyleValue?, fill : StyleValue?, stroke_width : StyleValue?, stroke_dash : StyleValue?, border_radius : StyleValue?, shadow : StyleValue?, three_d : StyleValue?, multiple : StyleValue?, font : StyleValue?, font_size : StyleValue?, font_color : StyleValue?, bold : StyleValue?, italic : StyleValue?, underline : StyleValue?, animated : StyleValue?, filled : StyleValue?, double_border : StyleValue?, text_transform : StyleValue?, font_family : StyleValue?, fill_pattern : StyleValue?, sketch : StyleValue?, curved : StyleValue?) -> StyleInput

#
StyleInput::new

fn StyleInput::new() -> StyleInput

#
StyleModel

pub struct StyleModel {
opacity : StyleValue?
stroke : StyleValue?
fill : StyleValue?
stroke_width : StyleValue?
stroke_dash : StyleValue?
border_radius : StyleValue?
shadow : StyleValue?
three_d : StyleValue?
multiple : StyleValue?
font : StyleValue?
font_size : StyleValue?
font_color : StyleValue?
bold : StyleValue?
italic : StyleValue?
underline : StyleValue?
animated : StyleValue?
filled : StyleValue?
double_border : StyleValue?
text_transform : StyleValue?
font_family : StyleValue?
fill_pattern : StyleValue?
sketch : StyleValue?
curved : StyleValue?
} derive(Eq,
Debug
)

Immutable style model

#
StyleModel::new

fn StyleModel::new() -> StyleModel

#
StyleValue

pub struct StyleValue {
value : String
range :
Range

} derive(Eq,
Debug
)

A style value with its source range.

The value is preserved as a string. Consumers may parse it as needed.

#
StyleValue::as_bool

fn StyleValue::as_bool(self : StyleValue) -> Bool?

#
StyleValue::as_double

fn StyleValue::as_double(self : StyleValue) -> Double?

#
StyleValue::as_int

fn StyleValue::as_int(self : StyleValue) -> Int?

#
StyleValue::from_bool

fn StyleValue::from_bool(value : Bool) -> StyleValue

#
StyleValue::from_bool_opt

fn StyleValue::from_bool_opt(value : Bool?) -> StyleValue?

#
StyleValue::from_double

fn StyleValue::from_double(value : Double) -> StyleValue

#
StyleValue::from_double_opt

fn StyleValue::from_double_opt(value : Double?) -> StyleValue?

#
StyleValue::from_int

fn StyleValue::from_int(value : Int) -> StyleValue

#
StyleValue::from_int_opt

fn StyleValue::from_int_opt(value : Int?) -> StyleValue?

#
StyleValue::from_string

fn StyleValue::from_string(value : String) -> StyleValue

#
StyleValue::from_string_opt

fn StyleValue::from_string_opt(value : String?) -> StyleValue?

#
StyleValue::get_range

#
StyleValue::get_value

fn StyleValue::get_value(self : StyleValue) -> String

#
StyleValue::new

fn StyleValue::new(value : String, range :
Range
) -> StyleValue

#
StyleValue::synthetic

fn StyleValue::synthetic(value : String) -> StyleValue

Create a style value without a concrete source location.

#
Waypoint

pub struct Waypoint {
x : Double
y : Double
control : (Double, Double)?
} derive(
Debug
)

A waypoint along an edge route

#
Waypoint::new

fn Waypoint::new(x : Double, y : Double) -> Waypoint

Create a simple waypoint

#
Waypoint::to_point

fn Waypoint::to_point(self : Waypoint) -> Point

Convert waypoint to Point

#
Waypoint::with_control

fn Waypoint::with_control(x : Double, y : Double, cx : Double, cy : Double) -> Waypoint

Create a waypoint with a bezier control point

#
apply_layout

fn apply_layout(graph : GraphInput, patch : LayoutPatch) -> GraphInput

#
display_key_segment

fn display_key_segment(segment : String) -> String

#
split_syntax_path

fn split_syntax_path(id : String) -> Array[String]

#
syntax_path_depth

fn syntax_path_depth(id : String) -> Int

#
syntax_path_last

fn syntax_path_last(id : String) -> String

#
syntax_path_last_display

fn syntax_path_last_display(id : String) -> String