OSDN Git Service

can set angle
authoryamat0jp <yamat0jp@yahoo.co.jp>
Sun, 29 Oct 2017 01:00:00 +0000 (10:00 +0900)
committeryamat0jp <yamat0jp@yahoo.co.jp>
Sun, 29 Oct 2017 01:00:00 +0000 (10:00 +0900)
一応の完成
イメージと違いますが

Unit1.pas

index 33b0c64..b2b705a 100644 (file)
--- a/Unit1.pas
+++ b/Unit1.pas
@@ -60,7 +60,11 @@ begin
           j := (Distance - dis) * sin(ang) / 2;
           dis := Distance;
           if Flags = [TInteractiveGestureFlag.gfBegin] then
+          begin
+            ang := arctan((Location.Y - TapLocation.Y) /
+              (Location.X - TapLocation.X));
             Exit;
+          end;
         end;
         dot1.X := dot1.X - i;
         dot2.X := dot2.X + i;
@@ -70,10 +74,6 @@ begin
       end;
     igiRotate:
       ang := EventInfo.Angle;
-    igiPressAndTap:
-      with EventInfo do
-        ang := arctan((Location.Y - TapLocation.Y) /
-          (Location.X - TapLocation.X));
     igiPan:
       begin
         i := EventInfo.Location.X - pan.X;