1.1.2
by Martin Pitt
Import upstream version 0.44 |
1 |
#ifndef SEEN_GUIDE_SNAPPER_H
|
2 |
#define SEEN_GUIDE_SNAPPER_H
|
|
3 |
||
4 |
/**
|
|
5 |
* \file guide-snapper.h
|
|
6 |
* \brief Snapping things to guides.
|
|
7 |
*
|
|
8 |
* Authors:
|
|
9 |
* Lauris Kaplinski <lauris@kaplinski.com>
|
|
10 |
* Frank Felfe <innerspace@iname.com>
|
|
11 |
* Carl Hetherington <inkscape@carlh.net>
|
|
12 |
*
|
|
1.1.8
by Kees Cook
Import upstream version 0.47~pre0 |
13 |
* Copyright (C) 1999-2002 Authors
|
1.1.2
by Martin Pitt
Import upstream version 0.44 |
14 |
*
|
15 |
* Released under GNU GPL, read the file 'COPYING' for more information
|
|
16 |
*/
|
|
17 |
||
1.1.6
by Kees Cook
Import upstream version 0.46~pre1 |
18 |
#include "line-snapper.h" |
1.1.2
by Martin Pitt
Import upstream version 0.44 |
19 |
|
20 |
struct SPNamedView; |
|
21 |
||
22 |
namespace Inkscape |
|
23 |
{
|
|
24 |
||
25 |
/// Snap to guides
|
|
26 |
class GuideSnapper : public LineSnapper |
|
27 |
{
|
|
28 |
public: |
|
1.1.8
by Kees Cook
Import upstream version 0.47~pre0 |
29 |
GuideSnapper(SnapManager *sm, Geom::Coord const d); |
1.1.6
by Kees Cook
Import upstream version 0.46~pre1 |
30 |
bool ThisSnapperMightSnap() const; |
1.1.2
by Martin Pitt
Import upstream version 0.44 |
31 |
|
1.1.8
by Kees Cook
Import upstream version 0.47~pre0 |
32 |
Geom::Coord getSnapperTolerance() const; //returns the tolerance of the snapper in screen pixels (i.e. independent of zoom) |
33 |
bool getSnapperAlwaysSnap() const; //if true, then the snapper will always snap, regardless of its tolerance |
|
34 |
||
1.1.2
by Martin Pitt
Import upstream version 0.44 |
35 |
private: |
1.1.8
by Kees Cook
Import upstream version 0.47~pre0 |
36 |
LineList _getSnapLines(Geom::Point const &p) const; |
37 |
void _addSnappedLine(SnappedConstraints &sc, Geom::Point const snapped_point, Geom::Coord const snapped_distance, SnapSourceType const &source, Geom::Point const normal_to_line, Geom::Point const point_on_line) const; |
|
38 |
void _addSnappedPoint(SnappedConstraints &sc, Geom::Point const snapped_point, Geom::Coord const snapped_distance, SnapSourceType const &source) const; |
|
1.1.2
by Martin Pitt
Import upstream version 0.44 |
39 |
};
|
40 |
||
41 |
}
|
|
42 |
||
43 |
#endif
|
|
44 |
||
45 |
||
46 |
||
47 |
/*
|
|
48 |
Local Variables:
|
|
49 |
mode:c++
|
|
50 |
c-file-style:"stroustrup"
|
|
51 |
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
|
|
52 |
indent-tabs-mode:nil
|
|
53 |
fill-column:99
|
|
54 |
End:
|
|
55 |
*/
|
|
56 |
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
|