lpe-copy_rotate.cpp revision 9e973c4fb2183b877bb600a7e9c75e93b3e7d6d1
#define INKSCAPE_LPE_COPY_ROTATE_CPP
/** \file
* LPE <copy_rotate> implementation
*/
/*
* Authors:
* Maximilian Albert
*
* Copyright (C) Johan Engelen 2007 <j.b.c.engelen@utwente.nl>
* Copyright (C) Maximilian Albert 2008 <maximilian.albert@gmail.com>
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "live_effects/lpe-copy_rotate.h"
#include "sp-shape.h"
namespace Inkscape {
namespace LivePathEffect {
namespace CR {
class KnotHolderEntityAngle : public KnotHolderEntity
{
public:
virtual bool isLPEParam() { return true; }
};
} // namespace CR
num_copies(_("Number of copies"), _("Number of copies of the original path"), "num_copies", &wr, this, 1),
origin(_("Origin"), _("Origin of the rotation"), "origin", &wr, this, "Adjust the origin of the rotation"),
dist_angle_handle(100)
{
show_orig_path = true;
// register all your parameters here, so Inkscape knows which parameters this effect has:
num_copies.param_make_integer(true);
}
{
}
void
{
origin.param_setValue(A);
dir = unit_vector(B - A);
dist_angle_handle = L2(B - A);
}
{
using namespace Geom;
A = pwd2_in.firstValue();
dir = unit_vector(B - A);
if (include_original) {
}
for (int i = 1; i <= num_copies; ++i) {
// I first suspected the minus sign to be a bug in 2geom but it is
// likely due to SVG's choice of coordinate system orientation (max)
}
return output;
}
namespace CR {
using namespace Geom;
// TODO: make this more generic
static LPECopyRotate *
{
g_print ("Warning: Effect is not of type LPECopyRotate!\n");
return NULL;
}
return static_cast<LPECopyRotate *>(effect);
}
void
{
// I first suspected the minus sign to be a bug in 2geom but it is
// likely due to SVG's choice of coordinate system orientation (max)
if (state & GDK_SHIFT_MASK) {
} else {
}
// FIXME: this should not directly ask for updating the item. It should write to SVG, which triggers updating.
}
{
// I first suspected the minus sign to be a bug in 2geom but it is
// likely due to SVG's choice of coordinate system orientation (max)
}
} // namespace CR
/* ######################## */
} //namespace LivePathEffect
} /* namespace Inkscape */
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :