]> git.tdb.fi Git - r2c2.git/blobdiff - source/designer/measure.cpp
Give filename to GLtk::Resources constructor
[r2c2.git] / source / designer / measure.cpp
index 56efc1b55a16a969b28bbea4e33a69385307037e..c4280c8a9c058b637492625f8da7d21d902e1150 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of R²C²
-Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa
-Distributed under the GPL
-*/
-
 #include <cmath>
 #include <GL/gl.h>
 #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<Track *> &ltracks = designer.get_layout().get_tracks();
        for(set<Track *>::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);