summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a590e49)
raw | patch | inline | side by side (parent: a590e49)
author | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Thu, 19 Apr 2007 20:06:28 +0000 (20:06 +0000) | ||
committer | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Thu, 19 Apr 2007 20:06:28 +0000 (20:06 +0000) |
diff --git a/src/guide-snapper.cpp b/src/guide-snapper.cpp
index 9fd13705c26cb2ff12ded4e823a534a69e3145fb..1e4eb02d835e49541de517e29900d7198587f292 100644 (file)
--- a/src/guide-snapper.cpp
+++ b/src/guide-snapper.cpp
{
LineList s;
- if ( NULL == _named_view || willSnapSomething() == false) {
+ if ( NULL == _named_view || ThisSnapperMightSnap() == false) {
return s;
}
/**
* \return true if this Snapper will snap at least one kind of point.
*/
-bool Inkscape::GuideSnapper::willSnapSomething() const
+bool Inkscape::GuideSnapper::ThisSnapperMightSnap() const
{
return _named_view == NULL ? false : (_enabled && _snap_to != 0 && _named_view->showguides);
}
diff --git a/src/guide-snapper.h b/src/guide-snapper.h
index 37ea08701db1238316dbe13464fb3cf52aeb25cf..15f484711623325a6477b54ddb028db6c3154dd6 100644 (file)
--- a/src/guide-snapper.h
+++ b/src/guide-snapper.h
public:
GuideSnapper(SPNamedView const *nv, NR::Coord const d);
- bool willSnapSomething() const;
+ bool ThisSnapperMightSnap() const;
private:
LineList _getSnapLines(NR::Point const &p) const;
diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp
index e39d398b1d80be7db5a8a203d15c5e93ae64db34..d63376e14bffc9840d475ce77dcb47eb70da0048 100644 (file)
--- a/src/object-snapper.cpp
+++ b/src/object-snapper.cpp
std::list<SPItem const *> const &it,
NR::Point const &p) const
{
- if (willSnapSomething()) {
+ if (ThisSnapperMightSnap()) {
SPDesktop const *desktop = SP_ACTIVE_DESKTOP;
for (SPObject* o = sp_object_first_child(r); o != NULL; o = SP_OBJECT_NEXT(o)) {
if (SP_IS_ITEM(o) && !SP_ITEM(o)->isLocked() && !desktop->itemIsHidden(SP_ITEM(o))) {
@@ -186,7 +186,7 @@ Inkscape::SnappedPoint Inkscape::ObjectSnapper::_doConstrainedSnap(NR::Point con
/**
* \return true if this Snapper will snap at least one kind of point.
*/
-bool Inkscape::ObjectSnapper::willSnapSomething() const
+bool Inkscape::ObjectSnapper::ThisSnapperMightSnap() const
{
return (_enabled && _snap_to != 0 && (_snap_to_paths || _snap_to_nodes));
}
diff --git a/src/object-snapper.h b/src/object-snapper.h
index f9c7a9817b7a3d1064578cfd822f0905b358295f..47ac14545aa6885f92b268a6feb2bae119843c9e 100644 (file)
--- a/src/object-snapper.h
+++ b/src/object-snapper.h
return _snap_to_paths;
}
- bool willSnapSomething() const;
+ bool ThisSnapperMightSnap() const;
private:
SnappedPoint _doFreeSnap(NR::Point const &p,
diff --git a/src/seltrans.cpp b/src/seltrans.cpp
index 82632d45693b65d416534dc79f7f545a6a8f2080..cfc784dac6c24e19def0abe7e01a1c1fa5f9cbdf 100644 (file)
--- a/src/seltrans.cpp
+++ b/src/seltrans.cpp
@@ -1342,7 +1342,7 @@ void Inkscape::SelTrans::stretch(SPSelTransHandle const &handle, NR::Point &pt,
NR::Point p1 = _approximate_bbox->min() * (NR::translate(-scale_origin) * NR::Matrix(s) * NR::translate(scale_origin));
NR::Point p2 = _approximate_bbox->max() * (NR::translate(-scale_origin) * NR::Matrix(s) * NR::translate(scale_origin));
- //Find the ones at the lower-left and upper-right, as required by get_scale_transform_with_stroke
+ //Find the corners at the lower-left and upper-right, as required by get_scale_transform_with_stroke
NR::Point new_bbox_min = NR::Point(std::min(p1[NR::X], p2[NR::X]), std::min(p1[NR::Y], p2[NR::Y]));
NR::Point new_bbox_max = NR::Point(std::max(p1[NR::X], p2[NR::X]), std::max(p1[NR::Y], p2[NR::Y]));
NR::Point p1 = _approximate_bbox->min() * (NR::translate(-_origin) * NR::Matrix(s) * NR::translate(_origin));
NR::Point p2 = _approximate_bbox->max() * (NR::translate(-_origin) * NR::Matrix(s) * NR::translate(_origin));
- //Find the ones at the lower-left and upper-right, as required by get_scale_transform_with_stroke
+ //Find the corners at the lower-left and upper-right, as required by get_scale_transform_with_stroke
NR::Point new_bbox_min = NR::Point(std::min(p1[NR::X], p2[NR::X]), std::min(p1[NR::Y], p2[NR::Y]));
NR::Point new_bbox_max = NR::Point(std::max(p1[NR::X], p2[NR::X]), std::max(p1[NR::Y], p2[NR::Y]));
diff --git a/src/snap.cpp b/src/snap.cpp
index b03b3f89d9a335936388c54a399641de1da93b2f..3dda92ecbcd73504c982a36737f9205cdc57a693 100644 (file)
--- a/src/snap.cpp
+++ b/src/snap.cpp
* \return true if one of the snappers will try to snap something.
*/
-bool SnapManager::willSnapSomething() const
+bool SnapManager::SomeSnapperMightSnap() const
{
SnapperList const s = getSnappers();
SnapperList::const_iterator i = s.begin();
- while (i != s.end() && (*i)->willSnapSomething() == false) {
+ while (i != s.end() && (*i)->ThisSnapperMightSnap() == false) {
i++;
}
*/
/* Quick check to see if we have any snappers that are enabled */
- if (willSnapSomething() == false) {
+ if (SomeSnapperMightSnap() == false) {
return std::make_pair(transformation, false);
}
diff --git a/src/snap.h b/src/snap.h
index 4185b051ab3a985f030de7884855fd0d4a44db26..e0217948fe3cfdb4b0f7a96b2841096512dd49c1 100644 (file)
--- a/src/snap.h
+++ b/src/snap.h
typedef std::list<const Inkscape::Snapper*> SnapperList;
- bool willSnapSomething() const;
+ bool SomeSnapperMightSnap() const;
Inkscape::SnappedPoint freeSnap(Inkscape::Snapper::PointType t,
NR::Point const &p,
diff --git a/src/snapper.h b/src/snapper.h
index 21e96b019e10820e87e25574c7a9ff5e4078f11d..25e345305e7e4a2bf0e199745a0fa7f2181dbc3e 100644 (file)
--- a/src/snapper.h
+++ b/src/snapper.h
/**
* \return true if this Snapper will snap at least one kind of point.
*/
- virtual bool willSnapSomething() const {return (_enabled && _snap_to != 0);} // will likely be overridden by derived classes
+ virtual bool ThisSnapperMightSnap() const {return (_enabled && _snap_to != 0);} // will likely be overridden by derived classes
void setEnabled(bool s);
diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp
index c3a1c58ad8b2da66da4d05b351568c48ccd13c3f..d8215eaa256707720dd5e22eb7891bd72252180c 100644 (file)
--- a/src/sp-namedview.cpp
+++ b/src/sp-namedview.cpp
@@ -233,7 +233,7 @@ static void sp_namedview_set(SPObject *object, unsigned int key, const gchar *va
}
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
break;
- case SP_ATTR_OBJECTTOLERANCE:
+ case SP_ATTR_OBJECTTOLERANCE:
nv->objecttoleranceunit = &px;
nv->objecttolerance = DEFAULTTOLERANCE;
if (value) {
@@ -314,7 +314,7 @@ static void sp_namedview_set(SPObject *object, unsigned int key, const gchar *va
nv->pageshadow = value? atoi(value) : 2; // 2 is the default
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
break;
- case SP_ATTR_SHOWPAGESHADOW:
+ case SP_ATTR_SHOWPAGESHADOW:
nv->showpageshadow = (value) ? sp_str_to_bool(value) : TRUE;
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
break;
@@ -346,36 +346,11 @@ static void sp_namedview_set(SPObject *object, unsigned int key, const gchar *va
nv->window_y = value ? atoi(value) : -1; // -1 means not set
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
break;
-/* case SP_ATTR_INKSCAPE_GRID_BBOX:
- nv->snap_manager.grid.setSnapTo(Inkscape::Snapper::BBOX_POINT, value ? sp_str_to_bool(value) : TRUE);
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
- break;
- case SP_ATTR_INKSCAPE_GRID_POINTS:
- nv->snap_manager.grid.setSnapTo(Inkscape::Snapper::SNAP_POINT, value ? sp_str_to_bool(value) : FALSE);
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
- break;
- case SP_ATTR_INKSCAPE_GUIDE_BBOX:
- nv->snap_manager.guide.setSnapTo(Inkscape::Snapper::BBOX_POINT, value ? sp_str_to_bool(value) : TRUE);
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
- break;
- case SP_ATTR_INKSCAPE_GUIDE_POINTS:
- nv->snap_manager.guide.setSnapTo(Inkscape::Snapper::SNAP_POINT, value ? sp_str_to_bool(value) : FALSE);
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
- break;
- case SP_ATTR_INKSCAPE_OBJECT_BBOX:
- nv->snap_manager.object.setSnapTo(Inkscape::Snapper::BBOX_POINT, (value) ? sp_str_to_bool(value) : FALSE);
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
- break;
- case SP_ATTR_INKSCAPE_OBJECT_POINTS:
- nv->snap_manager.object.setSnapTo(Inkscape::Snapper::SNAP_POINT, (value) ? sp_str_to_bool(value) : FALSE);
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
- break;
-*/
- case SP_ATTR_INKSCAPE_OBJECT_PATHS:
+ case SP_ATTR_INKSCAPE_OBJECT_PATHS:
nv->snap_manager.object.setSnapToPaths(value ? sp_str_to_bool(value) : FALSE);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
break;
- case SP_ATTR_INKSCAPE_OBJECT_NODES:
+ case SP_ATTR_INKSCAPE_OBJECT_NODES:
nv->snap_manager.object.setSnapToNodes(value ? sp_str_to_bool(value) : FALSE);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
break;
index af847149ec7386901cd467b04556162af46c678f..f84b1192071d4276df337c34392abd0e65343d29 100644 (file)
{
_page_snap.show();
-/* _rcbsnbo.init (_("_Snap bounding boxes to objects"),
- _("Snap the edges of the object bounding boxes to other objects"),
- "inkscape:object-bbox", _wr);
- _rcbsnnob.init (_("Snap nodes _to objects"),
- _("Snap the nodes of objects to other objects"),
- "inkscape:object-points", _wr);*/
_rcbsnop.init (_("Snap to object _paths"),
_("Snap to other object paths"),
"inkscape:object-paths", _wr);
_("Snapping distance, in screen pixels, for snapping to objects"),
_("If set, objects snap to the nearest object, regardless of distance"),
"objecttolerance", _wr);
-/* _rcbsnbb.init (_("Snap _bounding boxes to grid"),
- _("Snap the edges of the object bounding boxes"),
- "inkscape:grid-bbox", _wr);
- _rcbsnnod.init (_("Snap nodes to _grid"),
- _("Snap path nodes, text baselines, ellipse centers, etc."),
- "inkscape:grid-points", _wr);*/
_rsu_sn.init (_("Snap sens_itivity:"), _("Always snap"),
_("Snapping distance, in screen pixels, for snapping to grid"),
_("If set, objects snap to the nearest grid line, regardless of distance"),
"gridtolerance", _wr);
-/* _rcb_snpgui.init (_("Snap bounding boxes to g_uides"),
- _("Snap the edges of the object bounding boxes"),
- "inkscape:guide-bbox", _wr);
- _rcb_snbgui.init (_("Snap p_oints to guides"),
- _("Snap path nodes, text baselines, ellipse centers, etc."),
- "inkscape:guide-points", _wr);*/
_rsu_gusn.init (_("Snap sensiti_vity:"), _("Always snap"),
_("Snapping distance, in screen pixels, for snapping to guides"),
_("If set, objects snap to the nearest guide, regardless of distance"),
const Gtk::Widget* array[] =
{
label_o, 0,
-// 0, _rcbsnbo._button,
-// 0, _rcbsnnob._button,
0, _rcbsnop._button,
0, _rcbsnon._button,
0, _rsu_sno._vbox,
0, 0,
label_gr, 0,
-// 0, _rcbsnbb._button,
-// 0, _rcbsnnod._button,
0, _rsu_sn._vbox,
0, 0,
label_gu, 0,
-// 0, _rcb_snpgui._button,
-// 0, _rcb_snbgui._button,
0, _rsu_gusn._vbox,
};
_rcp_hgui.setRgba32 (nv->guidehicolor);
//-----------------------------------------------------------snap
- //_rcbsnbo.setActive (nv->snap_manager.object.getSnapTo(Inkscape::Snapper::BBOX_POINT));
- //_rcbsnnob.setActive (nv->snap_manager.object.getSnapTo(Inkscape::Snapper::SNAP_POINT));
_rcbsnop.setActive (nv->snap_manager.object.getSnapToPaths());
_rcbsnon.setActive (nv->snap_manager.object.getSnapToNodes());
_rsu_sno.setValue (nv->objecttolerance);
- //_rcbsnbb.setActive (nv->snap_manager.grid.getSnapTo(Inkscape::Snapper::BBOX_POINT));
- //_rcbsnnod.setActive (nv->snap_manager.grid.getSnapTo(Inkscape::Snapper::SNAP_POINT));
_rsu_sn.setValue (nv->gridtolerance);
- //_rcb_snpgui.setActive (nv->snap_manager.guide.getSnapTo(Inkscape::Snapper::BBOX_POINT));
- //_rcb_snbgui.setActive (nv->snap_manager.guide.getSnapTo(Inkscape::Snapper::SNAP_POINT));
_rsu_gusn.setValue (nv->guidetolerance);
//-----------------------------------------------------------grids page
index 294bbab4328ac120bf66425877072a86cbc57949..65fd294179858085f24c8450298569d7ae05d71f 100644 (file)
RegisteredUnitMenu _rum_deflt;
PageSizer _page_sizer;
//---------------------------------------------------------------
- RegisteredCheckButton _rcbgrid; //_rcbsnbb, _rcbsnnod
+ RegisteredCheckButton _rcbgrid;
RegisteredUnitMenu _rums;
//---------------------------------------------------------------
- RegisteredCheckButton _rcb_sgui; //_rcb_snpgui, _rcb_snbgui
+ RegisteredCheckButton _rcb_sgui;
RegisteredUnitMenu _rum_gusn;
RegisteredColorPicker _rcp_gui, _rcp_hgui;
//---------------------------------------------------------------
- RegisteredCheckButton _rcbsnop, _rcbsnon; //_rcbsnbo, _rcbsnnob
+ RegisteredCheckButton _rcbsnop, _rcbsnon;
RegisteredUnitMenu _rumso;
ToleranceSlider _rsu_sno, _rsu_sn, _rsu_gusn;
RegisteredRadioButtonPair _rrb_pix;