/*
7 * Created by fred on Fri Dec 05 2003.
8 * tweaked endlessly by bulia byak <buliabyak@users.sf.net>
10 * Copyright (C) 2018 Authors
11 * Released under GNU GPL v2+, read the file
'COPYING' for more information.
27 auto dest = std::make_unique<Path>();
28 dest->LoadPathVector(pathv);
62 if (doTransformation) {
79 if (
auto path = cast<SPPath>(
item)) {
81 }
else if (
auto shape = cast<SPShape>(
item)) {
83 }
else if (is<SPText>(
item) || is<SPFlowtext>(
item)) {
85 }
else if (
auto image = cast<SPImage>(
item)) {
98 if (
auto shape = cast<SPShape>(
item)) {
100 }
else if (is<SPText>(
item) || is<SPFlowtext>(
item)) {
102 }
else if (
auto image = cast<SPImage>(
item)) {
125std::optional<Geom::PathVector>
intersect_clips(std::optional<Geom::PathVector> &&a, std::optional<Geom::PathVector> &&b)
127 if (!a)
return std::move(b);
128 if (!b)
return std::move(a);
129 if (a->empty())
return std::move(a);
130 if (b->empty())
return std::move(b);
TODO: insert short description here.
Two-dimensional point that doubles as a vector.
Path and its polyline approximation.
cut_position PointToCurvilignPosition(Geom::Point const &pos, unsigned seg=0) const
void PointAt(int piece, double at, Geom::Point &pos)
Base class for visual SVG elements.
Geom::Affine i2doc_affine() const
Returns the accumulated transformation of the item and all its ancestors, including root's viewport.
auto ptr_to_opt(T const &p)
Create a std::optional<T> from a (generalised) pointer to T.
std::unique_ptr< Magick::Image > image
Geom::PathVector sp_pathvector_boolop(Geom::PathVector const &pathva, Geom::PathVector const &pathvb, BooleanOp bop, FillRule fra, FillRule frb)
Perform a boolean operation on two pathvectors.
Geom::Point get_point_on_Path(Path *path, int piece, double t)
Gets the point at a particular time in a particular piece in a path description.
std::optional< Geom::PathVector > curve_for_item(SPItem *item)
Gets an SPCurve from the SPItem.
std::optional< Path::cut_position > get_nearest_position_on_Path(Path *path, Geom::Point p, unsigned seg)
Get the nearest position given a Livarot Path and a point.
std::unique_ptr< Path > Path_for_pathvector(Geom::PathVector const &pathv)
Creates a Livarot Path object from the Geom::PathVector.
std::unique_ptr< Path > Path_for_item_before_LPE(SPItem *item, bool doTransformation, bool transformFull)
Creates a Livarot Path object from the SPItem.
std::optional< Geom::PathVector > intersect_clips(std::optional< Geom::PathVector > &&a, std::optional< Geom::PathVector > &&b)
Intersect two clips, treating empty optionals as no clip.
std::optional< Geom::PathVector > curve_for_item_before_LPE(SPItem *item)
Gets an SPCurve from the SPItem before any LPE.
Geom::PathVector pathvector_for_curve(SPItem *item, Geom::PathVector const &curve, bool doTransformation, bool transformFull)
Gets a Geom::PathVector from the SPCurve object.
std::unique_ptr< Path > Path_for_item(SPItem *item, bool doTransformation, bool transformFull)
Creates a Livarot Path object from an SPItem.
TODO: insert short description here.
SVG <image> implementation.
Text::Layout const * te_get_layout(SPItem const *item)