diff options
| author | Joshua L. Blocher <verbalshadow@gmail.com> | 2008-12-28 22:44:35 +0000 |
|---|---|---|
| committer | verbalshadow <verbalshadow@users.sourceforge.net> | 2008-12-28 22:44:35 +0000 |
| commit | 1e3ef71825fa122062b626937848539cbb62f0ca (patch) | |
| tree | 80c4099e25b93d910b580ebe681cdf11d8957d60 /src/pen-context.cpp | |
| parent | convert NR to Geom (diff) | |
| download | inkscape-1e3ef71825fa122062b626937848539cbb62f0ca.tar.gz inkscape-1e3ef71825fa122062b626937848539cbb62f0ca.zip | |
More NR ==> Geom changes
(bzr r7032)
Diffstat (limited to 'src/pen-context.cpp')
| -rw-r--r-- | src/pen-context.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/pen-context.cpp b/src/pen-context.cpp index 46268954a..1762d668c 100644 --- a/src/pen-context.cpp +++ b/src/pen-context.cpp @@ -1211,8 +1211,8 @@ spdc_pen_set_angle_distance_status_message(SPPenContext *const pc, Geom::Point c SPDesktop *desktop = SP_EVENT_CONTEXT(pc)->desktop; Geom::Point rel = p - pc->p[pc_point_to_compare]; - GString *dist = SP_PX_TO_METRIC_STRING(NR::L2(rel), desktop->namedview->getDefaultMetric()); - double angle = atan2(rel[NR::Y], rel[NR::X]) * 180 / M_PI; + GString *dist = SP_PX_TO_METRIC_STRING(Geom::L2(rel), desktop->namedview->getDefaultMetric()); + double angle = atan2(rel[Geom::Y], rel[Geom::X]) * 180 / M_PI; Inkscape::Preferences *prefs = Inkscape::Preferences::get(); if (prefs->getBool("/options/compassangledisplay/value", 0) != 0) angle = angle_to_compass (angle); @@ -1413,8 +1413,8 @@ static int pen_next_paraxial_direction(const SPPenContext *const pc, */ if (pc->num_clicks == 0) { // first mouse click - double dist_h = fabs(pt[NR::X] - origin[NR::X]); - double dist_v = fabs(pt[NR::Y] - origin[NR::Y]); + double dist_h = fabs(pt[Geom::X] - origin[Geom::X]); + double dist_v = fabs(pt[Geom::Y] - origin[Geom::Y]); int ret = (dist_h < dist_v) ? 1 : 0; // 0 = horizontal, 1 = vertical pen_last_paraxial_dir = (state & GDK_SHIFT_MASK) ? 1 - ret : ret; return pen_last_paraxial_dir; @@ -1432,10 +1432,10 @@ void pen_set_to_nearest_horiz_vert(const SPPenContext *const pc, Geom::Point &pt if (next_dir == 0) { // line is forced to be horizontal - pt[NR::Y] = origin[NR::Y]; + pt[Geom::Y] = origin[Geom::Y]; } else { // line is forced to be vertical - pt[NR::X] = origin[NR::X]; + pt[Geom::X] = origin[Geom::X]; } } @@ -1444,9 +1444,9 @@ Geom::Point pen_get_intermediate_horiz_vert(const SPPenContext *const pc, Geom:: Geom::Point const &origin = pc->p[0]; if (pen_last_paraxial_dir == 0) { - return Geom::Point (origin[NR::X], pt[NR::Y]); + return Geom::Point (origin[Geom::X], pt[Geom::Y]); } else { - return Geom::Point (pt[NR::X], origin[NR::Y]); + return Geom::Point (pt[Geom::X], origin[Geom::Y]); } } |
