meld_core library

Classes

Alignment
BlockTransport
CubicPath
Cubic path points are packed as x/y pairs: p0, c1, c2, p1, ...
CubicSource
A normalized cubic source, useful for font adapters and precomputed assets. Set paintStyle to MeldSourcePaintStyle.fill for compound contours such as font glyphs; the default keeps generic geometry as an outline source.
GeometryNode
GeometrySource
Structured SVG geometry. Attributes are immutable and intentionally mirror the small, portable subset used by icon packages. paintStyle is explicit because the node model does not carry a CSS cascade.
MeldCacheStats
MeldEngine
Pure, reusable planner with bounded source and plan caches.
MeldFrame
MeldPlan
MeldPlanItem
MeldSource
MeldSpring
Deterministic damped spring over a normalized progress value.
MeldViewBox
MorphSnapshot
PathDataSource
Raw SVG d data. The parser accepts all SVG path commands supported by Meld and preserves the original text for canonical endpoint rendering. Because d does not contain paint attributes, paintStyle is explicit and defaults to an outline source.
PlanDiagnostics
SampledPath
SamplingConfig
Similarity
SpringConfig
SvgMarkupSource
SVG markup source.

Enums

MeldInterpolationStrategy
MeldMotionMode
MeldSourcePaintStyle
Describes the visual intent carried by a source when a widget uses its original paint mode.
SpringPreset

Constants

kappa → const double
kMeldMaxCoordinate → const double
Maximum absolute coordinate accepted at a public geometry boundary.
kMeldMaxCubicSegments → const int
Hard limits applied at public geometry boundaries.
kMeldMaxSamplePoints → const int
kMeldMaxSpringParameter → const double
Maximum spring parameter accepted by the deterministic integrator.

Functions

adaptiveSampleCount(List<CubicPath> paths, SamplingConfig config) int
alignPair(Float64List a, Float64List b, {bool closedA = false, bool closedB = false}) Alignment
allocateOutputs(MeldPlan plan) List<Float64List>
arcLength(CubicPath path) double
buildPlan(List<SampledPath> source, List<SampledPath> target, {bool cacheHit = false}) MeldPlan
canonicalPathData(MeldSource source) String
centroid(Float64List points) → (double, double)
detectCorners(CubicPath path, [double threshold = math.pi / 8]) List<int>
fitViewBox(MeldSource source, MeldViewBox viewBox, {double grid = 24}) MeldSource
iconToCubics(MeldSource source) List<CubicPath>
interpolatePlan(MeldPlan plan, double progress, List<Float64List> output, {MeldInterpolationStrategy strategy = MeldInterpolationStrategy.polar}) → void
parsePath(String data) List<RawSubpath>
Parses SVG path data into absolute raw segments with shorthand commands expanded. The normalizer intentionally owns conversion to cubic paths.
polylineLength(Float64List points) double
procrustes(Float64List a, Float64List b, (double, double) centerA, (double, double) centerB) Similarity
resampleIcon(MeldSource source, [SamplingConfig config = const SamplingConfig()]) List<SampledPath>
resamplePath(CubicPath path, int count, {double cornerThreshold = math.pi / 8}) Float64List
reversePoints(Float64List points) Float64List
rotatePoints(Float64List points, int offset) Float64List
sampledPathData(List<Float64List> paths, List<bool> closed) String
samplingErrorEstimate(List<CubicPath> paths, int sampleCount) double
Estimates normalized geometric error left by a fixed sample budget. The value is a conservative control-polygon excess divided by the square of the sample count, so diagnostics can explain adaptive decisions.
springPreset(SpringPreset preset) SpringConfig

Exceptions / Errors

MeldException
A structured failure from the parser, normalizer or planner.