Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

snap.cpp File Reference


Detailed Description

Various snapping methods.

Todo:
Circular snap, path snap?

Definition in file snap.cpp.

#include <algorithm>
#include <math.h>
#include <list>
#include <utility>
#include "sp-guide.h"
#include "sp-namedview.h"
#include "snap.h"
#include "geom.h"
#include <libnr/nr-point-fns.h>
#include <libnr/nr-scale.h>
#include <libnr/nr-scale-ops.h>
#include <libnr/nr-values.h>

Go to the source code of this file.

Functions

NR::Coord namedview_dim_snap (SPNamedView const *nv, Snapper::PointType t, NR::Point &req, NR::Dim2 const dim)
NR::Coord namedview_dim_snap_all_types (SPNamedView const *nv, NR::Point &req, NR::Dim2 const dim)
std::pair< NR::Coord, bool > namedview_dim_snap_list (SPNamedView const *nv, Snapper::PointType t, const std::vector< NR::Point > &p, NR::Coord const dx, NR::Dim2 const dim)
std::pair< double, bool > namedview_dim_snap_list_scale (SPNamedView const *nv, Snapper::PointType t, const std::vector< NR::Point > &p, NR::Point const &norm, double const sx, NR::Dim2 dim)
double namedview_dim_snap_list_skew (SPNamedView const *nv, Snapper::PointType t, const std::vector< NR::Point > &p, NR::Point const &norm, double const sx, NR::Dim2 const dim)
NR::Coord namedview_free_snap (SPNamedView const *nv, Snapper::PointType t, NR::Point &req)
NR::Coord namedview_free_snap_all_types (SPNamedView const *nv, NR::Point &req)
static std::list< const Snapper * > namedview_get_snappers (SPNamedView const *nv)
NR::Coord namedview_vector_snap (SPNamedView const *nv, Snapper::PointType t, NR::Point &req, NR::Point const &d)
NR::Coord namedview_vector_snap_all_types (SPNamedView const *nv, NR::Point &req, NR::Point const &d)
std::pair< double, bool > namedview_vector_snap_list (SPNamedView const *nv, Snapper::PointType t, const std::vector< NR::Point > &p, NR::Point const &norm, NR::scale const &s)
static bool namedview_will_snap_something (SPNamedView const *nv)
static double round_to_nearest_multiple_plus (double x, double const c1, double const c0)

Variables

static const double MIN_DIST_NORM = 1.0
 Minimal distance to norm before point is considered for snap.


Generated by  Doxygen 1.6.0   Back to index