6c3e745a94ef6b25a4ef9f018d350a7535aa45afTed Gould/** @file
6c3e745a94ef6b25a4ef9f018d350a7535aa45afTed Gould * @brief Minimal LPE effect, see lpe-skeleton.cpp.
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm */
6c3e745a94ef6b25a4ef9f018d350a7535aa45afTed Gould/* Authors:
3cfad782faf34c654ec837780ed7b3fe95e82c2eJohan B. C. Engelen * Johan Engelen <j.b.c.engelen@alumnus.utwente.nl>
4357e8a64445a757c6dd3d3f61b7cb15587bf3fecilix *
3cfad782faf34c654ec837780ed7b3fe95e82c2eJohan B. C. Engelen * Copyright (C) 2007-2012 Authors
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm *
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm * Released under GNU GPL, read the file 'COPYING' for more information
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm */
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
6c3e745a94ef6b25a4ef9f018d350a7535aa45afTed Gould#ifndef INKSCAPE_LPE_SKELETON_H
6c3e745a94ef6b25a4ef9f018d350a7535aa45afTed Gould#define INKSCAPE_LPE_SKELETON_H
6c3e745a94ef6b25a4ef9f018d350a7535aa45afTed Gould
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm#include "live_effects/effect.h"
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm#include "live_effects/parameter/parameter.h"
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmnamespace Inkscape {
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmnamespace LivePathEffect {
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
3cfad782faf34c654ec837780ed7b3fe95e82c2eJohan B. C. Engelen// each knotholder handle for your LPE requires a separate class derived from LPEKnotHolderEntity;
3cfad782faf34c654ec837780ed7b3fe95e82c2eJohan B. C. Engelen// define it in lpe-skeleton.cpp and add code to create it in addKnotHolderEntities
3cfad782faf34c654ec837780ed7b3fe95e82c2eJohan B. C. Engelen// note that the LPE parameter classes implement their own handles! So in most cases, you will
3cfad782faf34c654ec837780ed7b3fe95e82c2eJohan B. C. Engelen// not have to do anything like this.
bf09820d782b89c56d79f070d06d7cf2682c270ecilix/**
bf09820d782b89c56d79f070d06d7cf2682c270ecilixnamespace Skeleton {
bf09820d782b89c56d79f070d06d7cf2682c270ecilix // we need a separate namespace to avoid clashes with other LPEs
bf09820d782b89c56d79f070d06d7cf2682c270ecilix class KnotHolderEntityMyHandle;
bf09820d782b89c56d79f070d06d7cf2682c270ecilix}
bf09820d782b89c56d79f070d06d7cf2682c270ecilix**/
bf09820d782b89c56d79f070d06d7cf2682c270ecilix
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmclass LPESkeleton : public Effect {
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmpublic:
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm LPESkeleton(LivePathEffectObject *lpeobject);
62d835b4bbb0f1f046e30d9b67f8e9517cc6175cjohanengelen virtual ~LPESkeleton();
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm// Choose to implement one of the doEffect functions. You can delete or comment out the others.
62d835b4bbb0f1f046e30d9b67f8e9517cc6175cjohanengelen// virtual void doEffect (SPCurve * curve);
76addc201c409e81eaaa73fe27cc0f79c4db097cKrzysztof Kosiński// virtual Geom::PathVector doEffect_path (Geom::PathVector const &path_in);
76addc201c409e81eaaa73fe27cc0f79c4db097cKrzysztof Kosiński virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const &pwd2_in);
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
3cfad782faf34c654ec837780ed7b3fe95e82c2eJohan B. C. Engelen /* the knotholder entity classes (if any) can be declared friends */
bf09820d782b89c56d79f070d06d7cf2682c270ecilix //friend class Skeleton::KnotHolderEntityMyHandle;
3cfad782faf34c654ec837780ed7b3fe95e82c2eJohan B. C. Engelen //virtual void addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item);
bf09820d782b89c56d79f070d06d7cf2682c270ecilix
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmprivate:
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm // add the parameters for your effect here:
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm ScalarParam number;
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm // there are all kinds of parameters. Check the /live_effects/parameter directory which types exist!
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm LPESkeleton(const LPESkeleton&);
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm LPESkeleton& operator=(const LPESkeleton&);
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm};
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm} //namespace LivePathEffect
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm} //namespace Inkscape
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm#endif
02b211d5ad0015f24b09dee846a89cf19e95f98dcilix
02b211d5ad0015f24b09dee846a89cf19e95f98dcilix/*
02b211d5ad0015f24b09dee846a89cf19e95f98dcilix Local Variables:
02b211d5ad0015f24b09dee846a89cf19e95f98dcilix mode:c++
02b211d5ad0015f24b09dee846a89cf19e95f98dcilix c-file-style:"stroustrup"
02b211d5ad0015f24b09dee846a89cf19e95f98dcilix c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
02b211d5ad0015f24b09dee846a89cf19e95f98dcilix indent-tabs-mode:nil
02b211d5ad0015f24b09dee846a89cf19e95f98dcilix fill-column:99
02b211d5ad0015f24b09dee846a89cf19e95f98dcilix End:
02b211d5ad0015f24b09dee846a89cf19e95f98dcilix*/
a4030d5ca449e7e384bc699cd249ee704faaeab0Chris Morgan// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :