14#ifndef SEEN_DISPLAY_CURVE_H
15#define SEEN_DISPLAY_CURVE_H
92 return p ? std::make_optional(*p) : std::nullopt;
Abstract continuous curve on a plane defined on [0,1].
Sequence of contiguous curves, aka spline.
Two-dimensional point that doubles as a vector.
Axis aligned, non-empty rectangle.
void pathvector_append(Geom::PathVector &to, Geom::PathVector const &pathv, bool use_lineto=false)
Append pathv to to.
void backspace(Geom::PathVector &pathv)
Remove last segment of curve.
size_t node_count(Geom::PathVector const &pathv)
returns the number of nodes in a path, used for statusbar text when selecting an spcurve.
void move_endpoints(Geom::PathVector &pathv, Geom::Point const &new_p0, Geom::Point const &new_p1)
Sets start of first path to new_p0, and end of first path to new_p1.
Geom::Curve const * get_last_segment(Geom::PathVector const &pathv)
Return last pathsegment (possibly the closing path segment) of the last path in PathVector or null.
bool pathvector_append_continuous(Geom::PathVector &to, Geom::PathVector const &pathv, double tolerance=0.0625)
Append pathv to to with possible fusing of close endpoints.
void stretch_endpoints(Geom::PathVector &pathv, Geom::Point const &new_p0, Geom::Point const &new_p1)
?
Geom::Path path_from_curve(std::unique_ptr< Geom::Curve > curve)
Construct an open Geom::Path from Geom::Curve. Fixme: Should be in 2geom.
Geom::Path rect_to_open_path(Geom::Rect const &rect)
Construct an open path from a rectangle.
auto ptr_to_opt(T const &p)
Create a std::optional<T> from a (generalised) pointer to T.
Geom::Curve const * get_first_segment(Geom::PathVector const &pathv)
Return first pathsegment in PathVector or NULL.
void closepath_current(Geom::Path &path)
Close path by setting the end point to the start point instead of adding a new lineto.
void last_point_additive_move(Geom::PathVector &pathv, Geom::Point const &p)
Add p to the last point (and last handle if present) of the last path.
bool is_closed(Geom::PathVector const &pathv)
Whether all subpaths are closed. Returns false if the curve is empty.
PathVector - a sequence of subpaths.