line_helper library

Functions

adaptivePathToPoints(Path path, double maxTolerance) List<Offset>
Converts a path into a list of points with adaptive spacing.
calculateCentralAngle(GlobeCoordinates start, GlobeCoordinates end) double
Calculates the central angle between two points on a sphere.
calculateCurvature(Tangent currentTangent, PathMetric pathMetric, double distance, double step) double
Calculates the curvature at a given distance along the path.
drawAnimatedLine(Canvas canvas, AnimatedPointConnection connection, double radius, double rotationY, double rotationZ, double animationValue, Size size, Offset? hoverPoint) Map?
Draws an animated line on the canvas connecting two points on a sphere.
findCurveSphereIntersection(Path path, Offset center, double radius, double maxTolerance, bool firstIntersection) Offset?
Finds the intersection point between a curved path and a sphere.
getDrawPercentage(Path path, Offset intersection, {bool first = true}) double
Calculates the draw percentage of the path up to the given intersection point.
getPathLengthsUpToIntersection(Path path, Offset intersection) List<double>
Calculates the lengths of the path up to the given intersection point.
refineIntersection(Offset start, Offset end, Offset center, double radius) Offset
Refines the intersection point between a line segment and a sphere.