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 40 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, bool const &first_point, std::vector< NR::Point > &points_to_snap, 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, NR::scale const &s, NR::Point const &o) const
std::pair< NR::Coord, bool > constrainedSnapStretch (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 > 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, bool const &first_point, std::vector< NR::Point > &points_to_snap, 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::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 getGridSnappers () const
bool getIncludeItemCenter () const
bool getSnapEnabledGlobally () const
bool getSnapIntersectionGG ()
bool getSnapIntersectionLS ()
bool getSnapModeBBox () const
bool getSnapModeGuide () const
bool getSnapModeNode () const
SnapperList getSnappers () const
Inkscape::SnappedPoint guideSnap (NR::Point const &p, Inkscape::ObjectSnapper::DimensionToSnap const snap_dim) const
Inkscape::SnappedPoint guideSnap (NR::Point const &p, NR::Point const &guide_normal) const
void setIncludeItemCenter (bool enabled)
void setSnapEnabledGlobally (bool enabled)
void setSnapIntersectionGG (bool enabled)
void setSnapIntersectionLS (bool enabled)
void setSnapModeBBox (bool enabled)
void setSnapModeGuide (bool enabled)
void setSnapModeNode (bool enabled)
 SnapManager (SPNamedView const *v)
bool SomeSnapperMightSnap () const
void toggleSnapEnabledGlobally ()

Public Attributes

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
Inkscape::SnappedPoint findBestSnap (NR::Point const &p, SnappedConstraints &sc, bool constrained) const

Private Attributes

bool _include_item_center
bool _intersectionGG
bool _intersectionLS
bool _snap_enabled_globally

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

Generated by  Doxygen 1.6.0   Back to index