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)

Source

Connection::equal

fn Connection::equal(Connection, Connection) -> Bool

Source

Connection::not_equal

fn Connection::not_equal(x : Connection, y : Connection) -> Bool

Source

Connection::to_repr

fn Connection::to_repr(Connection) -> @moonbitlang/core/debug.Repr

Source

Finding

pub struct Finding {
  rule : Rule
  identities : ReadOnlyArray[String]
  message : String
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Finding::equal

fn Finding::equal(Finding, Finding) -> Bool

Source

Finding::not_equal

fn Finding::not_equal(x : Finding, y : Finding) -> Bool

Source

Finding::to_repr

fn Finding::to_repr(Finding) -> @moonbitlang/core/debug.Repr

Source

Geometry

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)

Source

Geometry::equal

fn Geometry::equal(Geometry, Geometry) -> Bool

Source

Geometry::not_equal

fn Geometry::not_equal(x : Geometry, y : Geometry) -> Bool

Source

Geometry::to_repr

fn Geometry::to_repr(Geometry) -> @moonbitlang/core/debug.Repr

Source

Label

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)

Source

Label::equal

fn Label::equal(Label, Label) -> Bool

Source

Label::not_equal

fn Label::not_equal(x : Label, y : Label) -> Bool

Source

Label::to_repr

fn Label::to_repr(Label) -> @moonbitlang/core/debug.Repr

Source

Limits

pub struct Limits {
  nodes : Int
  edges : Int
  work : Int
  output_units : Int
  minimum_approach : Double
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Limits::equal

fn Limits::equal(Limits, Limits) -> Bool

Source

Limits::new

fn Limits::new(nodes? : Int, edges? : Int, work? : Int, output_units? : Int, minimum_approach? : Double) -> Limits

Source

Limits::not_equal

fn Limits::not_equal(x : Limits, y : Limits) -> Bool

Source

Limits::to_repr

fn Limits::to_repr(Limits) -> @moonbitlang/core/debug.Repr

Source

Limits::with_minimum_approach

fn Limits::with_minimum_approach(self : Limits, minimum_approach : Double) -> Limits

Retain resource limits while selecting the marked terminal reservation.

Source

Point

pub(all) struct Point {
  x : Double
  y : Double
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Point::equal

fn Point::equal(Point, Point) -> Bool

Source

Point::not_equal

fn Point::not_equal(x : Point, y : Point) -> Bool

Source

Point::to_repr

fn Point::to_repr(Point) -> @moonbitlang/core/debug.Repr

Source

Rect

pub(all) struct Rect {
  x : Double
  y : Double
  width : Double
  height : Double
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Rect::contains

fn Rect::contains(self : Rect, other : Rect, tolerance? : Double) -> Bool

Source

Rect::equal

fn Rect::equal(Rect, Rect) -> Bool

Source

Rect::not_equal

fn Rect::not_equal(x : Rect, y : Rect) -> Bool

Source

Rect::overlaps

fn Rect::overlaps(self : Rect, other : Rect) -> Bool

Source

Rect::to_repr

fn Rect::to_repr(Rect) -> @moonbitlang/core/debug.Repr

Source

Result

pub struct Result {
  geometry : Geometry?
  diagnostics : ReadOnlyArray[@moonrockz/diagrams.Diagnostic]
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Result::equal

fn Result::equal(Result, Result) -> Bool

Source

Result::not_equal

fn Result::not_equal(x : Result, y : Result) -> Bool

Source

Result::to_repr

fn Result::to_repr(Result) -> @moonbitlang/core/debug.Repr

Source

Rule

pub(all) enum Rule {
  Overlap
  Fit
  Size
  Contrast
  Containment
  Attachment
  Endpoint
  Limit
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Rule::equal

fn Rule::equal(Rule, Rule) -> Bool

Source

Rule::not_equal

fn Rule::not_equal(x : Rule, y : Rule) -> Bool

Source

Rule::to_repr

fn Rule::to_repr(Rule) -> @moonbitlang/core/debug.Repr

Source

Shape

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)

Source

Shape::equal

fn Shape::equal(Shape, Shape) -> Bool

Source

Shape::not_equal

fn Shape::not_equal(x : Shape, y : Shape) -> Bool

Source

Shape::to_repr

fn Shape::to_repr(Shape) -> @moonbitlang/core/debug.Repr

Source

Source

pub(all) enum Source {
  Supplied
  Automatic
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Source::equal

fn Source::equal(Source, Source) -> Bool

Source

Source::not_equal

fn Source::not_equal(x : Source, y : Source) -> Bool

Source

Source::to_repr

fn Source::to_repr(Source) -> @moonbitlang/core/debug.Repr

Source

Values

activity

fn activity(kind : @moonrockz/diagrams/bpmn.NodeKind) -> Bool

Source

bpmn_palette

fn bpmn_palette(p : @moonrockz/diagrams-svg/theme.Palette) -> @moonrockz/diagrams-svg/theme.Palette

Preserve family hues while checking text against opaque canvas and the actual coloured body. Sequence palette values are unchanged.

Source

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.

Source

family

fn family(kind : @moonrockz/diagrams/bpmn.NodeKind) -> @moonrockz/diagrams-svg/theme.Family

Source

layout

fn layout(view : @moonrockz/diagrams/bpmn.Bpmn, policy? : @moonrockz/diagrams/bpmn.GeometryPolicy, limits? : Limits) -> Result

Use all supplied coordinates or compute a complete view. Invalid supplied values never become a partial fallback. Automatic explicitly ignores DI.

Source

midpoint

fn midpoint(line : ArrayView[Point]) -> Point?

Half the polyline's measured length, rather than its middle vertex.

Source

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.

Source