/** \file
* LPE "Transform through 2 points" implementation
*/
/*
* Authors:
* Jabier Arraiza Cenoz<jabier.arraiza@marker.es>
*
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include <gtkmm.h>
#include "live_effects/lpe-transform_2pts.h"
#include "sp-path.h"
#include "ui/icon-names.h"
#include "verbs.h"
// TODO due to internal breakage in glibmm headers, this must be last:
namespace Inkscape {
namespace LivePathEffect {
elastic(_("Elastic"), _("Elastic transform mode"), "elastic", &wr, this, false,"", INKSCAPE_ICON("on"), INKSCAPE_ICON("off")),
from_original_width(_("From original width"), _("From original width"), "from_original_width", &wr, this, false,"", INKSCAPE_ICON("on"), INKSCAPE_ICON("off")),
lock_lenght(_("Lock length"), _("Lock length to current distance"), "lock_lenght", &wr, this, false,"", INKSCAPE_ICON("on"), INKSCAPE_ICON("off")),
lock_angle(_("Lock angle"), _("Lock angle"), "lock_angle", &wr, this, false,"", INKSCAPE_ICON("on"), INKSCAPE_ICON("off")),
flip_horizontal(_("Flip horizontal"), _("Flip horizontal"), "flip_horizontal", &wr, this, false,"", INKSCAPE_ICON("on"), INKSCAPE_ICON("off")),
flip_vertical(_("Flip vertical"), _("Flip vertical"), "flip_vertical", &wr, this, false,"", INKSCAPE_ICON("on"), INKSCAPE_ICON("off")),
from_original_width_toggler(false),
pathvector(),
append_path(false),
previous_lenght(-1)
{
first_knot.param_make_integer(true);
first_knot.param_overwrite_widget(true);
last_knot.param_make_integer(true);
last_knot.param_overwrite_widget(true);
apply_to_clippath_and_mask = true;
}
{
}
void
{
using namespace Geom;
if (sp_path) {
}
if(!pathvector.empty()) {
}
}
}
void
{
using namespace Geom;
if (sp_path) {
}
reset();
}
append_path = false;
from_original_width.param_setValue(false);
} else {
append_path = false;
}
}
if(previous_start == start){
}
}
if(lock_lenght || lock_angle ) {
}
}
void
{
if (sp_path) {
}
if(pathvector.empty()) {
return;
}
if(!from_original_width) {
}
}
//todo migrate to PathVector class?
{
size_t n = 0;
n += it->size_closed();
}
return n;
}
//todo migrate to PathVector class?
{
size_t n = 0;
if(index == n) {
return curve_it->initialPoint();
}
n++;
}
}
}
//todo migrate to PathVector class? Not used
{
size_t n = 0;
if(index == n) {
return *pv_it;
}
n++;
}
}
}
void
{
} else {
}
}
{
// use manage here, because after deletion of Effect object, others might
// still be pointing to this widget.
vbox->set_homogeneous(false);
if ((*it)->widget_is_visible) {
Inkscape::UI::Widget::Scalar *registered_widget = Gtk::manage(dynamic_cast<Inkscape::UI::Widget::Scalar *>(widg));
registered_widget->signal_value_changed().connect(sigc::mem_fun(*this, &LPETransform2Pts::updateIndex));
if (widg) {
if (tip) {
} else {
widg->set_has_tooltip(false);
}
}
if (widg) {
if (tip) {
} else {
widg->set_has_tooltip(false);
}
}
if (widg) {
if (tip) {
} else {
widg->set_has_tooltip(false);
}
}
if (widg) {
if (tip) {
} else {
widg->set_has_tooltip(false);
}
}
} else if (widg) {
if (tip) {
} else {
widg->set_has_tooltip(false);
}
}
}
++it;
}
}
{
if(flip_horizontal && flip_vertical){
} else if(flip_vertical){
} else if(flip_horizontal){
}
if(strech != 1){
}
if(elastic) {
if(sca > 1){
} else {
}
} else {
}
helper *= m;
if(flip_horizontal){
}
if(offset != 0){
}
return output;
}
void
LPETransform2Pts::addCanvasIndicators(SPLPEItem const */*lpeitem*/, std::vector<Geom::PathVector> &hp_vec)
{
using namespace Geom;
double r = helper_size*.1;
if(lock_lenght || lock_angle ) {
char const * svgd;
svgd = "M -5.39,8.78 -9.13,5.29 -10.38,10.28 Z M -7.22,7.07 -3.43,3.37 m -1.95,-12.16 -3.74,3.5 -1.26,-5 z m -1.83,1.71 3.78,3.7 M 5.24,8.78 8.98,5.29 10.24,10.28 Z M 7.07,7.07 3.29,3.37 M 5.24,-8.78 l 3.74,3.5 1.26,-5 z M 7.07,-7.07 3.29,-3.37";
}
if(!lock_angle && lock_lenght) {
char const * svgd;
svgd = "m 7.07,7.07 c -3.9,3.91 -10.24,3.91 -14.14,0 -3.91,-3.9 -3.91,-10.24 0,-14.14 3.9,-3.91 10.24,-3.91 14.14,0 l -2.83,-4.24 -0.7,2.12";
}
}
/* ######################## */
} //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 :