コミットメタ情報

リビジョン0ce5cc8155826acdf28064218006b24aeb464a39 (tree)
日時2018-03-09 21:45:27
作者yamat0jp <yamat0jp@yaho...>
コミッターyamat0jp

ログメッセージ

妥協しました
時々うまく動きます

変更サマリ

差分

--- a/Unit1.fmx
+++ b/Unit1.fmx
@@ -9,7 +9,7 @@ object Form1: TForm1
99 FormFactor.Devices = [Desktop]
1010 DesignerMasterStyle = 0
1111 object Image1: TImage
12- Touch.InteractiveGestures = [Zoom, Pan, DoubleTap]
12+ Touch.InteractiveGestures = [Zoom, Pan, Rotate, DoubleTap]
1313 OnGesture = Image1Gesture
1414 OnTap = Image1Tap
1515 MultiResBitmap = <
--- a/Unit1.pas
+++ b/Unit1.pas
@@ -79,49 +79,47 @@ begin
7979 SpeedButton1Click(Sender);
8080 tap := 0;
8181 end;
82- igiZoom:
83- if tap = 2 then
82+ igiRotate:
83+ with EventInfo do
8484 begin
85- with EventInfo do
86- begin
87- i := (Distance - dis) * cos(ang) / 2;
88- j := (Distance - dis) * sin(ang) / 2;
89- dis := Distance;
90- if Flags = [TInteractiveGestureFlag.gfBegin] then
91- begin
92- ang := ArcTan((Location.Y - TapLocation.Y) /
93- (Location.X - TapLocation.X));
94- Exit;
95- end;
96- end;
85+ ang := ang - Angle;
9786 if ang < 0 then
9887 ang := ang + pi;
9988 if ang < pi / 6 then
100- begin
101- state := 1;
102- resize_x;
103- end
89+ state := 1
10490 else if ang < pi / 3 then
105- begin
106- state := 2;
107- resize_x;
108- resize_y;
109- end
91+ state := 2
11092 else if ang < 2 * pi / 3 then
111- begin
112- state := 3;
113- resize_y;
114- end
93+ state := 3
11594 else if ang < 5 * pi / 6 then
116- begin
117- state := 2;
118- resize_x;
119- resize_y;
120- end
95+ state := 2
12196 else
97+ state := 1
98+ end;
99+ igiZoom:
100+ if tap = 2 then
101+ begin
102+ with EventInfo do
122103 begin
123- state := 1;
124- resize_x;
104+ i := (Distance - dis) * cos(Angle) / 2;
105+ j := (Distance - dis) * sin(Angle) / 2;
106+ dis := Distance;
107+ end;
108+ case state of
109+ 0:
110+ begin
111+ ang := EventInfo.Angle;
112+ state := 1;
113+ end;
114+ 1:
115+ resize_x;
116+ 2:
117+ begin
118+ resize_x;
119+ resize_y;
120+ end;
121+ 3:
122+ resize_y;
125123 end;
126124 Image1.Repaint;
127125 end;
@@ -130,7 +128,7 @@ begin
130128 i := EventInfo.Location.X - pan.X;
131129 j := EventInfo.Location.Y - pan.Y;
132130 pan := EventInfo.Location;
133- if EventInfo.Flags = [TInteractiveGestureFlag.gfBegin] then
131+ if TInteractiveGestureFlag.gfBegin in EventInfo.Flags then
134132 Exit;
135133 dot1.X := dot1.X + i;
136134 dot2.X := dot2.X + i;
--- a/cliprect.deployproj
+++ b/cliprect.deployproj
@@ -60,9 +60,9 @@
6060 <RemoteCommand/>
6161 <Overwrite>True</Overwrite>
6262 </DeployFile>
63- <DeployFile Include="Android\Debug\splash_image_def.xml" Condition="'$(Config)'=='Debug'">
64- <RemoteDir>cliprect\res\drawable\</RemoteDir>
65- <RemoteName>splash_image_def.xml</RemoteName>
63+ <DeployFile Include="C:\Users\Public\Documents\Embarcadero\Studio\15.0\PlatformSDKs\android-ndk-r9c\prebuilt\android-arm\gdbserver\gdbserver" Condition="'$(Config)'=='Debug'">
64+ <RemoteDir>cliprect\library\lib\armeabi-v7a\</RemoteDir>
65+ <RemoteName>gdbserver</RemoteName>
6666 <Operation>1</Operation>
6767 <LocalCommand/>
6868 <RemoteCommand/>
@@ -76,9 +76,9 @@
7676 <RemoteCommand/>
7777 <Overwrite>True</Overwrite>
7878 </DeployFile>
79- <DeployFile Include="C:\Users\Public\Documents\Embarcadero\Studio\15.0\PlatformSDKs\android-ndk-r9c\prebuilt\android-arm\gdbserver\gdbserver" Condition="'$(Config)'=='Debug'">
80- <RemoteDir>cliprect\library\lib\armeabi-v7a\</RemoteDir>
81- <RemoteName>gdbserver</RemoteName>
79+ <DeployFile Include="Android\Debug\splash_image_def.xml" Condition="'$(Config)'=='Debug'">
80+ <RemoteDir>cliprect\res\drawable\</RemoteDir>
81+ <RemoteName>splash_image_def.xml</RemoteName>
8282 <Operation>1</Operation>
8383 <LocalCommand/>
8484 <RemoteCommand/>
--- a/cliprect.dproj
+++ b/cliprect.dproj
@@ -287,14 +287,14 @@
287287 <Overwrite>true</Overwrite>
288288 </Platform>
289289 </DeployFile>
290- <DeployFile LocalName="Android\Debug\splash_image_def.xml" Configuration="Debug" Class="AndroidSplashImageDef">
290+ <DeployFile LocalName="c:\program files (x86)\embarcadero\studio\15.0\lib\android\debug\mips\libnative-activity.so" Configuration="Debug" Class="AndroidLibnativeMipsFile">
291291 <Platform Name="Android">
292+ <RemoteName>libcliprect.so</RemoteName>
292293 <Overwrite>true</Overwrite>
293294 </Platform>
294295 </DeployFile>
295- <DeployFile LocalName="c:\program files (x86)\embarcadero\studio\15.0\lib\android\debug\mips\libnative-activity.so" Configuration="Debug" Class="AndroidLibnativeMipsFile">
296+ <DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\15.0\PlatformSDKs\android-ndk-r9c\prebuilt\android-arm\gdbserver\gdbserver" Configuration="Debug" Class="AndroidGDBServer">
296297 <Platform Name="Android">
297- <RemoteName>libcliprect.so</RemoteName>
298298 <Overwrite>true</Overwrite>
299299 </Platform>
300300 </DeployFile>
@@ -304,7 +304,7 @@
304304 <Overwrite>true</Overwrite>
305305 </Platform>
306306 </DeployFile>
307- <DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\15.0\PlatformSDKs\android-ndk-r9c\prebuilt\android-arm\gdbserver\gdbserver" Configuration="Debug" Class="AndroidGDBServer">
307+ <DeployFile LocalName="Android\Debug\splash_image_def.xml" Configuration="Debug" Class="AndroidSplashImageDef">
308308 <Platform Name="Android">
309309 <Overwrite>true</Overwrite>
310310 </Platform>
旧リポジトリブラウザで表示