moonrockz/diagrams-svg/architecture-layout

Types

Connection

pub(all) struct Connection {
  connection : @moonrockz/diagrams/architecture.Connection
  points : ReadOnlyArray[Point]
  label_box : Rect?
} 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 {
  code : String
  message : String
  element : 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(all) struct Geometry {
  model : @moonrockz/diagrams/architecture.Architecture
  shapes : ReadOnlyArray[Shape]
  connections : ReadOnlyArray[Connection]
  width : Int
  height : Int
} 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

Kind

pub(all) enum Kind {
  Group
  Service
  Junction
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Kind::equal

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

Source

Kind::not_equal

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

Source

Kind::to_repr

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

Source

LayoutResult

pub(all) struct LayoutResult {
  geometry : Geometry?
  diagnostics : ReadOnlyArray[@moonrockz/diagrams.Diagnostic]
}

Source

Limits

pub struct Limits {
  nodes : Int
  edges : Int
  depth : Int
  work : Int
  coordinate : 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, depth? : Int, work? : Int, coordinate? : 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 : Int
  y : Int
} 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 : Int
  y : Int
  width : Int
  height : Int
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Rect::contains

fn Rect::contains(self : Rect, other : Rect) -> 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

Shape

pub(all) struct Shape {
  id : String
  kind : Kind
  box : Rect
  label : String
  parent : String?
  font_size : Int
  header_height : Int
} 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

Values

check

fn check(geometry : Geometry, palette? : @moonrockz/diagrams-svg/theme.Palette, work_limit? : Int) -> ReadOnlyArray[Finding]

Source

layout

fn layout(model : @moonrockz/diagrams/architecture.Architecture, limits? : Limits) -> LayoutResult

Source

measure

fn measure(text : String, size? : Int) -> Int

Source