Logo Search packages:      
Sourcecode: inkscape version File versions

SnapManager Class Reference

#include <snap.h>

List of all members.


Detailed Description

Class to coordinate snapping operations.

Each SPNamedView has one of these. It offers methods to snap points to whatever snappers are defined (e.g. grid, guides etc.). It also allows callers to snap points which have undergone some transformation (e.g. translation, scaling etc.)

Definition at line 39 of file snap.h.


Public Types

typedef std::list< const
Inkscape::Snapper * > 
SnapperList

Public Member Functions

Inkscape::SnappedPoint constrainedSnap (Inkscape::Snapper::PointType t, NR::Point const &p, Inkscape::Snapper::ConstraintLine const &c, std::list< SPItem const * > const &it) const
Inkscape::SnappedPoint constrainedSnap (Inkscape::Snapper::PointType t, NR::Point const &p, Inkscape::Snapper::ConstraintLine const &c, SPItem const *it) const
std::pair< NR::scale, bool > constrainedSnapScale (Inkscape::Snapper::PointType t, std::vector< NR::Point > const &p, std::list< SPItem const * > const &it, Inkscape::Snapper::ConstraintLine const &c, NR::scale const &s, NR::Point const &o) const
std::pair< NR::Point, bool > constrainedSnapTranslation (Inkscape::Snapper::PointType t, std::vector< NR::Point > const &p, std::list< SPItem const * > const &it, Inkscape::Snapper::ConstraintLine const &c, NR::Point const &tr) const
Inkscape::SnappedPoint freeSnap (Inkscape::Snapper::PointType t, NR::Point const &p, std::list< SPItem const * > const &it) const
Inkscape::SnappedPoint freeSnap (Inkscape::Snapper::PointType t, NR::Point const &p, SPItem const *it) const
std::pair< NR::scale, bool > freeSnapScale (Inkscape::Snapper::PointType t, std::vector< NR::Point > const &p, std::list< SPItem const * > const &it, NR::scale const &s, NR::Point const &o) const
std::pair< NR::Coord, bool > freeSnapSkew (Inkscape::Snapper::PointType t, std::vector< NR::Point > const &p, std::list< SPItem const * > const &it, NR::Coord const &s, NR::Point const &o, NR::Dim2 d) const
std::pair< NR::Coord, bool > freeSnapStretch (Inkscape::Snapper::PointType t, std::vector< NR::Point > const &p, std::list< SPItem const * > const &it, NR::Coord const &s, NR::Point const &o, NR::Dim2 d, bool uniform) const
std::pair< NR::Point, bool > freeSnapTranslation (Inkscape::Snapper::PointType t, std::vector< NR::Point > const &p, std::list< SPItem const * > const &it, NR::Point const &tr) const
SnapperList getSnappers () const
 SnapManager (SPNamedView const *v)
bool willSnapSomething () const

Public Attributes

Inkscape::AxonomGridSnapper axonomgrid
 axonometricgrid snapper
Inkscape::GridSnapper grid
 grid snapper
SnapperList gridSnappers
 List of grid snappers to enable multiple grids.
Inkscape::GuideSnapper guide
 guide snapper
Inkscape::ObjectSnapper object
 snapper to other objects

Protected Attributes

SPNamedView const * _named_view

Private Types

enum  Transformation { TRANSLATION, SCALE, STRETCH, SKEW }

Private Member Functions

std::pair< NR::Point, bool > _snapTransformed (Inkscape::Snapper::PointType type, std::vector< NR::Point > const &points, std::list< SPItem const * > const &ignore, bool constrained, Inkscape::Snapper::ConstraintLine const &constraint, Transformation transformation_type, NR::Point const &transformation, NR::Point const &origin, NR::Dim2 dim, bool uniform) const

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index