/** \file
* LPE <lattice> implementation
*/
/*
* Authors:
* Johan Engelen <j.b.c.engelen@utwente.nl>
* Steren Giannini
* No� Falzon
* Victor Navez
*
* Copyright (C) 2007-2008 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "live_effects/lpe-lattice.h"
#include "sp-shape.h"
#include "sp-item.h"
#include "sp-path.h"
#include "desktop.h" // TODO: should be factored out (see below)
using namespace Geom;
namespace Inkscape {
namespace LivePathEffect {
// initialise your parameters here:
{
// register all your parameters here, so Inkscape knows which parameters this effect has:
apply_to_clippath_and_mask = true;
}
LPELattice::~LPELattice()
{
}
{
//Initialisation of the sb2
}
//Grouping the point params in a convenient vector
handles[0] = &grid_point0;
//numbering is based on 4 rectangles.
//This is the offset from the Upperleft point
//Special action for corners
}
// i = Upperleft corner of the considerated rectangle
// corner = actual corner of the rectangle
// origin = Upperleft point
}
}
}
}
}
B -= origin;
B*= 1/width;
//Here comes the magic
}
return output;
}
void
{
}
void
{
// place the 16 control points
}
/**
void
LPELattice::addHelperPathsImpl(SPLPEItem *lpeitem, SPDesktop *desktop)
{
SPCurve *c = new SPCurve ();
c->moveto(grid_point0);
c->lineto(grid_point4);
c->lineto(grid_point5);
c->lineto(grid_point1);
c->moveto(grid_point8);
c->lineto(grid_point12);
c->lineto(grid_point13);
c->lineto(grid_point9);
c->moveto(grid_point10);
c->lineto(grid_point14);
c->lineto(grid_point15);
c->lineto(grid_point11);
c->moveto(grid_point2);
c->lineto(grid_point6);
c->lineto(grid_point7);
c->lineto(grid_point3);
c->moveto(grid_point0);
c->lineto(grid_point8);
c->lineto(grid_point10);
c->lineto(grid_point2);
c->moveto(grid_point4);
c->lineto(grid_point12);
c->lineto(grid_point14);
c->lineto(grid_point6);
c->moveto(grid_point5);
c->lineto(grid_point13);
c->lineto(grid_point15);
c->lineto(grid_point7);
c->moveto(grid_point1);
c->lineto(grid_point9);
c->lineto(grid_point11);
c->lineto(grid_point3);
// TODO: factor this out (and remove the #include of desktop.h above)
SPCanvasItem *canvasitem = sp_nodepath_generate_helperpath(desktop, c, lpeitem, 0x009000ff);
Inkscape::Display::TemporaryItem* tmpitem = desktop->add_temporary_canvasitem (canvasitem, 0);
lpeitem->lpe_helperpaths.push_back(tmpitem);
c->unref();
}
**/
/* ######################## */
} //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 :