X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdesigner%2Fmeasure.cpp;h=c4280c8a9c058b637492625f8da7d21d902e1150;hb=c164ce9409008e9b5a72cdbd09c332f95846e920;hp=56efc1b55a16a969b28bbea4e33a69385307037e;hpb=1ff06c5bc46a677fa389ef86c6b26664368f1653;p=r2c2.git diff --git a/source/designer/measure.cpp b/source/designer/measure.cpp index 56efc1b..c4280c8 100644 --- a/source/designer/measure.cpp +++ b/source/designer/measure.cpp @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of R²C² -Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa -Distributed under the GPL -*/ - #include #include #include "designer.h" @@ -25,7 +18,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) @@ -33,14 +26,14 @@ void Measure::snap_to_tracks(Point &pt, float &dir) return; } -void Measure::button_press(int, int, float gx, float gy, unsigned btn) +void Measure::button_press(float gx, float gy, unsigned btn) { if(!state) return; if(btn==1) { - spoint = Point(gx, gy, 0); + spoint = Vector(gx, gy, 0); sdir = 0; snap_to_tracks(spoint, sdir); @@ -58,18 +51,18 @@ void Measure::button_press(int, int, float gx, float gy, unsigned btn) } } -void Measure::pointer_motion(int, int, float gx, float gy) +void Measure::pointer_motion(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);