lpe-copy_rotate.cpp revision b8502defa91647a317b285046a49546612f66e6d
0N/A#include "live_effects/lpe-copy_rotate.h"
0N/A#include "sp-shape.h"
0N/A#include "knot-holder-entity.h"
0N/A#include "knotholder.h"
0N/Anamespace LivePathEffect {
0N/A starting_angle(_("Starting:"), _("Angle of the first copy"), "starting_angle", &wr, this, 0.0),
0N/A rotation_angle(_("Rotation angle:"), _("Angle between two successive copies"), "rotation_angle", &wr, this, 30.0),
0N/A num_copies(_("Number of copies:"), _("Number of copies of the original path"), "num_copies", &wr, this, 5),
0N/A origin(_("Origin"), _("Origin of the rotation"), "origin", &wr, this, "Adjust the origin of the rotation"),
0N/A show_orig_path = true;
0N/A _provides_knotholder_entities = true;
0N/A rot_pos = origin + dir * Rotate(-deg_to_rad(starting_angle + rotation_angle)) * dist_angle_handle;
0N/A for (int i = 0; i < num_copies; ++i) {
0N/ALPECopyRotate::addCanvasIndicators(SPLPEItem */*lpeitem*/, std::vector<Geom::PathVector> &hp_vec)
0N/Avoid LPECopyRotate::addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) {
0N/AKnotHolderEntityStartingAngle::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, guint state)
0N/A // FIXME: this should not directly ask for updating the item. It should write to SVG, which triggers updating.
0N/AKnotHolderEntityRotationAngle::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, guint state)
0N/A lpe->rotation_angle.param_set_value(rad_to_deg(-angle_between(lpe->dir, s - lpe->origin)) - lpe->starting_angle);