lpe-bspline.cpp revision 0eb901542f27cf3da83eee31aef31b630871091a
/*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gtkmm.h>
#if WITH_GLIBMM_2_32
#endif
#include <glib.h>
#include "helper/geom-curves.h"
#include "live_effects/lpe-bspline.h"
#include "live_effects/lpeobject.h"
#include "live_effects/parameter/parameter.h"
#include "sp-path.h"
#include "style.h"
#include "document-private.h"
#include "document.h"
#include "document-undo.h"
#include "verbs.h"
#include "sp-lpe-item.h"
#include "sp-namedview.h"
#include "display/sp-canvas.h"
#include <typeinfo>
#include <vector>
// For handling un-continuous paths:
#include "message-stack.h"
#include "inkscape.h"
using Inkscape::DocumentUndo;
namespace Inkscape {
namespace LivePathEffect {
const double handleCubicGap = 0.01;
const double noPower = 0.0;
const double defaultStartPower = 0.3334;
const double defaultEndPower = 0.6667;
// initialise your parameters here:
//testpointA(_("Test Point A"), _("Test A"), "ptA", &wr, this,
//Geom::Point(100,100)),
onlySelected(_("Change only selected nodes"), _("Change only selected nodes"), "onlySelected", &wr, this, false),
weight(_("Change weight:"), _("Change weight of the effect"), "weight", &wr, this, defaultStartPower)
{
}
LPEBSpline::~LPEBSpline() {}
{
}
}
{
if (!SP_IS_SHAPE(lpeitem)) {
g_warning("LPE BSpline can only be applied to shapes (not groups).");
item->removeCurrentPathEffect(false);
}
}
{
return;
}
// Make copy of old path as it is changed during processing
double radiusHelperNodes = 6.0;
continue;
// if the path is closed, maybe we have to stop a bit earlier because the
// closing line segment has zerolength.
// Geom::LineSegment.
// closingline.isDegenerate() did not work, because it only checks for
// *exact* zero length, which goes wrong for relative coordinates and
// rounding errors...
// the closing line segment has zero-length. So stop before that one!
}
}
while (curve_it1 != curve_endit) {
if (cubic) {
} else {
}
} else {
}
} else {
}
delete in;
if ( curve_it2 != curve_endit ) {
if (cubic) {
} else {
}
} else {
}
delete out;
}
if (cubic) {
} else {
}
delete start;
if (cubic) {
} else {
}
delete end;
lineHelper->reset();
delete lineHelper;
} else if ( curve_it2 == curve_endit) {
} else {
lineHelper->reset();
delete lineHelper;
previousNode = node;
if((cubic && are_near((*cubic)[0],(*cubic)[1])) || (cubic2 && are_near((*cubic2)[2],(*cubic2)[3]))) {
}
}
}
++curve_it1;
++curve_it2;
}
//y cerramos la curva
}
delete nCurve;
}
if(showHelper){
}
}
void
{
char const * svgd = "M 1,0.5 A 0.5,0.5 0 0 1 0.5,1 0.5,0.5 0 0 1 0,0.5 0.5,0.5 0 0 1 0.5,0 0.5,0.5 0 0 1 1,0.5 Z";
}
void
LPEBSpline::addCanvasIndicators(SPLPEItem const */*lpeitem*/, std::vector<Geom::PathVector> &hp_vec)
{
}
{
// use manage here, because after deletion of Effect object, others might
// still be pointing to this widget.
if ((*it)->widget_is_visible) {
}
if (widg) {
}
}
}
}
if (widg) {
if (tip) {
} else {
widg->set_has_tooltip(false);
}
}
}
++it;
}
}
void LPEBSpline::toDefaultWeight()
{
}
void LPEBSpline::toMakeCusp()
{
}
void LPEBSpline::toWeight()
{
}
{
if(path){
}
}
{
using Geom::X;
using Geom::Y;
return;
// Make copy of old path as it is changed during processing
continue;
}
// if the path is closed, maybe we have to stop a bit earlier because the
// closing line segment has zerolength.
// Geom::LineSegment.
// closingline.isDegenerate() did not work, because it only checks for
// *exact* zero length, which goes wrong for relative coordinates and
// rounding errors...
// the closing line segment has zero-length. So stop before that one!
}
}
while (curve_it1 != curve_endit) {
if (!onlySelected) {
if (cubic) {
if (weightValue != noPower) {
pointAt1 =
}
} else {
}
if (weightValue != noPower) {
pointAt2 =
}
} else {
}
} else {
if (weightValue != noPower) {
pointAt1 =
}
if (weightValue != noPower) {
pointAt2 =
}
} else {
}
}
} else {
if (cubic) {
if (isNodePointSelected(pointAt0)) {
if (weightValue != noPower) {
pointAt1 =
}
} else {
}
} else {
}
if (isNodePointSelected(pointAt3)) {
if (weightValue != noPower) {
pointAt2 =
}
} else {
}
} else {
}
} else {
if (isNodePointSelected(pointAt0)) {
pointAt1 =
} else {
}
if (isNodePointSelected(pointAt3)) {
pointAt2 =
} else {
}
} else {
}
}
}
delete in;
++curve_it1;
++curve_it2;
}
} else {
}
}
delete nCurve;
}
}
}; //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 :