17#include <glibmm/i18n.h>
23namespace LivePathEffect {
35 end_type(_(
"End type:"), _(
"Determines on which side the line or line segment is infinite."),
"end_type",
EndTypeConverter, &wr, this,
END_OPEN_BOTH)
57 std::optional<Geom::LineSegment> intersection_segment =
Geom::Line(
A,
B).
clip(dummyRect);
59 if (!intersection_segment) {
60 g_warning (
"Possible error - no intersection with limiting bounding box.");
65 A = intersection_segment->initialPoint();
69 B = intersection_segment->finalPoint();
Infinite line on a plane.
std::optional< LineSegment > clip(Rect const &r) const
Return the portion of the line that is inside the given rectangle.
void push_back(Path const &path)
Append a path at the end.
Point finalPoint() const
Get the last point in the last path of the vector.
Point initialPoint() const
Get the first point in the first path of the vector.
Sequence of contiguous curves, aka spline.
void appendNew(Args &&... args)
Append a new curve to the path.
Axis aligned, non-empty rectangle.
void registerParameter(Parameter *param)
void doBeforeEffect(SPLPEItem const *lpeitem) override
Is performed each time before the effect is updated.
~LPELineSegment() override
Geom::PathVector doEffect_path(Geom::PathVector const &path_in) override
EnumParam< EndType > end_type
LPELineSegment(LivePathEffectObject *lpeobject)
Simplified management of enumerations of svg items with UI labels.
LPE <line_segment> implementation.
static const Util::EnumDataConverter< EndType > EndTypeConverter(EndTypeData, sizeof(EndTypeData)/sizeof(*EndTypeData))
static const Util::EnumData< EndType > EndTypeData[]
Helper class to stream background task notifications as a series of messages.
Base class for live path effect items.
Simplified management of enumerations of svg items with UI labels.