X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fdesigner%2Fmeasure.cpp;h=e5e5abb542c3a434a96795df13e8c7f6e1571c01;hb=f8a7788cee0261babfc4c804a58515aad6dfbc3d;hp=201674c86a206cd025c32da9fa3dd935e84997f2;hpb=b3a73308d67de22a2d65cc56b14edeab25537eba;p=r2c2.git diff --git a/source/designer/measure.cpp b/source/designer/measure.cpp index 201674c..e5e5abb 100644 --- a/source/designer/measure.cpp +++ b/source/designer/measure.cpp @@ -1,6 +1,6 @@ /* $Id$ -This file is part of the MSP Märklin suite +This file is part of R²C² Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa Distributed under the GPL */ @@ -12,7 +12,7 @@ Distributed under the GPL #include "measure.h" using namespace std; -using namespace Marklin; +using namespace R2C2; using namespace Msp; Measure::Measure(Designer &d): @@ -25,7 +25,7 @@ void Measure::start() state = STARTING; } -void Measure::snap_to_tracks(Point &pt, float &dir) +void Measure::snap_to_tracks(Vector &pt, float &dir) { const set <racks = designer.get_layout().get_tracks(); for(set::const_iterator i=ltracks.begin(); i!=ltracks.end(); ++i) @@ -40,7 +40,7 @@ void Measure::button_press(int, int, float gx, float gy, unsigned btn) if(btn==1) { - spoint = Point(gx, gy, 0); + spoint = Vector(gx, gy, 0); sdir = 0; snap_to_tracks(spoint, sdir); @@ -63,13 +63,13 @@ void Measure::pointer_motion(int, int, float gx, float gy) if(!state) return; - pointer = Point(gx, gy, 0); + pointer = Vector(gx, gy, 0); float dir = sdir; snap_to_tracks(pointer, dir); if(state!=STARTING) { - Point delta(pointer.x-spoint.x, pointer.y-spoint.y, 0); + Vector delta(pointer.x-spoint.x, pointer.y-spoint.y, 0); float c = cos(sdir); float s = sin(sdir);