[][src]Crate kurbo

A garden of data structures for manipulating 2D shapes and curves.

The kurbo library contains data structures and algorithms for curves and vector paths. It is probably most appropriate for creative tools, but is general enough it might be useful for other applications.

Modules

affine

Affine transforms.

arc

A circle arc.

bezpath

Bézier paths (up to cubic).

circle

Implementation of circle shape.

common

Common mathematical operations

cubicbez

Cubic Bézier segments.

insets

A description of the distances between the edges of two rectangles.

line

Lines.

param_curve

A trait for curves parametrized by a scalar.

point

A 2d point.

quadbez

Quadratic Bézier segments.

rect

A rectangle.

rounded_rect

A rectangle with rounded corners.

shape

A generic trait for shapes.

size

A 2d size.

translate_scale

A transformation that includes both scale and translation.

vec2

A simple 2D vector.

Structs

Affine

A 2D affine transform.

Arc

A single arc segment.

BezPath

A path that can Bézier segments up to cubic, possibly with multiple subpaths.

Circle

A circle.

ConstPoint

A trivial "curve" that is just a constant.

CubicBez

A single cubic Bézier segment.

Insets

Insets from the edges of a rectangle.

Line

A single line.

Point

A 2d point.

QuadBez

A single quadratic Bézier segment.

Rect

A rectangle.

RoundedRect

A rectangle with equally rounded corners.

Size

A 2d size.

TranslateScale

A transformation including scaling and translation.

Vec2

A 2D vector.

Enums

PathEl

The element of a Bézier path.

PathSeg

A segment of a Bézier path.

Constants

MAX_BEZ_PATH
MAX_EXTREMA

The maximum number of extrema that can be reported in the ParamCurveExtrema trait.

Traits

ParamCurve

A curve parametrized by a scalar.

ParamCurveArclen

A parametrized curve that can have its arc length measured.

ParamCurveArea

A parametrized curve that can have its signed area measured.

ParamCurveCurvature

A parametrized curve that reports its curvature.

ParamCurveDeriv

A differentiable parametrized curve.

ParamCurveExtrema

A parametrized curve that reports its extrema.

ParamCurveNearest

A parametrized curve that reports the nearest point.

Shape

A generic trait for open and closed shapes.

Type Definitions

PathElArray