path-manipulator.h revision 5049dd33573bc5b0bf07823e92db5cc44b3938bf
/** @file
* Path manipulator - a component that edits a single path on-canvas
*/
/* Authors:
* Krzysztof KosiĆski <tweenk.pl@gmail.com>
*
* Copyright (C) 2009 Authors
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#ifndef SEEN_UI_TOOL_PATH_MANIPULATOR_H
#define SEEN_UI_TOOL_PATH_MANIPULATOR_H
#include <string>
#include <memory>
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
#include "ui/tool/manipulator.h"
#include "live_effects/lpe-bspline.h"
struct SPCanvasItem;
struct PathSharedData {
};
/**
* Manipulator that edits a single path using nodes with handles.
* Currently only cubic bezier and linear segments are supported, but this might change
* some time in the future.
*/
~PathManipulator();
bool empty();
void writeXML();
void clear(); // remove all nodes from manipulator
void selectSubpaths();
void invertSelectionInSubpaths();
void insertNodes();
void duplicateNodes();
void weldSegments();
void breakNodes();
void deleteNodes(bool keep_shape = true);
void deleteSegments();
void reverseSubpaths(bool selected_only);
void setSegmentType(SegmentType);
void showOutline(bool show);
void showHandles(bool show);
void showPathDirection(bool show);
void setLiveOutline(bool set);
void setLiveObjects(bool set);
void updateHandles();
void hideDragPoint();
bool search_unselected, bool closest);
bool isBSpline;
int BSplineGetSteps();
// this is necessary for Tab-selection in MultiPathManipulator
static bool is_item_type(void *item);
void _createControlPointsFromGeometry();
void BSpline();
double BSplineHandlePosition(Handle *h);
void BSplineNodeHandlesReposition(Node *n);
void _createGeometryFromControlPoints(bool alert_LPE = false);
void _updateOutline();
//void _setOutline(Geom::PathVector const &);
void _getGeometry();
void _setGeometry();
void _handleGrabbed();
void _handleUngrabbed();
void _externalChange(unsigned type);
void _removeNodesFromSelection();
void _updateOutlineOnZoomChange();
double _getStrokeTolerance();
unsigned _num_selected; ///< number of selected nodes
bool _show_handles;
bool _show_outline;
bool _show_path_direction;
bool _live_outline;
bool _live_objects;
};
} // namespace UI
} // namespace Inkscape
#endif
/*
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:fileencoding=utf-8:textwidth=99 :