moonrockz/diagrams-svg/bpmn-layout
Types
Connection
pub struct Connection {
flow : @moonrockz/diagrams/bpmn.Flow
index : Int
source : String
target : String
points : ReadOnlyArray[@moonrockz/diagrams/bpmn.ExactPoint]
line : ReadOnlyArray[Point]
label : Label?
} derive(Eq, @moonbitlang/core/debug.Debug)Connection::equal
fn Connection::equal(Connection, Connection) -> BoolConnection::not_equal
fn Connection::not_equal(x : Connection, y : Connection) -> BoolConnection::to_repr
fn Connection::to_repr(Connection) -> @moonbitlang/core/debug.ReprFinding
pub struct Finding {
rule : Rule
identities : ReadOnlyArray[String]
message : String
} derive(Eq, @moonbitlang/core/debug.Debug)Finding::equal
fn Finding::equal(Finding, Finding) -> BoolFinding::not_equal
fn Finding::not_equal(x : Finding, y : Finding) -> BoolFinding::to_repr
fn Finding::to_repr(Finding) -> @moonbitlang/core/debug.ReprGeometry
pub struct Geometry {
view : @moonrockz/diagrams/bpmn.Bpmn
shapes : ReadOnlyArray[Shape]
connections : ReadOnlyArray[Connection]
source : Source
translate_x : Int64
translate_y : Int64
width : Int64
height : Int64
} derive(Eq, @moonbitlang/core/debug.Debug)Geometry::equal
fn Geometry::equal(Geometry, Geometry) -> BoolGeometry::not_equal
fn Geometry::not_equal(x : Geometry, y : Geometry) -> BoolGeometry::to_repr
fn Geometry::to_repr(Geometry) -> @moonbitlang/core/debug.ReprLabel
pub struct Label {
text : String
font : @moonrockz/diagrams/bpmn.Font
bounds : @moonrockz/diagrams/bpmn.ExactBounds?
box : Rect
size : Double
weight : Int
rotation : Int
mask : Bool
owner : String
family : @moonrockz/diagrams-svg/theme.Family?
} derive(Eq, @moonbitlang/core/debug.Debug)Label::equal
fn Label::equal(Label, Label) -> BoolLabel::not_equal
fn Label::not_equal(x : Label, y : Label) -> BoolLabel::to_repr
fn Label::to_repr(Label) -> @moonbitlang/core/debug.ReprLimits
pub struct Limits {
nodes : Int
edges : Int
work : Int
output_units : Int
minimum_approach : Double
} derive(Eq, @moonbitlang/core/debug.Debug)Limits::equal
fn Limits::equal(Limits, Limits) -> BoolLimits::new
fn Limits::new(nodes? : Int, edges? : Int, work? : Int, output_units? : Int, minimum_approach? : Double) -> LimitsLimits::not_equal
fn Limits::not_equal(x : Limits, y : Limits) -> BoolLimits::to_repr
fn Limits::to_repr(Limits) -> @moonbitlang/core/debug.ReprLimits::with_minimum_approach
fn Limits::with_minimum_approach(self : Limits, minimum_approach : Double) -> LimitsRetain resource limits while selecting the marked terminal reservation.
Point
pub(all) struct Point {
x : Double
y : Double
} derive(Eq, @moonbitlang/core/debug.Debug)Point::equal
fn Point::equal(Point, Point) -> BoolPoint::not_equal
fn Point::not_equal(x : Point, y : Point) -> BoolPoint::to_repr
fn Point::to_repr(Point) -> @moonbitlang/core/debug.ReprRect
pub(all) struct Rect {
x : Double
y : Double
width : Double
height : Double
} derive(Eq, @moonbitlang/core/debug.Debug)Rect::contains
fn Rect::contains(self : Rect, other : Rect, tolerance? : Double) -> BoolRect::equal
fn Rect::equal(Rect, Rect) -> BoolRect::not_equal
fn Rect::not_equal(x : Rect, y : Rect) -> BoolRect::overlaps
fn Rect::overlaps(self : Rect, other : Rect) -> BoolRect::to_repr
fn Rect::to_repr(Rect) -> @moonbitlang/core/debug.ReprResult
pub struct Result {
geometry : Geometry?
diagnostics : ReadOnlyArray[@moonrockz/diagrams.Diagnostic]
} derive(Eq, @moonbitlang/core/debug.Debug)Result::equal
fn Result::equal(Result, Result) -> BoolResult::not_equal
fn Result::not_equal(x : Result, y : Result) -> BoolResult::to_repr
fn Result::to_repr(Result) -> @moonbitlang/core/debug.ReprRule
pub(all) enum Rule {
Overlap
Fit
Size
Contrast
Containment
Attachment
Endpoint
Limit
} derive(Eq, @moonbitlang/core/debug.Debug)Rule::equal
fn Rule::equal(Rule, Rule) -> BoolRule::not_equal
fn Rule::not_equal(x : Rule, y : Rule) -> BoolRule::to_repr
fn Rule::to_repr(Rule) -> @moonbitlang/core/debug.ReprShape
pub struct Shape {
node : @moonrockz/diagrams/bpmn.Node
index : Int
bounds : @moonrockz/diagrams/bpmn.ExactBounds
box : Rect
label : Label?
} derive(Eq, @moonbitlang/core/debug.Debug)Shape::equal
fn Shape::equal(Shape, Shape) -> BoolShape::not_equal
fn Shape::not_equal(x : Shape, y : Shape) -> BoolShape::to_repr
fn Shape::to_repr(Shape) -> @moonbitlang/core/debug.ReprSource
pub(all) enum Source {
Supplied
Automatic
} derive(Eq, @moonbitlang/core/debug.Debug)Source::equal
fn Source::equal(Source, Source) -> BoolSource::not_equal
fn Source::not_equal(x : Source, y : Source) -> BoolSource::to_repr
fn Source::to_repr(Source) -> @moonbitlang/core/debug.ReprValues
activity
fn activity(kind : @moonrockz/diagrams/bpmn.NodeKind) -> Boolbpmn_palette
fn bpmn_palette(p : @moonrockz/diagrams-svg/theme.Palette) -> @moonrockz/diagrams-svg/theme.PalettePreserve family hues while checking text against opaque canvas and the actual coloured body. Sequence palette values are unchanged.
check
fn check(geometry : Geometry, palette : @moonrockz/diagrams-svg/theme.Palette, work_limit? : Int) -> ReadOnlyArray[Finding]Read-only findings never move supplied geometry. Search exhaustion is an explicit finding rather than a silently incomplete legibility result.
family
fn family(kind : @moonrockz/diagrams/bpmn.NodeKind) -> @moonrockz/diagrams-svg/theme.Familylayout
fn layout(view : @moonrockz/diagrams/bpmn.Bpmn, policy? : @moonrockz/diagrams/bpmn.GeometryPolicy, limits? : Limits) -> ResultUse all supplied coordinates or compute a complete view. Invalid supplied values never become a partial fallback. Automatic explicitly ignores DI.
midpoint
fn midpoint(line : ArrayView[Point]) -> Point?Half the polyline's measured length, rather than its middle vertex.
svg_number
fn svg_number(value : Double) -> String?Canonical derived SVG numbers have at most three fractional digits. Authored supplied coordinates bypass this formatter and keep their exact tokens.